wprins at gmail.com
Tue Jun 5 00:25:25 CEST 2012
On 4 June 2012 19:50, dispatch3d at live.com <dispatch3d at live.com> wrote:
> I am new to the python idle. I am a little confused on the GUI section on
> where to write it.
I think that's perhaps an understatement. <grin>
>> The tutorial I am using says not to write GUI in the idle section so I have
> been using the python shell to write the GUI app.
I'm pretty sure the tutorial didn't instruct you to actually use the
shell to write GUI (or any kind of) applications... (By the way, you
didn't mention what tutorial you're using?)
> This is not to productive
> for me cause after I save it as .pyw I am unable to open it to edit or add
> to the code. I have to start over in another shell.
Yes, well, it's a bad idea, and the downsides you mention is true of
writing any Python application, not just GUI ones. You should use the
shell to experiment, test, peform introspection, read documentation,
etc. etc, not to actually develop your applications... that's what
editors and IDE's are for.
> My question is working with Tkinter in order to run it and being able to see
> step by step progress and maintain the ability to edit or add as I go where
> do I need to code it what program?
TkInter apps can sometimes not play nice with Idle when run from
within Idle for various reasons which I've now forgotten (partly
because Idle is itself written in TkInter I think), but I seem to also
vaguely recall that this is somewhat less of a problem nowadays than
it used to be and/or the issues can be avoided with a bit of care.
(I'm sure the others on the list will correct me if I'm imagining
things and/or elaborate on this.) So, if your app is simple, and
certainly while you're learning you might want to use Idle despite
what tutorial says. At worst, you can avoid issues by simply running
your application manually e.g. apart from Idle. (Notwithstanding your
> As well once I have saved the code as .pyw when I go to the location to open
> and run it it does nothing how do I run it after its saved and completed.
Well when done correctly it should work. It's impossible to tell
without more information about what's really going on why it's "doing
nothing." There may be a problem with your program, there might be a
problem with your Python setup, there may be a problem with your
operating system environment, etc. etc. Anyway, if you open your .pyw
file with say Windows notepad or any other text editor (or, indeed,
Idle), what does it contain?
> I am running winows 7 thanks
What version of Python? I recommend the Activestate distribution of
Python on Windows these days as their installer does several
convenience steps automatically that the official Python distributions
do not do and provides several tools useful on Windows as well. You
might have a look at it/switch if you're not using it yet:
Hope that helps,
More information about the Tutor