Changeset 34
- Timestamp:
- 09/24/07 12:17:23 (1 year ago)
- Files:
-
- mactorii.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mactorii.py
r33 r34 31 31 images = dict() 32 32 baselines = [] 33 33 unloaded = None 34 34 renderables = None 35 35 … … 55 55 56 56 display_picture = None 57 58 root = None 57 59 58 60 def on_mouse_motion(x,y,dx,dy): … … 103 105 global display_picture 104 106 global win 107 global files 108 global unloaded 109 global root 105 110 106 111 if symbol == key.LEFT: … … 158 163 159 164 display_picture = pyglet_image.ImageData(im.size[0],im.size[1],"RGB",im.tostring()) 160 165 166 if symbol == key.O: 167 dirname = tkFileDialog.askdirectory(parent=root,initialdir="~",title='Please select a directory') 168 169 if len(dirname ) > 0: 170 import dircache 171 ls = dircache.listdir(dirname) 172 ls = list(ls) 173 dircache.annotate(dirname, ls) 174 175 files = ["%s%s%s"%(dirname,os.path.sep,e) for e in ls if not e.endswith('/')] 176 unloaded = list(files) 177 178 images = dict() 179 180 if symbol == key.R: 181 unloaded = list(files) 182 images = dict() 183 161 184 def strip_width(): 162 185 """returns the width of the strip in pixels""" … … 337 360 global fps_display 338 361 global display_picture 362 global unloaded 363 global root 339 364 340 365 # order is important here. window_setup must be setup first! Likewise with font … … 344 369 root = Tkinter.Tk() 345 370 root.withdraw() 371 346 372 if (sys.platform != "win32") and hasattr(sys, 'frozen'): 347 373 root.tk.call('console', 'hide')
