[ python-Bugs-809254 ] imp.find_module doesn't work in /tmp
SourceForge.net
noreply at sourceforge.net
Tue Jan 11 01:29:52 CET 2005
Bugs item #809254, was opened at 2003-09-19 13:44
Message generated for change (Comment added) made by vng1
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.
----------------------------------------------------------------------
>Comment By: Victor T. Ng (vng1)
Date: 2005-01-11 00:29
Message:
Logged In: YES
user_id=679596
lima:~ buildbox$ cd /tmp
lima:/tmp buildbox$ touch __init__.py
lima:/tmp buildbox$ python
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] 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
>>>
----------------------------------------------------------------------
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