Re: socket.gaierror: (-2, 'Name or service not known')

2006-12-27 Thread flamesrock
Ahh that works! thanks a bunch Gabriel Gabriel Genellina wrote: > At Thursday 28/12/2006 00:11, flamesrock wrote: > > > >The problem is that, while the login opener works, the > >update_city_params opener does not. It returns the following error: > >[EMAIL PROTECT

socket.gaierror: (-2, 'Name or service not known')

2006-12-27 Thread flamesrock
em is that, while the login opener works, the update_city_params opener does not. It returns the following error: [EMAIL PROTECTED] ~/send $ python send.py Traceback (most recent call last): File "send.py", line 14, in ? opener.open(url, update_city_params) File "

Re: Problem involving sets...

2006-04-15 Thread flamesrock
wowowow now THAT is what I call simple! -- http://mail.python.org/mailman/listinfo/python-list

Problem involving sets...

2006-04-14 Thread flamesrock
Kind of a fun but confusing problem... I have two lists. Each list contains elements of two-element lists. l1 = [['c1',1],['c2',2],['c3',4]] l2 = [['c1',1],['c2',2],['c4',4],['c3',3]] Exactly in this format, where superlist[0][0] is always a string superlist[0][1] is always an integer Now what I

Re: best way to install python modules on linux

2006-04-07 Thread flamesrock
You should consider gentoo as it big on python with all the latest packages. And no, installing doesn't take much effort. -- http://mail.python.org/mailman/listinfo/python-list

Can't Delete a Thread

2006-04-06 Thread flamesrock
ly close, while, for some reason I am able to terminate AddRegionToServerThread. Any ideas on why? I've tried a combination of things and yet nothing works. Any help would be greatly appreciated. -Thanks Flamesrock -- http://mail.python.org/mailman/listinfo/python-list

Re: XMLRPCLIB appears to be broken?

2006-04-06 Thread flamesrock
Ughhh I feel like such an idiot :( Thanks for clearing that up it works now. -- http://mail.python.org/mailman/listinfo/python-list

Re: XMLRPCLIB appears to be broken?

2006-04-06 Thread flamesrock
Thanks for the response. I'm using IXR_library, which is one of the defato xml-rpc libs out there. It seems to be working for other people... The reason I think its a python error is because php doesn't understand lists, which is what the data is being returned as. -- http://mail.python.org/mai

XMLRPCLIB appears to be broken?

2006-04-05 Thread flamesrock
Hi, I'm running xmlrpclib on python 2.4.2. The problem: When I pass arguments via xmlrpclib, it passes the args as a list to the first variable. Take this example (function should return second of two arguments, but always returns '') >>server = >>xmlrpclib.ServerProxy('http://simcitysphere.com

Re: A way to read shelves quickly?

2006-04-05 Thread flamesrock
Have you though about using threads? -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: unix newbie questions

2006-04-05 Thread flamesrock
Another option is zsh, which is very much like bash, but better ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Decompilers?

2006-04-05 Thread flamesrock
Thanks, guys! Sorry if my question confused anyone :/ I was hoping to find something better then decompyle, since I've had limited success with it.. -- http://mail.python.org/mailman/listinfo/python-list

Python Decompilers?

2006-04-04 Thread flamesrock
Hi, Are there any good decompilers for python? -Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: What's The Best Editor for python

2006-03-24 Thread flamesrock
I agree, Kate is a great linux editor! On windows, I'd have to say notepad2- kate for windows -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pop random item from a list?

2006-03-10 Thread flamesrock
Thanks guys! :D -- http://mail.python.org/mailman/listinfo/python-list

How to pop random item from a list?

2006-03-09 Thread flamesrock
Hi, It's been a while since I've played with python. My question is... whats the best way to pop a random item from a list?? -Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-25 Thread flamesrock
The best, in my opinion is wxPython. I recommend getting wxGlade and just fiddling around. You should be able to produce some interesting GUI's fairly easily. -- http://mail.python.org/mailman/listinfo/python-list

Re: Django Vs Rails

2005-09-07 Thread flamesrock
Wow- thanks for all of the replies. I'm torn. On the one hand, I'm fluent in Python and love it. On the other, Rails seems to have a brighter future, and is a bit more featureful (at this time.) However the only Ruby I know is what I've already learnt with Python(even though I would like to learn

Re: Django Vs Rails

2005-09-05 Thread flamesrock
Thanks for the links, gene tani. D H, 'flamesrock' refers to the Calgary Flames, not the act of flaming. -- http://mail.python.org/mailman/listinfo/python-list

Django Vs Rails

2005-09-05 Thread flamesrock
Firstly, this topic is NOT intended for trolling or starting any flame wars. I want to know if anyone has experience with these frameworks, and if so, how do they compare? Which one do you prefer? Going back to school in a few days, I simply don't have the time to try both. -thanks http://djan

Integrating a wx.App to a Panel (elegantly)

2005-07-07 Thread flamesrock
Perhaps one of you more experience wxPythoners can assist me. I have two seperate programs and basically I want to integrate program 2, which inherits from wx.App to a wx.Panel on the original program. Is there an elegant way to do this without carefully surgically inserting wx.App 2 into wx.App

Help with wx.PaintDC

2005-07-06 Thread flamesrock
wxGlade has made this tooo easy for me so far. But right now I'm very confused about something: self.bmp = wx.Bitmap('sample.bmp') dc = wx.PaintDC(self.notebook_region_overview) dc.DrawBitmap(self.bmp,0,0,False) self.notebook_region_overview is basically a wx.Panel, loc

Re: Considering moving from Delphi to Python [Some questions]

2005-07-04 Thread flamesrock
The curve may take a while, but I'd definately recommend it. While you're at it, why not switch th front end to python too? -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining actual elapsed (wall-clock) time

2005-07-02 Thread flamesrock
I've needed to do something similar in the past and used free ntp servers. Of course you need an internet connection: http://ntp.isc.org/bin/view/Servers/NTPPoolServers http://www.nightsong.com/phr/python/setclock.py You could also have a startup script spawn a thread that stores the time persiste

Re: wxPython: Terminal Output -> Scrollable Panel?

2005-07-02 Thread flamesrock
Exactly what I'm looking for! Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython: Terminal Output -> Scrollable Panel?

2005-07-02 Thread flamesrock
n possible without entering the function calls directly into a pycrust like terminal? Maybe I'm trying to do the wrong thing. Thanks Peter Hansen wrote: > flamesrock wrote: > > I want to make it so that clicking on a button that performs an > > operation will output it to th

wxPython: Terminal Output -> Scrollable Panel?

2005-07-02 Thread flamesrock
First, I'm very new to gui programming, so please go lightly on me :) Ok, so far I've settled on wxPython, and what I'd like to do as a first leap is *convert* a text program into a gui program. It would have a few buttons as function controls and one main scrollable panel that acts like a termina

Re: reg php.ini equivalent file in python

2005-06-07 Thread flamesrock
I think it depends on your os variables -- http://mail.python.org/mailman/listinfo/python-list

Re: easiest way to split a list into evenly divisble smaller lists, and assign them to variables?

2005-06-06 Thread flamesrock
hmmm..that makes much more sense. thanks :) -- http://mail.python.org/mailman/listinfo/python-list

easiest way to split a list into evenly divisble smaller lists, and assign them to variables?

2005-06-05 Thread flamesrock
Lets say I have a list containing 12, 13, 23 or however many entries. What I want is the greatest number of lists evenly divisible by a certain number, and for those lists to be assigned to variables. This leads to a few problems.. If I don't know the length of the list beforehand, I can't create

Question about Object Oriented + functions/global vars?

2005-06-05 Thread flamesrock
ok, so to my knowledge, object oriented means splitting something into the simplest number of parts and going from there. But the question is- when is it enough? For example I have the following code: #def put_file(file_id, delete=False): #""" Function to put the file on the FTP Server #

Re: running tkinter

2005-05-31 Thread flamesrock
I'm having the same problem (latest gentoo 2005.0) and I've installed the tcl and tk languages. -- http://mail.python.org/mailman/listinfo/python-list

Re: convert a string to tuple

2005-05-31 Thread flamesrock
lol -- http://mail.python.org/mailman/listinfo/python-list

Re: how to prepend string to a string?

2005-05-31 Thread flamesrock
Thanks for all the responses :) You're right, Kent. That does exactly what I need it to. Anyways.. if there isn't a prepend function, I'm going to request it from the devs. Would be cool to see that in future versions of python. -- http://mail.python.org/mailman/listinfo/python-list

