[New-bugs-announce] [issue1293] Trailing slash in sys.path cause import failure

Guillaume Girard report at bugs.python.org
Thu Oct 18 14:47:42 CEST 2007

New submission from Guillaume Girard:

On win32, the following code:

import sys
import bar

where the file bar.py is present in ../bar/ will return an import error
"No module named bar". Remove the trailing slash and the bar.py is
imported correctly. The problem is identical with backslash. This code
works in Python 2.4.

Not a very serious bug, but it breaks programs working with Python 2.4.

components: Interpreter Core
messages: 56523
nosy: guillaumegirard
severity: minor
status: open
title: Trailing slash in sys.path cause import failure
type: behavior
versions: Python 2.5

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list