Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#15 DrPython sometimes cannot find its own files


DrPython sometimes cannot find its own files. This is not a
problem with the environment - if I run DrPython again, from
the same command prompt, it is fine. I suspect the problems
arise after I load or save files in a directory outside DrPython's
filesystem tree.

1. I get erratic errors with the Information menu items. On the
following run of DrPython, I tried Information/About, and
Information/Help (twice). No window appeared, but these
errors were reported to the console:

[user@localhost drpython-2.4.6]$ ./drpython.lin
Traceback (most recent call last):
File "/local/download/python/drpython-2.4.6/drpython.py", line
2996, in OnViewAbout
from drAboutDialog import drAboutDialog
ImportError: No module named drAboutDialog
Traceback (most recent call last):
File "/local/download/python/drpython-2.4.6/drpython.py", line
2990, in OnViewHelp
from drHelpDialog import drHelpDialog
ImportError: No module named drHelpDialog
Traceback (most recent call last):
File "/local/download/python/drpython-2.4.6/drpython.py", line
2990, in OnViewHelp
from drHelpDialog import drHelpDialog
ImportError: No module named drHelpDialog
[user@localhost drpython-2.4.6]$

2. When loading files from outside DrPython's tree, the second
load crashes DrPython, after bringing up a box with this

Bitmap Directory (/home/user/bitmaps) Does Not Exist.
This is either a bug with DrPython,
an error with your installation,
or the bitmap directory was simply removed.

3. Feature Request:
The help window blocks input to the main window. This is not
helpful if the user wants to try things out while reading the help.

My system is the same as in bug report [ 943575 ].


  • Logged In: YES

    2: Launch drpython using drpython.pyw.
    drpython.py.drpython.lin. Different results?

    1: I am unable to produce this bug.

    3. Done in cvs, will be in the next version.
    Logged as a bug-report, feature request (A feature Request
    that is also a bug-report).

    So here are my questions:

    Try running wxPython demo.
    Do these problems only happen with drpython?
    Also, please try running the cvs version. Does that work
    for you at all?

  • kjnash

    Logged In: YES

    > drpython using drpython.pyw. drpython.py.drpython.lin
    Same in each case.

    Using lsof, I see that DrPython changes its CWD to that of the user's
    file, when the file is executed. This is when the problems begin.

    But the problems occur only if I run using a relative path, e.g. from
    the drpython-2.4.6 directory with the command "./drpython.lin". If I
    give the full path to drpython.lin on the command line, there is no
    bug, whichever directory I start in, whichever files I load/run/save.

    It seems that drpython works out its directory from $0, and looks for
    its files relative to that location. This is fine if $0 is an absolute path,
    but drpython gets confused if $0 is a relative path and the CWD has
    changed. In general, the value of os.getcwd() at startup, together
    with $0, will give the absolute path to the running script (there may be
    simpler ways).

  • Logged In: YES

    I have gone through the code, and tried messing around.

    This is not something I can reproduce, at all.

    Try downloading cvs.

    Try running the following script from "Dynamic DrScript":

    What do you get?


    Try getting python 2.3 or newer.
    Try using wxPythonGTK instead of wxPythonGTK2.
    Try version 2.5.1

  • Logged In: YES

    what do you mean by second load?
    Are you running in SDI or MDI?

    • status: open --> closed-works-for-me
  • Logged In: YES

    Since I have not heard back in quite a while, and I cannot
    replicate this no matter how much I mess around, I am
    closing this bug.