Newbie - No module named stdwin

K

K

hello

All time all write programm's in Visual Basic but now i'm very excited and
learn a Python so install 2.2.3 version...

When i wanna open a window (like windows) i write

inport stdwin
stdwin.open ('my window')

and i have ImportError: No module named stdwin

Did i must install some package?? please help me
 
A

A.M. Kuchling

When i wanna open a window (like windows) i write

inport stdwin
stdwin.open ('my window')

Stdwin is very old and very dead; what document are you reading that
suggests using it? Most GUI development in Python is done using Tkinter,
though there's also wxWindows, PyQt, and Gtk+ interfaces available. If you
downloaded a binary Windows installer from somewhere, it probably
includes Tkinter; the other interfaces would be add-on packages.

--amk
 
H

Hans Nowak

K said:
hello

All time all write programm's in Visual Basic but now i'm very excited and
learn a Python so install 2.2.3 version...

When i wanna open a window (like windows) i write

inport stdwin
stdwin.open ('my window')

and i have ImportError: No module named stdwin

Did i must install some package?? please help me

The stdwin package has been phased out long ago. There are other, better GUIs
that can be used with Python. It comes with Tkinter, but it's easy to install
a third-party package like wxPython (etc).
 
A

Alan Gauld

inport stdwin
stdwin.open ('my window')

and i have ImportError: No module named stdwin

Stdwin is obsolete. For a very brief intro to Tkinter and
wxPython visit my tutorial and look at the GUI topic (in the
"Advanced" section). Then visit one of the more comprehensive
tutorials linked from the Tkinter section of the Python web site.

But if you are still just learning Python you might be better
keeping clear of GUIs till a little later. They are just one
more complication...

Alan G.
http://www.freenetpages.co.uk/hp/alan.gauld/
 
A

Alan Gauld

ok thanks so how command can open a window ?

See my previous post, however usually in Python you don't need to
open a window, unless you are writing a full GUI program. So
maybe we need to ask what it is you are doing that requires that
you "open a window"?

To get user input use raw_input() function
To present info(error messages and results etc)
to the user use print statements.

If you want to draw graphics then OK maybe you do
need a window, but maybe the turtle package would do?

While programming GUI style is quite possible in Python, its
usually best to master the basics first!

Alan g.
 
K

K

but in visual basic 6 i have graphical Interface - in Python only text based
is that correct ?
 
S

Simon Bayling

K said:
but in visual basic 6 i have graphical Interface - in Python only text
based is that correct ?

Yes and no... Python only has a text interface, but can access "windowing
toolkits" to allow you to make graphical interfaces.

A lot of languages are like this, e.g. C++, but some have a built-in
windowing toolkit, e.g. Java.

Visual Basic also has its own built-in toolkit - so much so that it is
all you can use, and it is easy to use - which is why it is so popular.

So... yes strictly speaking Python only has a text interface, but that's
not the whole story because you can create graphical interfaces with a
toolkit that usually comes with Python, and it's a very common and
standard thing to do.

However, it requires a different style of programming, which is why the
previous posters are suggesting you avoid it until you are comfortable
with Python.

http://www.pythonware.com/library/tkinter/introduction/hello-
tkinter.htm#AEN50

Is a link to the most simple "Hello World" application with the toolkit
"Tkinter".

Cheers,
Simon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top