[IPython-user] .py file stuck open?

D Brown dbrown2 at yahoo.com
Wed May 18 23:19:00 CDT 2005


Hi,

I'm seeing a problem using ipython where my .py source file
cannot be saved after I get a runtime error.  Not sure if
this is expected or not.  It's occurring after I get an
error within the shutil module.  I don't think I've seen it
happen so far with errors in other places.

Here's a typical error dump that trigers the problem:
.......................................

In [2]: run runsim.py
sim:
---------------------------------------------------------------------------
exceptions.OSError                                  
Traceback (most recent call
 last)

c:\Program Files\Pisces\runsim.py
     53         outbox = 'C:/Documents and
Settings/dlbrown/My Documents/pisces'
     54         inbox = outbox
     55         print "sim:"
---> 56         runsim(prefix='testMOS',
client_outbox=outbox, client_inbox=inbo
x)
     57

c:\Program Files\Pisces\runsim.py in runsim(prefix,
client_outbox, client_inbox)

     42         # copy entire data directory to client
inbox
     43         os.chdir(rootPath)
---> 44         shutil.move(dirname, client_inbox + '/' +
prefix + '_dir')

C:\Python23\lib\shutil.py in move(src, dst)
    165     except OSError:
    166         if os.path.isdir(src):
--> 167             copytree(src, dst, symlinks=True)
    168             rmtree(src)
    169         else:

C:\Python23\lib\shutil.py in copytree(src, dst, symlinks)
     99     """
    100     names = os.listdir(src)
--> 101     os.mkdir(dst)
    102     errors = []
    103     for name in names:

OSError: [Errno 17] File exists: 'C:/Documents and
Settings/dlbrown/My Documents/pisces/testMOS_dir'
WARNING: Failure executing file: <runsim.py>

.......................................

Any ideas on what's happening?  If I exit ipython I can
then save the .py file again, so it appears ipython is
holding the file open.

-- David


		
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 




More information about the IPython-user mailing list