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 solution which I bet will
help you.

Cheers

On Saturday, April 28, 2012, Alan Gauld wrote:

> 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 Python interactive mode then I am
>> getting the following warning:
>>
>> (.:4126): Gtk-WARNING **: Unable to locate theme engine in
>> module_path: "pixmap",
>>
>> On the other side, importing "PyGTK" works well. What might be error?
>>
>
>
> What exactly does that mean? Do you mean yhou get no errors? Does it mean
> you can execute some sample code?
>
> The warnings above may not be serious, does gtk work in the sense of
> executing code? What happens if youi do help(gtk) ?
>
> However, Gtk is not a mainstream package for beginners to Python and not
> part of the standard library and that's what this list is focused on. You
> might get more detailed help on a pygtk forum, or maybe even a generic GTk
> forum since the error probably refers to some basic GTk feature. It
> certainly isn't a pure python issue.
>
> This page has some suggestions:
>
> http://www.pygtk.org/feedback.**html 
>
>
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
> __**_
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] more help with vitualenv

2012-04-27 Thread Russell Smith
http://pypi.python.org/pypi/virtualenv/1.7.1.2

Read the page at the link above. You will find it.

On Friday, April 27, 2012, Ivor Surveyor wrote:

>
> As suggested I visited the site virtualenv.  However I could not find the
> files for download and to install on my machine.
> Could I please ask for further guidance on how to proceed?
>
> Ivor Surveyor
> isurve...@vianet.net.au
> __**_
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Pygame installation problems

2012-04-27 Thread Russell Smith
I would google 'pygame download' and look at the first hit. You are right
to add the import but you need to download the files still.

On Friday, April 27, 2012, Osemeka Osuagwu wrote:

> Hi,
> I started learning Python recently, having only very little programming
> experience. I installed Pygame and tried using
>
> >import pygame
>
> to test the installation and got the following error in return;
>
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named pygame
>
> Please does this mean I didn't install pygame correctly?
> How do I get it to work.
>
> Thanks,
>
> eMeka.
>
>
> --
> *We have enough for our need but not enough for our greed.*
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


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

2012-04-27 Thread Russell Smith
What did you do?

On Friday, April 27, 2012, Chris Hare wrote:

>
> I got it figured out.
>
> On Apr 27, 2012, at 12:21 AM, Chris Hare wrote:
>
> >
> > Here is what I am trying to:
> >
> > the application user chooses an image file.  I want to store the image
> data in a field in a sqlite database.  My understanding from the reading I
> have done is that I have to convert the image data into a string , which I
> can then store in the database.  Additionally, I need to be able to take
> the stored image data and convert it back to an image  so I can display it
> in a canvas widget.  I am using the python imaging library
> >
> > I think I have the following parts correct:
> >
> > image = Image.open("cover.jpg")
> > image = image.resize((150,150),Image.ANTIALIAS)
> > png = image.tostring("PNG")
> >
> > I am taking the image data from the file, resizing the image, and then
> using the PNG coder to force it into a PNG format image and converting it
> to a string.
> >
> > I am stuck however, in figuring out how to take the string data and
> converting it back to an image that I can put into the canvas widget.
>  Either I am not finding a good explanation of how to do this or I am just
> not understanding what I am finding:-)
> >
> > Any ideas are appreciated!
> >
> > Thanks,
> > Chris
> >
> > ___
> > Tutor maillist  -  Tutor@python.org 
> > To unsubscribe or change subscription options:
> > http://mail.python.org/mailman/listinfo/tutor
>
> ___
> Tutor maillist  -  Tutor@python.org 
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Help - server health check reporter

2010-09-30 Thread Russell Smith
Hey guys,



I’m trying to put together a script using urllib2, smtplib and
stripogram/html2text which will use a healthcheck url, read the response
after loading it and then email me the results without any unwanted html
tags. I was able to do that but, when I get a timeout on one of the servers
the script breaks with an error response. I’m very new to python and I don’t
know how to take that error and have it sent as well, instead of breaking
the script. Any advice or links I can check out that might be helpful? I
appreciate it.


I can include the python code if needed though at this point I'm sure it is
not very "pythonic". {smile}


Regards,

-russ
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor