X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Ignazio Di Napoli Subject: Using PyGTK on Cygwin Date: Sun, 10 Jun 2007 11:48:01 +0200 Lines: 44 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi everyone. I'm a very newbie with Python: while I was looking for a way to add a simple GUI to a bash script, I found PyGTK and it looked perfect for my aim. So, I checked that Python and PyGTK were installed and updated through Cygwin setup, and everything was fine. I wrote this simple "hello world" script and tried to run: --- import gtk #Global variable 'count' stores the number of button clicks count = 0 def button_pressed_cb(button): global count count += 1 print "Hello again - the button was pressed: ", count, " time(s)." window = gtk.Window() window.set_title("Hello World!") button = gtk.Button("Press me") button.connect("clicked", button_pressed_cb) window.add(button) window.connect("delete-event", gtk.main_quit) window.show_all() gtk.main() --- It stops on the first line: Traceback (most recent call last): File "prova.py", line 1, in import gtk ImportError: No module named gtk Can please anyone help me? Thank you, Ignazio -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/