how to prepend string to a string?

2005-05-30 Thread flamesrock
so I know you can append a string. But how do you *prepend* a string, as shown in the following code #dirList = ['depth1','depth2','depth3'] #string = """position""" #for x in len(dirList): # string += '>> %s'%dirList.pop()#() # to return position>> depth1 >> depth2 >> depth3 r

Re: how to accomplish dl progress bars?

2005-05-27 Thread flamesrock
thanks! I didn't realize it was in the cookbook: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639 -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 and SSL

2005-05-25 Thread flamesrock
don't you need to install openSSL? I'm not sure. -- http://mail.python.org/mailman/listinfo/python-list

how to accomplish dl progress bars?

2005-05-25 Thread flamesrock
Certain web applications, everything from wget to downloader for X has this nifty feature I'd like to accomplish in python. Its the progress bar/time elapsed/time remaining scheme Filename | Progress| Speed (kB/s) | T/Elapsed | T/Remaining

Re: Python on a public library computer

2005-05-16 Thread flamesrock
Panix.com seems a little on the expensive side.. 10$/mo? Roy Smith wrote: > Timothy Smith <[EMAIL PROTECTED]> wrote: > > there's a few (brave) public access unix shell providers out there. if > > you could run telnet you could use them > > If you want to go that route, I highly suggest panix.com.

