Re: [Tutor] Regular Expressions: escaping in character classes/character sets

2008-07-07 Thread Kent Johnson
On Mon, Jul 7, 2008 at 1:44 AM, Josh Rosen [EMAIL PROTECTED] wrote: I was browsing through the source code of Django when I found the following regular expression: tspecials = re.compile(r'[ \(\)@,;:\\/\[\]\?=]') Shouldn't this be functionally equivalent to the much more readable:

[Tutor] New to pythong

2008-07-07 Thread Jeremiah Stack
Hello everybody: I am new to this mailing list, and it said that i could the simplest of questions. So i was wondering if anyone could be so kind as to e-mail me a project idea or something to go out an learn to do in python. I don't know any languages, but i am definitely not computer

Re: [Tutor] search path

2008-07-07 Thread Jerry Hill
On Sun, Jul 6, 2008 at 3:47 PM, Robert Johansson [EMAIL PROTECTED] wrote: Running the script file she gets error messages claiming that the textfiles cannot be found when they are to be opened with fileid=file('textfilename.txt','r') even though the same thing works fine on my system. Anyone

Re: [Tutor] New to pythong

2008-07-07 Thread W W
A quick google search for Python tutorial will yeild several results. I recommend Think Python - http://greenteapress.com/thinkpython/ HTH, Wayne On Mon, Jul 7, 2008 at 11:40 AM, Jeremiah Stack [EMAIL PROTECTED] wrote: Hello everybody: I am new to this mailing list, and it said that i

Re: [Tutor] graphs diagrams in python

