Re: [Tutor] range() help

2007-04-17 Thread Necmettin Begiter
On Tuesday 17 April 2007 14:42:50 [EMAIL PROTECTED] wrote: > >>> range(-10, -100, -30) > > [-10, -40, -70] > > How come it prints on -40 or -70. > > Does -70 come from -70 -> -100? > from -10 to -100 (excluding -100) -10-30 = -40 -40-30= -70 ___ Tutor mai

Re: [Tutor] sys.argv?

2007-04-17 Thread Jan Erik Moström
Reply to [EMAIL PROTECTED] 07-04-17 07:26: >I've been reading the python tutorial trying to get used to the style >tryna understand it. So I come across this: "sys.argv[0]" in the tutorial >on python.org. What is "sys.argv"? How does it work? Can someone give me >a simple example on how to use

[Tutor] sys.argv?

2007-04-17 Thread python
I've been reading the python tutorial trying to get used to the style tryna understand it. So I come across this: "sys.argv[0]" in the tutorial on python.org. What is "sys.argv"? How does it work? Can someone give me a simple example on how to use it?

[Tutor] Trouble with "RuntimeError: underlying C/C++ object has been deleted".

2007-04-17 Thread Lawrence Shafer
Hello List, I am just learning Python/PyQt4, and have a problem I cannot figure out. Here's what happens. Traceback (most recent call last): File "iac.py", line 124, in on_actionOpen_triggered self.open() File "iac.py", line 66, in open if self.isUntitled and self.textBrowser.documen

[Tutor] Error in my code

2007-04-17 Thread govind goyal
Hi, I am executing following lines of code: def WEP40_KEY(n): params = urllib.urlencode({}) headers = {"Connection": "Keep-Alive","Authorization": ""} conn = httplib.HTTPConnection(HOST) conn.request("GET", "/w_sec.htm HTTP/1.1", params, headers) response = conn.getresponse() print res

Re: [Tutor] 'word jumble' game

2007-04-17 Thread Jason Massey
The main thing your program lacks is flexibility. Adding new puzzles requires chaining together a series of if..else statements and creating variables for each hint. Here's my quick version. I store the puzzles and the hints in a two-tuple sequence. Following this method you could easily add a

Re: [Tutor] sys.argv?

2007-04-17 Thread Rikard Bosnjakovic
On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I've been reading the python tutorial trying to get used to the style > tryna understand it. So I come across this: "sys.argv[0]" in the tutorial > on python.org. What is "sys.argv"? How does it work? Can someone give me > a simple exam

Re: [Tutor] Error in my code

2007-04-17 Thread Mike Hansen
If what you posted is exactly what your code looks like, then you've got an indentation problem. Since Python doesn't use {}'s for code blocks, it uses indentation instead, and it's somewhat picky about indentation. I think all the code after the first conn.request should line up with the conn.req

Re: [Tutor] 'word jumble' game

2007-04-17 Thread Alexander Kapshuk
Hello Everyone, This is Alexander Kapshuk writing here again ... Could you please have a look at the code below and let me know of any shortcuts that could be used there. The code works fine as it is. I was just wandering if there was a better, more compact and elegant way of writing th

[Tutor] range() help

2007-04-17 Thread python
Alright I'm a bit confused when looking at how range works. I'm reading lesson 4.3 in the python tutorial. http://docs.python.org/tut/node6.html I came across this: >>> range(-10, -100, -30) [-10, -40, -70] How come it prints on -40 or -70. Does -70 come from -70 -> -100? This is really confu

Re: [Tutor] range() help

2007-04-17 Thread Jan Erik Moström
Reply to [EMAIL PROTECTED] 07-04-17 07:42: >How come it prints on -40 or -70. > >Does -70 come from -70 -> -100? > >This is really confusing me. I don't really understand your question, the definition of range range(...) range([start,] stop[, step]) -> list of integers Return a list c

Re: [Tutor] sys.argv?

2007-04-17 Thread Rikard Bosnjakovic
On 4/17/07, Kirk Bailey <[EMAIL PROTECTED]> wrote: > IF my memory serves well, argument 0 in that list is the name of the > program itself, as well as the path to it if any was provided. Stop replying to my mailbox. -- - Rikard - http://bos.hack.org/cv/

[Tutor] Learning Python in cooperative, challenging way.

