#4 Executes saved file instead of unsaved buffer


When running the contents of the text window in Python, a
popup asks whether the user would like to save the file. If I
answer "No", it is the saved version, not the version in the
window, that is executed.

Feature Request:
It would be useful if the popup had a checkbox for "Do not
show this warning again". My favourite feature of DrScheme is
that I can copy example code from a web page into the
clipboard, paste it into the text window, and click "Run". I only
bother to save the code if I want to alter it.

For the same reason, it is helpful if the "Run" button is not
disabled when DrPython is opened, text is placed in the buffer,
but no file has been opened or saved.

Bug report is for DrPython 2.4.6 running on:
Red Hat 9 (updated) with
kernel 2.4.20-30.9
glibc 2.3.2-27.9.7
python 2.2.2-26
wxGTK2 2.4.2-0.fdr.1.rh90 (*)
wxPythonGTK2 (*)
(*) from the fedora.us repository, for Red Hat 9


  • Logged In: YES

    I need to think about this one.
    Since 1.0.0, I have been loathe to do this, since
    DrPython works by calling an outside interpreter.
    So my options are:
    Execute in Process (Which you can do with Dynamic DrScript)
    Piping each line one at a time to python, which would be a
    performance hit I think.

    Perhaps an option about whether or not you are willing to
    trade performance for the ability to run files without saving.

    Other than that, the only option would be passing the text
    as one string to the interpreter, which I places me at a
    loss at the present.

    What do you think?

  • kjnash

    Logged In: YES

    Thanks for your followup.

    A quick solution is to save the buffer automatically to a temporary
    filename (to the user, however, the buffer should continue to appear
    as unsaved). If the user does not have write access to the current
    directory, save the file in /var/tmp.

  • Logged In: YES

    This has been implemented as a plugin for the next version
    (which should be out soon). Simply install the plugin, and
    you can run from the unsaved buffer.

    • status: open --> closed