Re: [Tutor] Multi-line comments?

2007-06-06 Thread Khamid Nurdiev
You could use Kwrite and select the to be commented part and use the keys Ctrl + D and to uncomment Ctrl + Shift + D. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Multi-line comments?

2007-06-06 Thread roberto
take care about the first MUST be indented at the appropiated level, the end one and the comment body may be placed where u want http://softwareetal.blogspot.com/2007/06/python-comments.html ___ Tutor maillist - Tutor@python.org http://mail.python

Re: [Tutor] Multi-line comments?

2007-06-06 Thread John Fouhy
On 07/06/07, Brad Tompkins <[EMAIL PROTECTED]> wrote: > Is there a way to make use of multi-line comments when programming using > python? Having to stick a # in front of every line gets pretty tedious when > I want to make a comment more detailed than I normally would. > > If there isn't a way, c

Re: [Tutor] Multi-line comments?

2007-06-06 Thread Paulo Nuin
Hi Brad Use something like this '''your comments here''' Three single quotes will do it. HTH Paulo Brad Tompkins wrote: > Hello everyone, > > This may seem like a pretty basic question but it's driving me crazy. > > Is there a way to make use of multi-line comments when programming > using p

[Tutor] Multi-line comments?

2007-06-06 Thread Brad Tompkins
Hello everyone, This may seem like a pretty basic question but it's driving me crazy. Is there a way to make use of multi-line comments when programming using python? Having to stick a # in front of every line gets pretty tedious when I want to make a comment more detailed than I normally would

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread David Heiser
or.. def is_yes(question): while True: try: s = raw_input(question).lower()[0] if s == 'y': return True elif s == 'n': return False except: pass ## This traps the condition where a user

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread scott
Danny Yoo wrote: > Double check the definition of mfile_read(). It has a possible type > error in terms of the values it returns back to the user. Oh, I see. I forgot to change the "if file does not exist part" when i changed the other half. I have changed it and is seems to work when there i

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread scott
Alan Gauld wrote: > You never change i so this is always true. > Therefore you can express that better with... Thanks for your suggestions, I put together the following based on them: ## def is_yes(question): while True: s = raw_input(questi

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread Danny Yoo
On Wed, 6 Jun 2007, scott wrote: > Danny Yoo wrote: >> In the context of the new Master_stats class, it makes more sense for >> mfile_read() to return a Master_stats object now rather than a two-tuple >> list. > I was able to change the [year, month] to just master and it worked fine. I > w

Re: [Tutor] [OT] Urgent Help Needed

2007-06-06 Thread Alan Gauld
"Stephen Nelson-Smith" <[EMAIL PROTECTED]> wrote > My lead developer has suffered a bereavement, and I need a SQL > expert, > or programmer who could accomplish the porting. This being the tutor list, you are more likely to get a SQL expert on the main comp.lang,python list and of course the da

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread Alan Gauld
"scott" <[EMAIL PROTECTED]> wrote > added one in. I assume that it is good programming practise to > close > all open files when they are not needed anymore? Yes, its good practice. > I wrote the is_yes as follows and it seems to work fine. Almost, but not quite ideal, see below: >

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread scott
Danny Yoo wrote: In the context of the new Master_stats class, it makes more sense for mfile_read() to return a Master_stats object now rather than a two-tuple list. I was able to change the [year, month] to just master and it worked fine. I was also able to do master = mfile_read() and it wor

Re: [Tutor] lists - append - unique and sorted

2007-06-06 Thread Kent Johnson
roberto wrote: > hi, > > can i append a item to a list using criterias: > > - UNIQUE - if there already exist don't append if item not in lst: lst.append(item) "item not in lst" uses a linear search so performance deteriorates as len(lst) grows. If you don't care about the order of elements in

Re: [Tutor] lists - append - unique and sorted

2007-06-06 Thread Thorsten Kampe
* roberto (Wed, 6 Jun 2007 17:17:05 +0200) > can i append a item to a list using criterias: > > - UNIQUE - if there already exist don't append test whether it's already in the with "in" or use sets > and/or > > - SORTED - INSERT in the correct place using some criteria? insert and then sort a

[Tutor] lists - append - unique and sorted

2007-06-06 Thread roberto
hi, can i append a item to a list using criterias: - UNIQUE - if there already exist don't append and/or - SORTED - INSERT in the correct place using some criteria? tks in advance ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman

Re: [Tutor] [OT] Urgent Help Needed

2007-06-06 Thread Stephen Nelson-Smith
On 6/6/07, Tim Golden <[EMAIL PROTECTED]> wrote: > You might want to mention the database (or databases) in > question. Given the short timeframes, people'd feel more > confident if it was the system they're familiar with. Sorry yes. We have an old (primitive) accounts system, which is basically

Re: [Tutor] [OT] Urgent Help Needed

2007-06-06 Thread Tim Golden
Stephen Nelson-Smith wrote: > Hello friends, > > I urgently need to get hold of someone who can help me with the > closing stages of a database project - porting data from an old system > to a completely rewritten schema. > > My lead developer has suffered a bereavement, and I need a SQL expert,

[Tutor] [OT] Urgent Help Needed

2007-06-06 Thread Stephen Nelson-Smith
Hello friends, I urgently need to get hold of someone who can help me with the closing stages of a database project - porting data from an old system to a completely rewritten schema. My lead developer has suffered a bereavement, and I need a SQL expert, or programmer who could accomplish the por

Re: [Tutor] example of spawn

2007-06-06 Thread Rikard Bosnjakovic
On 6/6/07, Martin Walsh <[EMAIL PROTECTED]> wrote: > I can't think of a windows parallel to /dev/null. "nul". Try "dir > nul" in a command shell. -- - Rikard - http://bos.hack.org/cv/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/ma

Re: [Tutor] example of spawn

2007-06-06 Thread Tim Golden
Martin Walsh wrote: > '/dev/null' is a special file in a *nix environment that discards any > data written to it: http://en.wikipedia.org/wiki//dev/null > I can't think of a windows parallel to /dev/null. Merely for completeness, the windows (sort of) equivalent is the little-known NUL special fil