Re: Python RPM and CentOS

2005-05-16 Thread flamesrock
I know that gentoo has support for local repositories, and emerge is built on python so...this would make sense. But there is a difference between rpms and ebuilds.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Like Christ PBBUH Prayed

2005-05-16 Thread flamesrock
I don't understand.. why is everyone talking about christ on comp.lang.python? Isn't this not the place? -- http://mail.python.org/mailman/listinfo/python-list

Re: BluWater: God is not a man

2005-05-11 Thread flamesrock
I'm curious, why is everyone talking about jesus on comp.lang.python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Documentation (should be better?)

2005-05-11 Thread flamesrock
I don't know what you guys are talking about!! In idle: help(module) I love the way python handles documentation. Its not invansive -- http://mail.python.org/mailman/listinfo/python-list

Re: windows directories for curr user

2005-05-11 Thread flamesrock
con ImportError: No module named win32com.shell Tim Golden wrote: > [Dan Bishop] > | flamesrock wrote: > | > Hi, > | > > | > Short, maybe newbish question: Is there a python method for finding > | out > | > who the current user is in the OS module? > | > > | &

Re: windows directories for curr user

2005-05-10 Thread flamesrock
thanks!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Bandwith Shaping

2005-05-10 Thread flamesrock
sweet, that twisted thing is exactly what I was looking for :) -thanks for all the replies -- http://mail.python.org/mailman/listinfo/python-list

windows directories for curr user

2005-05-10 Thread flamesrock
Hi, Short, maybe newbish question: Is there a python method for finding out who the current user is in the OS module? On older windows machines the directory I'm interested in is just "c://my documents", but how do I walk to the current users my documents folder? -thanks -- http://mail.python.

Re: python+windows/linux -> write stdout text to always on top text?

