[Python-bugs-list] [ python-Bugs-809254 ] imp.find_module doesn't work in /tmp

SourceForge.net noreply at sourceforge.net
Fri Sep 19 09:44:30 EDT 2003


Bugs item #809254, was opened at 2003-09-19 13:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=809254&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Victor T. Ng (vng1)
Assigned to: Nobody/Anonymous (nobody)
Summary: imp.find_module doesn't work in /tmp

Initial Comment:
I'm running OSX 10.2.6 and the imp module seems to 

have a parsing error when I pass it the directory "/"



bash$ cd /tmp

bash$ touch __init__.py

bash$ python

Python 2.3 (#2, Jul 30 2003, 11:45:28) 

[GCC 3.1 20020420 (prerelease)] on darwin

Type "help", "copyright", "credits" or "license" for more 

information.

>>> import imp

>>> imp.find_module("tmp",['/'])

Traceback (most recent call last):

  File "<stdin>", line 1, in ?

ImportError: No module named tmp

>>> imp.find_module("tmp",['//'])

(None, '//tmp', ('', '', 5))



I'm not sure why, but I seem to need a double slash in the 

directory name.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=809254&group_id=5470



More information about the Python-bugs-list mailing list