Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Newbie - No module named stdwin (http://www.velocityreviews.com/forums/t319447-newbie-no-module-named-stdwin.html)

K 07-09-2003 02:20 PM

Newbie - No module named stdwin
 
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.M. Kuchling 07-09-2003 02:43 PM

Re: Newbie - No module named stdwin
 
On Wed, 9 Jul 2003 16:20:47 +0200,
> 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

Hans Nowak 07-09-2003 03:09 PM

Re: Newbie - No module named stdwin
 
K wrote:
> 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).




Alan Gauld 07-09-2003 06:36 PM

Re: Newbie - No module named stdwin
 
On Wed, 9 Jul 2003 16:20:47 +0200, "K" <milyon@wp.pl> wrote:

> 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/

Alan Gauld 07-09-2003 06:40 PM

Re: Odp: Newbie - No module named stdwin
 
On Wed, 9 Jul 2003 17:07:18 +0200, "K" <milyon@wp.pl> wrote:

> > includes Tkinter; the other interfaces would be add-on packages.
> >
> > --amk

> 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 07-10-2003 10:27 AM

Odp: Newbie - No module named stdwin
 
but in visual basic 6 i have graphical Interface - in Python only text based
is that correct ?




Simon Bayling 07-10-2003 12:55 PM

Re: Odp: Newbie - No module named stdwin
 
"K" <milyon@wp.pl> wrote in news:bejf32$3on$1@topaz.icpnet.pl:

> 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/tk...duction/hello-
tkinter.htm#AEN50

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

Cheers,
Simon.




Stephen Ferg 07-10-2003 07:34 PM

Re: Newbie - No module named stdwin
 
You might want to take a look at EasyGui.
http://www.ferg.org/easygui/

That will allow you to do simple things quickly.

After that, you might want to look at
http://www.ferg.org/thinking_in_tkinter/index.html

W Isaac Carroll 07-11-2003 04:41 AM

Re: Odp: Newbie - No module named stdwin
 
K wrote:
> but in visual basic 6 i have graphical Interface - in Python only
> text based is that correct ?


If you're looking for a simple graphical interface, try pythoncard:
http://pythoncard.sourceforge.net/

TTFN




All times are GMT. The time now is 07:55 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.