X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Ignazio Di Napoli <neclepsio@gmail.com>
Subject:  Using PyGTK on Cygwin
Date:  Sun, 10 Jun 2007 11:48:01 +0200
Lines: 44
Message-ID: <f4ghcd$ut8$1@sea.gmane.org>
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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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 <module>
     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/

