Scott David Daniels wrote:
W. eWatson wrote:
...
I'm working on this now, but my knowledge of python needs refreshing. Right now I have a file of all the az,el data I've collected, and I'd like to open it with Python for XP. However, Python doesn't like this:

junkfile = open('c:\tmp\junkpythonfile','w')

I get
    junkfile = open('c:\tmp\junkpythonfile','w')
IOError: [Errno 2] No such file or directory: 'c:\tmp\\junkpythonfile'

This problematic segment is just a hack of a similar statement which has the same problem and a much longer path. I suspect the problem is with the back slash.


A standard windows error. note that '\t' is a tab, and I doubt you have
a directory named <tab> <m> <p>.  Get in the habit of _always_ using:
   junkfile = open(r'c:\tmp\junkpythonfile','w')
or
   junkfile = open('c:\\tmp\\junkpythonfile','w')
for file names.

--Scott David Daniels
[EMAIL PROTECTED]

Thanks. r did the job nicely.

--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
              Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

                    Web Page: <www.speckledwithstars.net/>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to