[Tutor] what does the "@" operator mean?

2008-12-17 Thread Daniele
> From: "Alan Gauld" > Subject: Re: [Tutor] what does the "@" operator mean? Thinking it's quite funny, I'll keep on with italian words: the @ is called "chiocciola" which means snail, while # is called "cancelletto" which is a small gate As you see italian words are quite close to the sign shap

[Tutor] sys.path.append

2008-12-17 Thread ppaarrkk
I can do this : >>> sys.path.append ( 'C:\dump1' ) but not : >>> x = 'C:\dir1' >>> sys.path.append(x) or : but not : >>> x = ['C:\dir1'] >>> sys.path.append(x) Can I append variables to the path, rather than explicit strings ? -- View this message in context: http://www.nabble.com/sys.p

Re: [Tutor] sys.path.append

2008-12-17 Thread Kent Johnson
On Wed, Dec 17, 2008 at 10:20 AM, ppaarrkk wrote: > > I can do this : > sys.path.append ( 'C:\dump1' ) Note you should use raw strings r'C:\dump1' or double backslash 'C:\\dump1' because the \ is a string escape character. > but not : > x = 'C:\dir1' sys.path.append(x) That shoul

Re: [Tutor] Lucky Boy Sudhir wants to chat

2008-12-17 Thread Williams, Thomas (DSHS/RDA)
Thank you Tom -Original Message- From: Kent Johnson [mailto:ken...@tds.net] Sent: Wednesday, December 17, 2008 6:52 AM To: Lucky Boy Sudhir Cc: tutor@python.org Subject: Re: [Tutor] Lucky Boy Sudhir wants to chat I have unsubscribed Lucky Boy from the list as he is just spamming it. Ken

Re: [Tutor] what does the "@" operator mean?

2008-12-17 Thread Lie Ryan
On Tue, 16 Dec 2008 01:03:55 +, Alan Gauld wrote: > "Marc Tompkins" wrote > >> If you're just starting out in Python, decorators can be hard to get >> your head around... > > I've been using Python for oover 10 years and still find decorators hard > to get my head around! :-) > > I confess

Re: [Tutor] what does the "@" operator mean?

2008-12-17 Thread Wolfram Kraus
Am 16.12.2008 02:03, Alan Gauld schrieb: "Marc Tompkins" wrote If you're just starting out in Python, decorators can be hard to get your head around... I've been using Python for oover 10 years and still find decorators hard to get my head around! :-) I confess I'm not a fan, they go again

Re: [Tutor] Lucky Boy Sudhir wants to chat

2008-12-17 Thread Kent Johnson
I have unsubscribed Lucky Boy from the list as he is just spamming it. Kent On Wed, Dec 17, 2008 at 7:01 AM, Lucky Boy Sudhir wrote: > --- > > Lucky Boy Sudhir wants to stay in better touch using some of Google's > coolest new

[Tutor] Lucky Boy Sudhir has invited you to open a Google mail account

2008-12-17 Thread Lucky Boy Sudhir
I've been using Gmail and thought you might like to try it out. Here's an invitation to create an account. --- Lucky Boy Sudhir has invited you to open a free Gmail account. To accept this invitation and register for your accou

[Tutor] Lucky Boy Sudhir wants to chat

2008-12-17 Thread Lucky Boy Sudhir
--- Lucky Boy Sudhir wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-4696b4693-d5d69810df-aafd3a6b94976b5f You'll need to

[Tutor] How to exit program without sys.exit()

2008-12-17 Thread David
Hi, I make these silly programs to learn from examples I find on the list. I put a couple together just to practice. I have heard it is not a good idea to use sys.exit() but I can not figure out how to do it. Also any and all comments are welcome. Thanks #!/usr/bin/python import sys _count =

Re: [Tutor] How to exit program without sys.exit()

2008-12-17 Thread wesley chun
> I make these silly programs to learn from examples I find on the list. I put > a couple together just to practice. I have heard it is not a good idea to > use sys.exit() but I can not figure out how to do it. Also any and all > comments are welcome. Thanks david, welcome to Python! it's defin

Re: [Tutor] How to exit program without sys.exit()

2008-12-17 Thread Alan Gauld
"David" wrote put a couple together just to practice. I have heard it is not a good idea to use sys.exit() sys.exit is there to exit from a program so there is absolutely nothing wrong with using it. However the way you are using it is not optimal. A program will terminate or exit by itself

Re: [Tutor] How to exit program without sys.exit()

2008-12-17 Thread David
one other suggestion... you have a lot of functions. it's possible to reduce the total number, esp. since they're pretty much all one-offs. generally, you want to employ functions for code that is used more than once during a single execution of your code. with your app, you can probably get away

Re: [Tutor] How to exit program without sys.exit()

2008-12-17 Thread wesley chun
> I was practicing how to use a global counter and trying to understand > how functions can interact with each other. I can understand if I can > see the error's when I run the program. I know my terminology may be > hard to follow. Also I like your book :) you are well read since you already hav