/[fenfire]/fenfire/org/fenfire/fenpdf/importpdf.py
ViewVC logotype

Diff of /fenfire/org/fenfire/fenpdf/importpdf.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by humppake, Sun Aug 17 16:47:01 2003 UTC revision 1.3 by tjl, Mon Aug 18 20:07:19 2003 UTC
# Line 13  def importPDF_select(fen, treetime): Line 13  def importPDF_select(fen, treetime):
13      """Show a file selection dialog and import a file.      """Show a file selection dialog and import a file.
14      """      """
15            
16      file = selectFile("Select PS/PDF file to import")      file = selectFile("Select PS/PDF file to import, or directory for all files in it")
17      p("ps/pdf to be added: ",file)      p("ps/pdf to be added: ",file)
18      if file == None: return None      if file == None or not file.exists(): return None
19    
20      return importPDF(fen, treetime, file)      lastFile = None
21        if file.isDirectory():
22            for f in file.listFiles():
23                try:
24                    if f.isDirectory(): continue
25                    importPDF(fen, treetime, f)
26                except exception:
27                    print "EXCEPTION LOADING",f,":",sys.exc_info()
28        else:
29            return importPDF(fen, treetime, file)
30    
31  def selectFile(string):  def selectFile(string):
32      """Select a file using an AWT dialog, with the given prompt.      """Select a file using an AWT dialog, with the given prompt.

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26