2005-05-04 Thread flamesrock
hmm... I guess its not possible as I feared :( thanks anyways -- http://mail.python.org/mailman/listinfo/python-list

Bandwith Shaping

2005-05-04 Thread flamesrock
Just curious - is there an easy way to shape bandwith in python. If I wanted to have a max download speed for instance -thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: python+windows/linux -> write stdout text to always on top text?

2005-05-03 Thread flamesrock
I'm writing a multiplayer component to an existing closed source game, and I'd like users to be able to see whats going on in the chat while playing the game. Is it possible? -- http://mail.python.org/mailman/listinfo/python-list

python+windows/linux -> write stdout text to always on top text?

2005-05-02 Thread flamesrock
Hi, I'm curious if theres a way in python to write stdout text to the screen (ie top right) the way they do in some FPS games, so that its always on top, in an invisible window of some set dimensions. No matter what program is on top. Is there a way to make it cross platform? I've looked but not

Python Client & Loggin into Secure User Database

2005-04-28 Thread flamesrock
First, my problem doesn't make much practical sense so I hope you're up for a challenge. What I have (in concept) is a standalone web client that connects different 'players' to a central host and distributes game files between them. A user claims certain files, plays them, and then automatically

Re: storing large amounts of data in a list/dictionary

2005-03-11 Thread flamesrock
liers wrote: > flamesrock a écrit : > > Hi, > > > > Basically, what I'm trying to do is store large amounts of data in a > > list or dictionary and then convert that to a custom formatted xml > > file. > > > > My list looks roughly like this: > >

storing large amounts of data in a list/dictionary

2005-03-11 Thread flamesrock
Hi, Basically, what I'm trying to do is store large amounts of data in a list or dictionary and then convert that to a custom formatted xml file. My list looks roughly like this: (d[],r[c[d[p[],p[R,C,I) My question is, would it be faster to use a dictionary if the elements of the lists have

Re: Question about 'None'

2005-01-27 Thread flamesrock
Wow! Thanks for all the replies. I'll have to reread everything to absorb it. The test code is pretty simple: if 2 > None: print 'true' else: print 'false' It prints false every time. I should also mention that I'm using version 2.0.1 (schools retro solaris machines :( ) At home (version 2.3.4) i

Question about 'None'

2005-01-27 Thread flamesrock
Well, after playing with python for a bit I came across something weird: The statement (1 > None) is false (or any other value above 0). Why is this? (The reason I ask is sortof unrelated. I wanted to use None as a variable for which any integer, including negative ones have a greater value so t

Re: EOF for binary?

2005-01-08 Thread flamesrock
ahh..that does make sense. But maybe getsize() should have a way of inferring what file is specified. I might actually submit a request.. -- http://mail.python.org/mailman/listinfo/python-list

Re: EOF for binary?

2005-01-07 Thread flamesrock
Thanks! I don't know why, but the most innefficient and unmaintanable means of doing something usually pops into my head before anything else. I solved this by going elif len(header) < 8: break -- http://mail.python.org/mailman/listinfo/python-list

EOF for binary?

2005-01-07 Thread flamesrock
2, in getsize #return os.stat(filename).st_size #TypeError: coercing to Unicode: need string or buffer, file found for me. -thanks in advance flamesrock -- http://mail.python.org/mailman/listinfo/python-list

PIL: Quick Question

2005-01-05 Thread flamesrock
Hi, Is there a method (or trick) in the PIL to set to set the alpha channel of a png to zero? I can't find it in the handbook. -thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread flamesrock
Well, I'm not a seasoned programmer like you but I have to say Python is the singlebest language I've worked with to date. In a matter of weeks I learned to do things that took me months in other languages and even found the process enjoyable. Maybe you are right. If so, couldn't Python be forked

Re: FS: PC Doctor

2005-01-03 Thread flamesrock
*blinks* stop spamming asshole -- http://mail.python.org/mailman/listinfo/python-list

Re: Howto Extract PNG from binary file @ 0x80?

2005-01-03 Thread flamesrock
omg, it works!! thankyou! and thankyou again, Frederick for the original code! I've discovered a weird thing when changing header = infile.read(8) to header = infile.read(4): For some reason, the extracted png image is the exact same size as the savegame archive (10.1 megs.) When reading 8byte

Re: Howto Extract PNG from binary file @ 0x80?

2005-01-03 Thread flamesrock
Hmm...I'm not sure exactly. One of the things I've read is that sometimes stuff is compressed in a savegame file, but I don't know why they'd do that with a png.. I have some code that does the exact same thing in php only I don't understand php syntax and how they did it. Does it give any clues a

Re: Howto Extract PNG from binary file @ 0x80?

2005-01-03 Thread flamesrock
Well, I've been working on getting this code to work, and I think I *almost* have it... First, according to ghex, it seems the PNG starts at the 97th byte of the file infile = open("mysimcityfile.sc4", "rb") infile.seek(97) print (infile.read(4)) output: [EMAIL PROTECTED]:~/score$ python sc4png.py

Re: XML: Better way to accomplish this?

2005-01-03 Thread flamesrock
Good idea! Thanks Also, besides the document structure (I appreciate comments on that too, of course,) do you think the code is efficient for xml? Any special tricks you know of? -thanks -- http://mail.python.org/mailman/listinfo/python-list

XML: Better way to accomplish this?

2005-01-02 Thread flamesrock
Hi, I'm working on creating an xml structure like the following, as effiecienty and elegantly as possible using minidom preferably: # # # #0 # # #0 # # #

Re: Confusion About Classes

2005-01-01 Thread flamesrock
self.createUniversalConfig() uFile = self.createUSERfile() pFile = self.createPASSfile() ftp.storlines('STOR score.conf', sConfig) try: ftp.cwd(self.absCFGpath + '/files') except ftplib.error_perm: #*if dir doesn't exist ftp.mkd('files') ftp.cwd(self.absCFGpath + '/files') #change to config directory ftp.storlines('STOR uFile.enc', uFile) ftp.storlines('STOR pFile.enc', pFile) sConfig.close() uFile.close() pFile.close() print "OK" print "Files:" print ftp.retrlines('LIST') finally: print "Quitting..." ftp.quit() except: traceback.print_exc() #--- #--- #--- -thanks, flamesrock -- http://mail.python.org/mailman/listinfo/python-list

Re: Confusion About Classes

2004-12-29 Thread flamesrock
Thanks for the responses! And sorry for the late reply, I had to force myself away from the computer for a day. M.E.Farmer, Yes I've been having a little bit of trouble with name spaces, but this self thing is actually starting to make sense the more I think about it -- I hadn't thought too much a

Confusion About Classes

2004-12-27 Thread flamesrock
Hi, I've been playing like mad with all sorts of python modules..but I still can't seem to get my head around the proper use of a class and self. The question stems from this code I made(snippet): -- import httplib

Re: Configuration Files

2004-12-26 Thread flamesrock
thanks for the replies, guys! MEFarmer, that example helps remove a lot of the confusion, thanks! I've looked through the SDL but there are so many different ways to do it, I wasn't which one was hands down best And Mike, I wish they would stick explanations like that in the SDL! Would help make

Howto Extract PNG from binary file @ 0x80?

2004-12-11 Thread flamesrock
Hi, As a newbie to the language, I have no idea where to start..please bare with me.. The simcity 4 savegame file has a png image stored at the hex location 0x80. What I want to extract it and create a file with the .png extension in that directory. Can somebody explain with a snippet of code ho