2008-07-07 Thread Monika Jisswel
I have done well with matplotlib. Thanks for the large options, I went for matplotlib too as I liked it more than the other options, also with my later readings I realized it was the best. Later I will update this discussion with some examples I used. 2008/7/7 Kent Johnson [EMAIL

Re: [Tutor] New to pythong

2008-07-07 Thread Monika Jisswel
you can start with stuff you need like, for example write a program that scans your hard disk tells you the details about pdf, jpg, zip, avi files that you have, with creation date and sizes. when you need help write us. ___ Tutor maillist -

Re: [Tutor] New to pythong

2008-07-07 Thread Marc Tompkins
On Mon, Jul 7, 2008 at 9:40 AM, Jeremiah Stack [EMAIL PROTECTED] wrote: Hello everybody: I am new to this mailing list, and it said that i could the simplest of questions. So i was wondering if anyone could be so kind as to e-mail me a project idea or something to go out an learn to do in

Re: [Tutor] file object in memory

2008-07-07 Thread Monika Jisswel
I didn't know about tempfile.NamedTemporaryFile ! looks nice because you don't care about the file anymore, you just use it. another solution could be to wrap the data (that is each line in the file still in memory) into mysql statements such as 'insert into table (aa, bb, cc) values ( 11,

[Tutor] New to Python

2008-07-07 Thread Robert Berman
Wayne, What he says he is looking for is a programming challenge. Unfortunately, the fact that he feels he is not "computer illiterate" does not tell us what he does know and what he needs to spend considerable time learning. Jerry, There is a web page called "Challenge-You" set up for

Re: [Tutor] New to pythong

2008-07-07 Thread Alan Gauld
Marc Tompkins [EMAIL PROTECTED] wrote First of all, I mean no offense to the OP. However, this question comes up a lot on this list, and it always bugs me. People decide they want to learn Python, and then ask strangers to give them a reason to do it. I know what you mean Marc but I don't

Re: [Tutor] New to pythong

2008-07-07 Thread Nick Scholtes
Thanks for the info on the Think Python book, and thanks Jeremiah, for posing this question. That book is one of the best Python learning resources I've yet found! Makes it really easy to understand! Nick On Mon, Jul 7, 2008 at 12:43 PM, Marc Tompkins [EMAIL PROTECTED] wrote: On Mon, Jul 7,

Re: [Tutor] New to pythong

2008-07-07 Thread bhaaluu
On Mon, Jul 7, 2008 at 12:40 PM, Jeremiah Stack [EMAIL PROTECTED] wrote: Hello everybody: I am new to this mailing list, and it said that i could the simplest of questions. So i was wondering if anyone could be so kind as to e-mail me a project idea or something to go out an learn to do in

Re: [Tutor] New to pythong

2008-07-07 Thread FT
Hi! Yes, Mark had something to say, and so did Alan. Games are a good start, also a home need, or a business need. The way I started Python was games. The Yhatzee game, then my Star Trek game, converted over from the original basic game. Then the battleship game, the board game,

Re: [Tutor] New to python(g)=python g=(embarrassing)

2008-07-07 Thread Jeremiah Stack
Hey I want to thank you all for your patience, suggestions, constructive criticism, and idea builders! I now have good thoughts to start, i will now try some of the suggested tutorials and activities. For me before the sugestions the turorials were like reading the sentence the tree is tall

Re: [Tutor] New to pythong

2008-07-07 Thread FT
Hello everybody: I am new to this mailing list, and it said that i could the simplest of questions. So i was wondering if anyone could be so kind as to e-mail me a project idea or something to go out an learn to do in python. I don't know any languages, but i am definitely not computer

Re: [Tutor] New to python(g)=python g=(embarrassing)

2008-07-07 Thread Marc Tompkins
I did wonder whether there was a joke there... is the Pythong the hot new trend in beachwear? On a creepier note, if you make the mistake of going to python dot com instead of dot org, a Pythong is the least of your worries... eeewww. -- www.fsrtechnologies.com

Re: [Tutor] New to python(g)=python g=(embarrassing)

2008-07-07 Thread Nick Scholtes
Thank you so much for that horrendous imagery. I think I'll go learn C# instead. : ) Nick On Mon, Jul 7, 2008 at 3:28 PM, Marc Tompkins [EMAIL PROTECTED] wrote: I did wonder whether there was a joke there... is the Pythong the hot new trend in beachwear? On a creepier note, if you make

[Tutor] While loop counter

2008-07-07 Thread David
Hi, I am trying to get a while loop that will execute 5 time then stop. #!/usr/bin/python # Filename myfirstclass.py # # A Little digital clock from time_class import Time import sys import time mytime = Time() print Can you tell me the time (24h)? hour = input(Give the hour: ) minute =

Re: [Tutor] While loop counter

2008-07-07 Thread John Fouhy
On 08/07/2008, David [EMAIL PROTECTED] wrote: Hi, I am trying to get a while loop that will execute 5 time then stop. Hi David, The standard pattern is like this: i = 0 while i 5: # the stuff you want to do goes here i = i + 1 Note that if you know exactly how many times you will

Re: [Tutor] While loop counter

2008-07-07 Thread Alan Gauld
David [EMAIL PROTECTED] wrote Hi, I am trying to get a while loop that will execute 5 time then stop. Copngratulations, you have succeeded. Unfortunately nothing happens inside your loop. I suspect you actually want to execute some code 5 times? #counter = 0 #while counter 5 : #counter

[Tutor] python + http authentication (with cherrypy)

2008-07-07 Thread James
Hi All, I'm writing a web application in CherryPy. What a beautiful thing it is to write Python code and get a simple yet powerful web output. :) The web application needs to have some decent level of security and authentication implemented. The big issue here is that the user password is

Re: [Tutor] python + http authentication (with cherrypy)

2008-07-07 Thread Kent Johnson
On Mon, Jul 7, 2008 at 9:10 PM, James [EMAIL PROTECTED] wrote: Hi All, I'm writing a web application in CherryPy. What a beautiful thing it is to write Python code and get a simple yet powerful web output. :) The web application needs to have some decent level of security and authentication

Re: [Tutor] python + http authentication (with cherrypy)

2008-07-07 Thread Reed O'Brien
On Jul 7, 2008, at 9:10 PM, James wrote: Hi All, I'm writing a web application in CherryPy. What a beautiful thing it is to write Python code and get a simple yet powerful web output. :) The web application needs to have some decent level of security and authentication implemented. The big

Re: [Tutor] While loop counter

2008-07-07 Thread David
Thank you John Allen, See the loops section of my tutorial for more about for and while loops. Yes, great tutorial, just getting it to sink in, now thats the problem :) ___ Tutor maillist - Tutor@python.org

[Tutor] How to create array of variants?

2008-07-07 Thread Kelie
Hello group, I'm trying to translate the following VB code into Python and not sure how to create an array of variants. Thanks for your help! VB Code: Sub SetXdata() Dim lineObj As AcadLine Set lineObj = ThisDrawing.ModelSpace.Item(0) Dim DataType(0 To 1) As Integer Dim

Re: [Tutor] How to create array of variants?

2008-07-07 Thread John Fouhy
On 08/07/2008, Kelie [EMAIL PROTECTED] wrote: I'm trying to translate the following VB code into Python and not sure how to create an array of variants. I'm not sure what an array of variants in VB is -- perhaps an array that can contain objects of any type? Python code import array You

[Tutor] line class

2008-07-07 Thread Christopher Spears
For problem 13-6 out of Core Python Programming, I created a line class that consists of two points. The line class has the following methods: __repr__, length, and slope. Here is the code: #!/usr/bin/python import sys,math class Point(object): def __init__(self, x=0.0,y=0.0):