2007-04-17 Thread Giulio 'Mac' Maistrelli
Hello everybody, I hope this is the right place to make this question. If not I would appreciate help in getting pointed towards a different resource... I just began to learn python. It is a nice language to learn, and I am using "dive into python" which is also a nicely written

Re: [Tutor] sys.argv?

2007-04-17 Thread Luke Paireepinart
Rikard Bosnjakovic wrote: > On 4/17/07, Kirk Bailey <[EMAIL PROTECTED]> wrote: > > >> IF my memory serves well, argument 0 in that list is the name of the >> program itself, as well as the path to it if any was provided. >> > > Stop replying to my mailbox. > I really wish this list would

[Tutor] Python Browser based?

2007-04-17 Thread python
How can I used python online. I'm getting my hoster to install python and I'm wondering how Do I use python online? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Browser based?

2007-04-17 Thread Bob Gailer
[EMAIL PROTECTED] wrote: > How can I used python online. I'm getting my hoster to install python and > I'm wondering how Do I use python online? > Could you be more specific? -- Bob Gailer 510-978-4454 ___ Tutor maillist - Tutor@python.org http:/

Re: [Tutor] Python Browser based?

2007-04-17 Thread Teresa Stanton
I would like more information about this as well. I found something on sourceforge about using python modules to run a web cam. I've got the files, but not quite sure how to use the web server. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PR

[Tutor] Python for CGI (was Python Browser based?)

2007-04-17 Thread Bob Gailer
Regarding using Python for CGI - Googling "python cgi" reveals many potentially useful links. These sound http://www.cs.virginia.edu/~lab2q/ www.python.org/doc/essays/ppt/sd99east/sld038.htm -- Bob Gailer 510-978-4454 ___ Tutor maillist - Tutor@pyt

Re: [Tutor] Learning Python in cooperative, challenging way.

2007-04-17 Thread Mike Hansen
> -Original Message- > > To clarify point #2: Python - as any learning - IS > challenging, but as I am > learning it "just for fun" and without any real need to > fulfil, I don't have any > "operational challenge", if that makes any sense in English... :-/ > > So far the best I could

[Tutor] Empty Range for RandRange

2007-04-17 Thread Ellen Kidda
Would someone kindly review the following code and error? This sample program is copied from Python Programming for the Absolute Beginner (2nd ed.) I'm running Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32. (Python 2.3 is the version referenced in this edition.)

Re: [Tutor] Empty Range for RandRange

2007-04-17 Thread Kent Johnson
Ellen Kidda wrote: > Would someone kindly review the following code and error? This sample > program is copied from Python Programming for the Absolute Beginner (2nd > ed.) I'm running Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 > 32 bit (Intel)] on win32. (Python 2.3 is the version

Re: [Tutor] Python Browser based?

2007-04-17 Thread Hugo González Monteverde
Hi, Do you want to: 1) use Python from a website or server without installing it in a computer? 2) use Python to do things with the Internet or servers, website, etc? Hugo [EMAIL PROTECTED] wrote: > How can I used python online. I'm getting my hoster to install python and > I'm wondering how

[Tutor] celcius to farenheit converter.

2007-04-17 Thread python
I found this site and I'm practicing coding and I write this script, but I'm unsure why its not working. Everything goes well until it gets to the part where it tries to calculate the formula. Inputs work fine anyone know what I did wrong? ### #Temperature Convert

Re: [Tutor] sys.argv?

2007-04-17 Thread Rikard Bosnjakovic
On 4/17/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: > I really wish this list would start mungin' some headers already. I second that. Not using a reply-to-tag is braindead. -- - Rikard - http://bos.hack.org/cv/ ___ Tutor maillist - Tutor@pyt

Re: [Tutor] celcius to farenheit converter.

2007-04-17 Thread Rikard Bosnjakovic
On 4/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I found this site and I'm practicing coding and I write this script, but > I'm unsure why its not working. Everything goes well until it gets to the > part where it tries to calculate the formula. Inputs work fine anyone > know what I di

Re: [Tutor] celcius to farenheit converter.

2007-04-17 Thread Luke Paireepinart
Rikard Bosnjakovic wrote: > On 4/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >> I found this site and I'm practicing coding and I write this script, but >> I'm unsure why its not working. Everything goes well until it gets to the >> part where it tries to calculate the formula. Inp