Re: bittorent

2007-04-11 Thread Jonathan Smith
Linus Nordström wrote: > Hello > Im planing playing a bit whit bittorrent, but I'm having some trouble > about where to start. So if anyone could point me in the right > direction it would be much appreciated. > The best would be if there are some already written modules that > handle downloading a

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Jonathan Smith
Thomas Ploch wrote: > [EMAIL PROTECTED] schrieb: >> I'm still pretty new to Python. I'm writing a function that accepts >> thre integers as arguments. I need to divide the first integer by te >> second integer, and get a float as a result. I don't want the caller of >> the function to have to pass

Re: Python 2.4.4 vs. 2.3.6

2006-12-27 Thread Jonathan Smith
I would say 2.4.4, since it has the latest bugfixes of the series most distros use. --- Sent with ChatterEmail+ True push email for the Treo Smartphone http://get.chatteremail.com -Original Message- From: [EMAIL PROTECTED] Date: Wednesday, Dec 27, 2006 9:05 pm Subject:

Re: Ensure a variable is divisible by 4

2006-12-05 Thread Jonathan Smith
MRAB wrote: >> if ( x % 4 ) == 0: >> whatever # x is divisible by 4 >> >> modulus is your friend :) >> >> -smithj > > > It's "modulo"; "modulus" is a different operation. > > Wikipedia says "modulus may refer to... %, the modulo operator of various programming languages" http://en.wikip

Re: Ensure a variable is divisible by 4

2006-12-04 Thread Jonathan Smith
> <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I am sure this is a basic math issue, but is there a better way to >> ensure an int variable is divisible by 4 than by doing the following; >> >> x = 111 >> x = (x /4) * 4 >> >> Just seems a bit clunky to me. if ( x % 4 ) == 0:

Re: why would anyone use python when java is there?

2006-11-28 Thread Jonathan Smith
gavino wrote: > wtf Java is a coffee, and coffee comes from exploited Ethiopians (they do have some damn fine coffee, though). Most of us prefer to exploit Englishmen instead. (damn them and their humor!) -smithj -- http://mail.python.org/mailman/listinfo/python-list

Re: Pygtk but no gtk?

2006-10-20 Thread Jonathan Smith
[EMAIL PROTECTED] wrote: > I am trying to build an app that requires pygtk so I installed the > latter. The app does the following: > import pygtk > ... > import gtk > > This crashes with > ImportError: No module named gtk. > > I dont know where to get this gtk module from. I assumed pygtk would

Re:RELEASED Python 2.4.4, release candidate 1

2006-10-16 Thread Jonathan Smith
Anthony Baxter wrote: > On behalf of the Python development team and the Python community, > I'm happy to announce the release of Python 2.4.4 (release candidate 1). When trying to build 2.4.4c1 with cross-compiling, I get the following error. checking for /dev/ptmx... configure: error: cannot

subprocesses, stdin/out, ttys, and beating insubordinate processes into the ground

2006-06-06 Thread Jonathan Smith
First a bit about what I'm trying to do. I need a function which takes a patchfile and patches a source directory. Thats it. However, I need to be able to do so no matter what the patchlevel (-px) of the diff is. So, my solution is to just try to patch until it works or you try a level more tha

Re: How to pass variables between scripts

2006-05-13 Thread Jonathan Smith
Gross, Dorit (SDRN) wrote: > [snip] > for f in fileList: > try: > globvars = {'infile' : f} > locvars = {} > execfile('/scripts/second.py', globvars(), locvars) > except IOError: > exit(0) > print locva