October 5th, 2004, 01:45 PM
How can I start using PyWin?!
I am an intermediate Python programmer and have been using the console so far for running my programs. I have recently installed the PyWin32 and the only thing I know about it is that it gives me a GUI interface for running my scripts. But I don't know how to start using it. The only thing I know is where it's installed! Could you please give me a small example as to have a start on it?
October 6th, 2004, 03:08 AM
I guess you mean how do you use the Win32 package? The Win32 extensions allow you to interact with Microsoft operating system facilities.
Check out the
directory for examples.
October 6th, 2004, 07:56 AM
There's also a very good book on using Python with Windows from O'Reilly called "Python Programming on Win32". Definatly worth a look if you're going to be going down this path.
October 6th, 2004, 08:10 AM
Sorry, but it doesn't - it provides an interface to the Windows API, things like COM clients and servers, getting handles to open windows, event logs, using NT file APIs to read and write files, changing security settings, and so on. It's useful, but not for that.
Originally Posted by sam_kh918
If you want a GUI to develop graphical applications instead of command line only ones, then you need to look at one of these;
tKinter - installed with Python, but a bit dated. http://www.pythonware.com/library/tkinter/introduction/
wxPython - www.wxpython.org
GTK - http://www.pygtk.org/
PythonCard (runs with wxPython but simplifies it) - http://pythoncard.sourceforge.net/
Browsing their sites will show you introductions and tutorials, but none are as simple as "a GUI interface for running scripts", they need programs written specifically to use them, which can take more than double the effort of a simple command line program - involving creating windows, creating buttons and textboxes, adding code to handle clicks and typing, resizing, etc.
October 6th, 2004, 08:34 AM
Actually it does, though it's been a very long time since I've used it: the winPytho IDE. See the ActivePython homepage for a quick list of some of the things the Win32all extensions provide.
October 6th, 2004, 06:50 PM
PythonWin is an 'IDE' in the sense that IDLE is - it's a shell and text editor with debugging in a GUI, rather than something that allows you to create GUIs such as VB or Delphi.
Originally Posted by netytan
I suppose it could be "a GUI interface for running my scripts", but why would you want to launch command line scripts from a shell in a GUI? And why install PythonWin especially for it when IDLE does that? And it appears in the start menu so it's not exactly so hard to find that you need to ask other people.
Well anyway, PyWin32 is a good extension to have, and "Python Programming on Win32" is a good book to go with it.
October 7th, 2004, 05:45 AM
If you're using windows that is . Otherwise it's just kinda anoying since it makes it harder to help lol.
Anyway, like I said, It's been a while since I've used WinPythons IDE. But there's obviously more to it than you would expect i.e. it can help you get going with COM, right from the menu.
It also has a bunch of editor features that IDLE doesn't have yet, and menu's tend to be layed out differently. So there are a few changes that you need to get used to (especially if you're coming from the command line). Whether or not you need help with that, I guess depends on the person.