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
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 "
wowowow now THAT is what I call simple!
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
Ughhh I feel like such an idiot :(
Thanks for clearing that up it works now.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
Have you though about using threads?
--
http://mail.python.org/mailman/listinfo/python-list
Another option is zsh, which is very much like bash, but better ;)
--
http://mail.python.org/mailman/listinfo/python-list
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
Hi,
Are there any good decompilers for python?
-Thanks
--
http://mail.python.org/mailman/listinfo/python-list
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
Thanks guys! :D
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
Exactly what I'm looking for! Thanks
--
http://mail.python.org/mailman/listinfo/python-list
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
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
I think it depends on your os variables
--
http://mail.python.org/mailman/listinfo/python-list
hmmm..that makes much more sense. thanks :)
--
http://mail.python.org/mailman/listinfo/python-list
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
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
#
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
lol
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
don't you need to install openSSL?
I'm not sure.
--
http://mail.python.org/mailman/listinfo/python-list
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
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.
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
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
I'm curious, why is everyone talking about jesus on comp.lang.python?
--
http://mail.python.org/mailman/listinfo/python-list
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
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?
> | >
> | &
thanks!!
--
http://mail.python.org/mailman/listinfo/python-list
sweet, that twisted thing is exactly what I was looking for :)
-thanks for all the replies
--
http://mail.python.org/mailman/listinfo/python-list
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.
hmm... I guess its not possible as I feared :(
thanks anyways
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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:
> >
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
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
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
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
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
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
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
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
*blinks*
stop spamming asshole
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
Hi,
I'm working on creating an xml structure like the following, as
effiecienty and elegantly as possible using minidom preferably:
#
#
#
#0
#
#
#0
#
#
#
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
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
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
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
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
72 matches
Mail list logo