From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of Small Business Services
Quick and dirty solution:
fileptr = open('somefile', 'r') # open file with read access instr = fileptr.readline() # read a line
Where 'somefile' is the name of the data file that resides in your .../Extensions directory (same directory as the external method which is opening the file).
You should get yourself some python documentation.
No - you cannot be sure where the default directory is, so this may work sometimes and not work other times. The default directory can get changed by other code. You should never rely on it. The OP's problem was that he did what you said and couldn't find the target file. Cheers, Tom P
participants (1)
-
Passin, Tom