home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 61 / CDPowerplay61Disc1.iso / patches / BladeToolsEnglish.exe / BladeToolsEnglish / LED / Start.py < prev    next >
Encoding:
Text File  |  2001-03-06  |  1.1 KB  |  44 lines

  1.  
  2. import sys
  3. import LEDx
  4.  
  5.  
  6. sys.path.append("C:\\Blade\\Lib")
  7. sys.path.append("C:\\Blade\\Lib\\PythonLib")
  8. sys.path.append("C:\\Blade\\Lib\\PythonLib\\lib-tk")
  9. sys.path.append("C:\\Blade\\Lib\\PythonLib\\DLLs")
  10. sys.path.append("C:\\Blade\\Lib\\PythonLib\\Pmw")
  11. sys.path.append("C:\\Blade\\Lib\\PythonLib\\Pmw\\Pmw_0_8")
  12. sys.path.append("C:\\Blade\\Lib\\PythonLib\\Pmw\\Pmw_0_8\\lib")
  13.  
  14.  
  15.  
  16.  
  17. # *******************************
  18. # *** Definici≤n de funciones ***
  19. # *******************************
  20.  
  21. # *** Funciones de guardar y cargar selecci≤n ***
  22.  
  23. def ListSelected():
  24.   l=[]
  25.   for i in range(LEDx.NumSectors()):
  26.     s=LEDx.Sector(i)
  27.     if s.IsSelected():
  28.       l.append(s)
  29.   return l
  30.  
  31. def SelectList(lista):
  32.   for s in lista:
  33.     s.Select(1,0)
  34.   lista[0].Select(1,1)
  35.  
  36.     
  37. # *** Scripts asignados a botones de la barra de python ***
  38.  
  39. LEDx.SetScript(0,"lista=ListSelected()")
  40. LEDx.SetScript(1,"SelectList(lista)")
  41. LEDx.SetScript(2,"execfile('datosescopy.py')")
  42. #LEDx.SetScript(2,"execfile('.\python\escteesc.py')")
  43. #LEDx.SetScript(3,"execfile('.\python\dlgesces.py')")
  44.