Re: [Tutor] Getting started with PyGTK [Receiving Error]

2012-04-28 Thread Russell Smith
Make sure you installed the theme engine 'pixmap' or whichever gtk package that has the theme engine you are missing. Google search for the gtk packages. Look here http://askubuntu.com/questions/66356/gdk-gtk-warnings-and-errors-from-the-command-lineand you will see a very similar problem with a so

Re: [Tutor] Getting started with PyGTK [Receiving Error]

2012-04-28 Thread Alan Gauld
On 28/04/12 23:48, Santosh Kumar wrote: System Information Ubuntu 11.10 Python 2.7.2 Problem I think my Ubuntu has PyGTK and GTK both already installed. You should be able to confirm that by checking in Synaptic. however when I am importing "gtk" in

[Tutor] Getting started with PyGTK [Receiving Error]

2012-04-28 Thread Santosh Kumar
System Information Ubuntu 11.10 Python 2.7.2 Problem I think my Ubuntu has PyGTK and GTK both already installed. But however when I am importing "gtk" in Python interactive mode then I am getting the following warning: (.:4126): Gtk-WARNING **: Unable to

Re: [Tutor] Tutor Digest, Vol 98, Issue 70

2012-04-28 Thread Dave Angel
On 04/28/2012 11:00 AM, Osemeka Osuagwu wrote: > I use 64bit Windows7 and Python 2.7.2 (upgraded from 2.6.6) > > I downloaded the windows binary from the pygame site > (http://www.pygame.org/download.shtml) and ran it. During the > installation I had to choose install directory, I left it at the >

Re: [Tutor] Tutor Digest, Vol 98, Issue 70

2012-04-28 Thread Osemeka Osuagwu
I use 64bit Windows7 and Python 2.7.2 (upgraded from 2.6.6) I downloaded the windows binary from the pygame site (http://www.pygame.org/download.shtml) and ran it. During the installation I had to choose install directory, I left it at the default option (which created a new folder on my C: drive)

[Tutor] putting an image into a canvas object

2012-04-28 Thread Chris Hare
What I am trying to do is put an image on a canvas object, which I think is allowed. self.picture1 = Canvas(self.pictureFrame,width=150,height=150) self.imageBuffer = StringIO.StringIO() image = Image.open(filename) image = image.resize((150,150),Image.ANTIALIAS) image.save(self.imageBuffer, f

Re: [Tutor] (no subject)

2012-04-28 Thread Alan Gauld
On 28/04/12 14:08, Wei Juen Lo wrote: def menu(): print "Welcome to calculator.py" print "your options are:" print " " print "1) Addition" print "2) Subtraction" print "3) Multiplication" print "4) Division" print "5) Quit calculator.py" print " " return input ("Choose your option: ") def m

Re: [Tutor] PIL and converting an image to and from a string value

2012-04-28 Thread Chris Hare
What I did: self.imageBuffer = StringIO.StringIO() image = Image.open(filename) image = image.resize((150,150),Image.ANTIALIAS) image.save(self.imageBuffer, format= 'PNG') self.imageBuffer.seek(0) image = Image.open(self.imageBuffer) So, that is how I got around the problem On Apr 27, 2012, at

[Tutor] (no subject)

2012-04-28 Thread Wei Juen Lo
here is my code for a calculator: def menu(): print "Welcome to calculator.py"print "your options are:"print " " print "1) Addition"print "2) Subtraction"print "3) Multiplication" print "4) Division"print "5) Quit calculator.py"print " "return input ("Choos