[wingide-users] Re: Project specific Python Executable default
search
Michael Foord
fuzzyman at voidspace.org.uk
Wed Apr 29 10:55:42 MDT 2009
Vania Smrkovski wrote:
> So Michael, what page in "In Action" talks about how you work around
> this in Wing? :-)
>
I didn't cover it in the book. I figured that configuring different IDEs
for working with external tools was out of scope and could easily burn a
whole chapter... I did send an email or two about it recently though. ;-)
> I've got IronPython installed on my dev box at home. And VS2008. Are
> you saying to just create a batch file that calls the IronPython
> interpreter and passes in the .py file?
>
Yep - pretty much. My Wing script (for Windoze) does something *like*
(mine does a bit more for finding and running the *unit test* for a file):
import wingapi
import os
from wingutils import spawn
def custom_execute(app=wingapi.kArgApplication):
wingapi.gApplication.ExecuteCommand('save-all')
editor = app.GetActiveEditor()
filename = editor.GetDocument().GetFilename()
directory = os.path.dirname(filename)
env = app.GetProject().GetEnvironment(filename)
cmd = env.get('COMSPEC', 'cmd.exe')
argv = [cmd, '/c', 'ipy.bat', run_path]
spawn.win32_start_process(cmd, argv, env=env, child_pwd=directory,
new_console=True)
The batch file ipy.bat (which must be on your path somewhere) pauses
after execution.
> Also, haven't got to the page on this topic, either, but.... Do I
> need to make changes on my web host to get IronPython to work? I keep
> seeing references in the book to the idea that the Python files are
> not "compiled". So I'm confusing myself trying to parse that out.
>
I'm afraid I didn't write the chapter on ASP.NET - because I don't know
anything about the subject...
Probably best to send a separate email with this question.
>
> Book is an excellent resource, by the way!
>
Thanks
Michael
> __________________________________
> Vania
> http://www.pandorasdream.com
> http://picasaweb.google.com/vania.smirk
>
>
> On Wed, Apr 29, 2009 at 10:47 AM, Michael Foord
> <fuzzyman at voidspace.org.uk <mailto:fuzzyman at voidspace.org.uk>> wrote:
>
> Wingware Support wrote:
>
> Vania Smrkovski wrote:
>
> In re-reading Michael's email, I realize that I CAN'T set
> my project's python executable to the IronPython b/c it
> will not connect to the debugger or the other tools in
> WING. (You guys planning on changing this?)
>
>
> Yes, but it's an almost complete rewrite of the debugger, so
> it's not
> likely to happen soon. I've heard rumors that settrace() may
> be added
> to IronPython soon. That would help but it'll still be a lot
> of work.
>
>
> It would still be really useful to be able to set the Python
> executable to IronPython and still have a working Python shell
> inside Wing - even if it was a CPython one.
>
> As a second step having an IronPython shell but no debugger would
> still be an awesome feature.
>
> I realise that it is to do with your architecture, but it feels
> like a terrible misfeature that setting the executable to
> IronPython disables the shell. :-)
>
> Michael
>
>
>
> But I still thought you'd want to know about it looking
> for WING Project files instead of .exe files.
>
>
> I think it's defaulting to the most recent file type
> selection. I agree this
> should be set to *.exe file type. Thanks for pointing that out.
>
>
>
> --
> http://www.ironpythoninaction.com/
>
>
--
http://www.ironpythoninaction.com/
More information about the wingide-users
mailing list