I am unable to reproduce this on Ubunty Jaunty, using either the bzr from the official Jaunty repository (1.13.1-1) or the current development version. I've tried the following procedure with both python 2.5.4-1ubuntu4 and 2.6.2-0ubuntu1:
hmel...@octarine:~$ mkdir /tmp/,72227/ hmel...@octarine:~$ cd /tmp/,72227/ hmel...@octarine:/tmp/,72227$ /usr/bin/python2.5 /usr/bin/bzr --no-plugins init Created a standalone tree (format: pack-0.92) hmel...@octarine:/tmp/,72227$ mkdir -p foo/codecs hmel...@octarine:/tmp/,72227$ touch foo/codecs/__init__.py hmel...@octarine:/tmp/,72227$ cd foo hmel...@octarine:/tmp/,72227/foo$ /usr/bin/python2.5 /usr/bin/bzr --no-plugins add adding foo adding foo/codecs adding foo/codecs/__init__.py I've also tried a similar procedure using the standalone 1.16.1-3 installer on a virtual Windows XP box. I was unable to reproduce the bug there, too. FWIW, the behaviour I'm seeing (i.e. not being able to reproduce the bug) seems to correspond well with Python's documentation (http://docs.python.org/library/sys.html#sys.path): sys.path[0] should only be an empty string when "the script directory is not available": hmel...@octarine:/tmp/,72227/foo$ cat > test.py #!/usr/bin/env python import sys import pprint pprint.pprint(sys.path) hmel...@octarine:/tmp/,72227/foo$ chmod +x test.py hmel...@octarine:/tmp/,72227/foo$ ./test.py ['/tmp/,72227/foo', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/Numeric', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/var/lib/python-support/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/var/lib/python-support/python2.6/gtk-2.0', '/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode', '/usr/local/lib/python2.6/dist-packages'] i.e. when I invoke a Python script on my system, there is no empty string element in sys.path. Does anyone know how to reliably reproduce this bug? -- should avoid loading modules from working directory https://bugs.launchpad.net/bugs/72227 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
