> what would be the best command to end a program with.
> i have an app that i want to start every day at 6am from cron
> but i want it to shutdown at 4pm
>
> i was going to check by time on every loop
>
> if int(time.strftime(%H)) > 4:
> some
looks good for your 1st program. some improvements that i can think of:
1. notice how you repeat blocks of code? specifically, i mean: (ask a
question, get the answer, validate the answer). since this is all
similar code, it's a great place for you to learn what a loop is.
that way, you only h
> > >>> label = 'this is "quoted"'
> > >>> label.replace('"','\"')
> > 'this is "quoted"'
> > ## This works
> > >>> label.replace('"','\'')
> > "this is 'quoted'"
>
>
> What I should have been using is label.replace('"','\\"')
> :-) Nevermind.
hold on a second pardner! :-) what were you t
I must be having a Senior Moment here, but the following
baffles me:
>>> label = 'this is "quoted"'
>>> label.replace('"','\"')
'this is "quoted"'
## This works
>>> label.replace('"','\'')
"this is 'quoted'"
What am I missing here?
thanks
tim
--
Tim Johnson <[EMAIL PROTECTED]>
http://www.a
* Tim Johnson <[EMAIL PROTECTED]> [051207 15:56]:
> I must be having a Senior Moment here, but the following
> baffles me:
> >>> label = 'this is "quoted"'
> >>> label.replace('"','\"')
> 'this is "quoted"'
> ## This works
> >>> label.replace('"','\'')
> "this is 'quoted'"
What I should have
Hi! My first "ever" program that I've created is a simple game called "State
Capitals". It's straight forward; 5 simple questions about state capitals in
a non-GUI format. Can someone look over my code and offer tips, suggestions,
criticism? Also, I'd like to be able to end the program if the us
The IDLE documentation (run idle -h) says that
idle -r file.py
runs the commands in the file.
Is that what you are doing? It looks different to your Win98 version.
> P.S. I do all this to have accentuated characters (French) correctly
> displayed, and this is done in the IDLE Shell, but fail
> Looking for easiest way to get a files permissions in linux.
>
look at the os.stat function.
I'm in the middle of documenting its use but you might like to
peruse the later sections of the following draft topic
http://www.freenetpages.co.uk/hp/alan.gauld/tutos.htm
Alan G
Author of the lear
> > I agree with Danny, the question lacks any evidence of prior
> > investigation on the part of the poster, and that makes it a lousy
> > candidate for the helpful guidance of the python tutor list.
Hi Eric,
It there's something I want to avoid, it's the impression that we're
looking at each q
On Tuesday 06 December 2005 22:23, Liam Clarke-Hutchinson wrote:
> Okay, just checked the docs -
>
> "sendmail( from_addr, to_addrs, msg[, mail_options, rcpt_options])
>
> Note: The from_addr and to_addrs parameters are used to construct the
> message envelope used by the transport agents. The SMTP
On Wed, Dec 07, 2005 at 02:51:55PM -0700, Eric Walker wrote:
> After 4+ hours
> of playing around with this I made the futile post.
Don't let the post be futile! Post what you've tried so far and
you'll get help.
gsf
___
Tutor maillist - Tutor@p
Sorry for the bad question.
I did google and found the same pages that Danny mentioned. Just couldn't get
the stuff to work, or understand what modules needed to be imported to get
them to work. I typically use the tutor list as a last resort. After 4+ hours
of playing around with this I made th
On Wed, Dec 07, 2005 at 11:52:20AM -0800, Danny Yoo wrote:
> On Wed, 7 Dec 2005, Eric Walker wrote:
>
> > Looking for easiest way to get a files permissions in linux.
>
> Hi Eric,
>
> What have you looked at so far?
I agree with Danny, the question lacks any evidence of prior
investigation on t
Hello,
I'd like to have some scripts run directly inside the IDLE shell when I
double click on some properly built shortcut, and not inside the DOS
window. I've managed to do that under win98, but failed in win2000 and
winXP.
I dont' want to have to "run module" inside the idle editor, just di
On Wed, 7 Dec 2005, Eric Walker wrote:
> Looking for easiest way to get a files permissions in linux.
Hi Eric,
What have you looked at so far?
One of the first hits to the Google query "file permission python" comes
up with some good information:
http://www.faqts.com/knowledge_base/view
Looking for easiest way to get a files permissions in linux.
Thanks
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
> a scientist suggested me to try biopython. This point
> is not just with genbank sequences. what will i do if
> i have to parse a paragraph for some expression.
One thing to watch is that re.match() only checks if the pattern
is at the beginning of the line. You should maybe consider using
re
On Wed, 7 Dec 2005, ps python wrote:
> sorry for repost. awaiting to hear from some members. a scientist
> suggested me to try biopython. This point is not just with genbank
> sequences. what will i do if i have to parse a paragraph for some
> expression. thanks again.
Hello,
I just want to
On Wed, 7 Dec 2005, Cedric BRINER wrote:
> does one of you knows if there is a python module which implements
> CAS(Central Authentication Service):
> https://clearinghouse.ja-sig.org/wiki/display/CAS/Home
Hi Cedric,
Not certain, but most likely. See:
http://www.zope.org/Members/mrlex/AC
david said unto the world upon 2005-12-03 20:36:
> hello again. i think my dig function is working correctly now.
> any input on how to save and restore all the rooms and descriptions?
> thanks for helping.
Hi David,
I'm catching up on mail backlog, so I'm a bit late, but I've a
suggestion or tw
On Wed, 7 Dec 2005, ps python wrote:
> I am a new python learner. i am trying to parse a file using regular
> expressions.
Hello,
Just as an aside: parsing Genbank flat files like this is not such a good
idea, because you can get the Genbank XML files instead. For example,
your locus NM_005
sorry for repost. awaiting to hear from some members.
a scientist suggested me to try biopython. This point
is not just with genbank sequences. what will i do if
i have to parse a paragraph for some expression.
thanks again.
hi,
I am a new python learner. i am trying to parse a
file using
Andrzej Kolinski wrote:
>
> Let's forget for the time being my previous topic (files - strings -
> lists). As a result of (not only) my efforts I arrived to the point that
> I have data I need but I do not know how to process them. Form each
> (game) file a dictionary is created containing play
Let's forget for the time being my previous
topic (files - strings - lists). As a result of (not only) my efforts I
arrived to the point that I have data I need but I do not know how to process
them. Form each (game) file a dictionary is created containing player names
(key) and the scores + board
Joseph Quigley wrote:> How do I read xml? The python documentation doesn't help me.
> Or, how can I remove the (tags?) ?If you want to strip out all the tags and just leave the text,Strip-o-Gram might do it.
http://www.zope.org/Members/chrisw/StripOGramThere was a thread here recently about other t
hi,
does one of you knows if there is a python module which implements CAS(Central
Authentication Service):
https://clearinghouse.ja-sig.org/wiki/display/CAS/Home
thanks in advance
Ced.
--
Cedric BRINER
Geneva - Switzerland
___
Tutor maillist - Tu
hi,
I am a new python learner. i am trying to parse a
file using regular expressions.
LOCUS NM_005417 4145 bpmRNA
linear PRI 04-DEC-2005
DEFINITION Homo sapiens v-src sarcoma (Schmidt-Ruppin
A-2) viral oncogene
homolog (avian) (SRC), transcript variant
[EMAIL PROTECTED] wrote:
> Hi,
>
> I have a general question regarding programming style which may or may
> not have an answer. Is it a better practice to have a function raise
> an exception on error, so that the error can be caught; or return a
> status code indicating that the function was uns
> not have an answer. Is it a better practice to have a function raise
> an exception on error, so that the error can be caught; or return a
> status code indicating that the function was unsuccessful?
Exceptions are nearly always better.
For some of the reasons why, see my tutorial topic on Erro
> It has been great for 11ish months, now all my mail is classed as
> spam & junked :(
dave,
i'm a little surprised by this. if your code has been working for
almost a year and suddently breaks, that can only be explained by 1 or
2 things:
1. your code was modified
2. the server was modified
(
30 matches
Mail list logo