[wingide-users] Custom Executable and Python Shell
fuzzyman at voidspace.org.uk
Wed Dec 27 13:06:58 MST 2006
Wingware Support wrote:
> On Sun, 24 Dec 2006, Michael Foord wrote:
>> I've got Wing setup for developing with our work environment.
>> We use a custom executable. To overcome the fact that when you have both these
>> options set Wing doesn't pass the full path of the file being executed, I have
>> created a script that finds the executable and finds the full path of the
>> script being executed, sets the correct current directory and executes the
>> By the way, this limitation makes it impossible to use a custom executable and
>> set the initial directory.
>> With a custom executable set, the Python shell built in to Wing doesn't work.
>> Would it be (or is it) possible to use a custom executable and still have the
>> default Python shell ?
> I think the problem is that you're setting the executable to
> IronPython and Wing's Python Shell, which internally depends on
> our debugger implementation, will not work with IronPython.
> Since you are just trying to get files to execute with
> IronPython, perhaps the thing to do is to write a script that
> executes the current file with IronPython and abandon trying to
> use Wing's "Execute" functionality.
> A script can add items to the editor and project context menu as
> well as a new menu in the menu bar. I can answer specific
> questions but it's probably not hard to cobble up something based
> on the cc_checkout() example in scripts/editor_extensions.py. To
> get more sophisticated process control, see the scripts/svn.py
> script for its use of the AsyncExecuteCommandLine() call (in
> Scripting is documented here:
Ok, that sounds like it should work fairly well.
I assume I can set keyboard shortcuts to menu options added by a script ?
(My current solution uses the built-in Execute and a custom script to
find the right executable *and* the full path of the current file, and
then set the correct initial directory. It is bound to F5 which is what
the rest of my office is currently using with TextPad.)
> Hope that helps. We'll try to make this easier without scripting
> in the future.
There are two issues.
1) Using a custom executable and setting the initial directory is just
2) The Python shell is broken if you are using a custom executable which
isn't a Python interpreter. An implementation detail of your debugger it
It would be nice to see both fixed. I'd like to start hacking with
scripting anyway, we use a modified PyLint at work so hooking that in
would be great.
Aside from these gripes, I'm greatly enjoying using Wing. Beats the
stuffing out of TextPad anyway.
Happy new year.
> Stephan Deibel
> Wing IDE for Python
> Advancing Software Development
More information about the wingide-users