[Tutor] HELP: wxPython, adding items to combo box?

2005-07-04 Thread Aaron Elbaz
The simplest way I can explain this: I have a settings wxPython settings dialog, which contains a 'servers' combo box. I also have a shelf object that 'remembers' values entered into the ComboBox. The current value is stored as shelf['SERVER'] and the old values are kept in a list at shelf['OLD_SER

[Tutor] Help: Possible to Pickle and Image?

2005-06-04 Thread Aaron Elbaz
Hi again :), My goal is to store an image file with lots of information relating to the image and the file it was extracted from, persistantly. Pickle seems like a really easy way to do this. So I'm wondering, is it possible to serialize things like images into a pickle? How do I do it? If not,

[Tutor] Help: wget-- how does it work?

2005-05-27 Thread Aaron Elbaz
One of my favourite unix applications is wget. Thinking how easy (and fun) it might be to implement with pythons excellent librairies has led me to a few questions. First, I found the progress bar class from aspn http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639 This could be used t

[Tutor] help: space formatting for multiplication table

2005-05-14 Thread Aaron Elbaz
I've been racking my brain and am right now feeling nauseous from not being able to figure out such a simple problem. Here's the code: #r=10 #line=1 # #def spaces(r): #return r/10 # #while line-1 < r: #for i in range(r): #print str((i+1)*line) + ' '*spaces(r), #line=line+1 #

[Tutor] #NameError: global name is not defined

2005-05-12 Thread Aaron Elbaz
Hi, I'm having difficulty understanding why the following code doesn't work: getfr.py #import pymetar # #class wReport: #def __init__(self,metarcode="CYYC"): #weather for calgary INTL #self.METARCODE=metarcode #rf=pymetar.ReportFetcher(self.METARCODE) #rep=rf.FetchRep

[Tutor] Text Directly to Screen?

2005-05-03 Thread Aaron Elbaz
Hi, My question has to do with outputting text. Normally, you ouput to a console or a gui...but for my task, a hack might be needed.. What I want to do is output text *directly* to the screen. And if possible, restrict the window area to specific dimensions (top right in mind). It should basical

[Tutor] Extracting a PNG Image File from a Binary File..

2005-01-03 Thread Aaron Elbaz
Hi, My question is sort of on the difficult side, but I promise I'm a newb ;) So maybe it isn't.. Frederick Lundh himself gave me this chunk of code..and I can't get it to work. I was hoping someone could spot the error. The goal is to extract a png image file from a binary simcity 4 file. #imp