Stephen Nelson-Smith wrote:
> On 9/20/07, cedric briner <[EMAIL PROTECTED]> wrote:
>
>> To let you know, I'm writing a script to generate bind9 configuration
>> from a nis hosts table. So I was trying in a one re to catch from this:
>>
>> [ ...] [# comment]
>> e.g:
>> 10.12.23.45 hostname1 alia
Kent Johnson wrote:
> cedric briner wrote:
>> To let you know, I'm writing a script to generate bind9 configuration
>> from a nis hosts table. So I was trying in a one re to catch from this:
>>
>> [ ...] [# comment]
>> e.g:
>> 10.12.23.45 hostname1 alias1 alias2 alias3 # there is a nice comment
"david lazaro" <[EMAIL PROTECTED]> wrote
> should say Game Over, but its cutting Over in half.
As you know backslashes signal a line continuation.
To put a literal backslash in a string you need to double it:@
print 'here is a \\'
Or put an r in front of the quotes:
print r'here is a \ too'
On 9/21/07, david lazaro <[EMAIL PROTECTED]> wrote:
>
> the book is called "Python Programming, Second Edition for the absolute
> beginner". im using the triple quotes in the beginning and end. im sending
> an attachment of what its coming out as. the actual program should say Game
> Over, but its
the book is called "Python Programming, Second Edition for the absolute
beginner". im using the triple quotes in the beginning and end. im sending an
attachment of what its coming out as. the actual program should say Game Over,
but its cutting Over in half.
___
"david lazaro" <[EMAIL PROTECTED]> wrote
> hi, im relatively new to this,
Welcome to the tutor list.
> im on chapter 2 of the python book
Which one? There are dozens of python books!
> and its asking me to print version 2.0 of "Game over"
> by using keyboard art,
Hint, Use a triple quoted
On 9/21/07, david lazaro <[EMAIL PROTECTED]> wrote:
>
> hi, im relatively new to this, im on chapter 2 of the python book and its
> asking me to print version 2.0 of "Game over" by using keyboard art, but
> when i draw out "over" is comes up half cut off, any reasons why that would
> happen?
>
Ple
david lazaro wrote:
> hi, im relatively new to this, im on chapter 2 of the python book and
> its asking me to print version 2.0 of "Game over" by using keyboard art,
> but when i draw out "over" is comes up half cut off, any reasons why
> that would happen?
Welcome!
Some tips for getting help
hi, im relatively new to this, im on chapter 2 of the python book and its
asking me to print version 2.0 of "Game over" by using keyboard art, but when i
draw out "over" is comes up half cut off, any reasons why that would happen?
Thanks (to Alan, as well). I had a wild suspicion that there would be
a fairly standard solution to this one. I've just never had to really
look into it before.
On 9/20/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Rob Andrews wrote:
> > I've got a weekly project here in which I have to take a som
"Rob Andrews" <[EMAIL PROTECTED]> wrote
> I've got a weekly project here in which I have to take a somewhat
> arbitrary number of input files, create working directories in which
> to process each of them, and call other programs from within the
> scope
> of those directories.
>
> The source file
Rob Andrews wrote:
> I've got a weekly project here in which I have to take a somewhat
> arbitrary number of input files, create working directories in which
> to process each of them, and call other programs from within the scope
> of those directories.
Use subprocess.call() to run the external p
I've got a weekly project here in which I have to take a somewhat
arbitrary number of input files, create working directories in which
to process each of them, and call other programs from within the scope
of those directories.
The source files are in a directory named 'orig' under the project
roo
Thank you Kent. That worked for the output and I'm able to understand
the IRC commands and syntaxes much better now.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Dear Tutors,
I made an OO style triangulation based on an old C progam I made about 10
years ago.
This makes Delaunay triangualtion over a point cloud in 2D.
http://en.wikipedia.org/wiki/Delaunay_triangulation
The sample is working finally.
First time I made the triangulation with recursion, bu
bhaaluu wrote:
> Greetings,
>
> I'm running Python 2.4 on a GNU/Linux system.
> Actually, I was able to get this code to work after only a few
> edits that had to do with line wrap, nothing more.
Other people are less willing to do this than you are :)
It's really the OP's prerogative to make messa
Michael Langford wrote:
> Attachments are a bad thing to send to open mailing lists in general.
Perhaps in general they are, but specifically, I'd prefer code that's
decently long to be attached or pastebinned.
e-mail clients and servers are often unfriendly on code.
That's the point of attachment
"bhaaluu" <[EMAIL PROTECTED]> wrote
> Now he needs to add a way to save the details to a file, and open
> the file to edit the details. If I'm not mistaken, since the details
> are
> in dictionary form, a 'pickle' is called for? =)
I think you are thinking of a shelve which looks a lot like a
Ulrich Holtzhausen wrote:
Hey,
Well I have the following:
data_received = s.recv(1024)
print data_received
That only prints this when the bot connects:
''':irc.opera.com NOTICE AUTH :*** Looking up your hostname...'''
Nothing else, so I am not sure whether it would actually save anything
ot
cedric briner wrote:
> To let you know, I'm writing a script to generate bind9 configuration
> from a nis hosts table. So I was trying in a one re to catch from this:
>
> [ ...] [# comment]
> e.g:
> 10.12.23.45 hostname1 alias1 alias2 alias3 # there is a nice comment
> 37.64.86.23 hostname2
>
Greetings,
I'm running Python 2.4 on a GNU/Linux system.
Actually, I was able to get this code to work after only a few
edits that had to do with line wrap, nothing more. The code
works fine, and although I don't understand what it is displaying,
the display is rather interesting. On my 1GHz CPU,
Ulrich Holtzhausen wrote:
> I recently used the existing codebase of a very very simple IRC bot of
> which is in one of O'Reilly's books. I modified it a bit and added the
> NICK properties etc. and I was able to get it to join the server and my
> IRC channel. However I'd like to know how can I
Eric Brunson wrote:
> I mention that because when you combine a fork with an exec, you get a
> spawn. Your parent process duplicates itself, but the child process
> chooses to exec another process. So the child copy of the initial
> process is replaced by new running binary and you have a spaw
Boykie Mackay wrote:
> I have tried the code and it does give a syntax error.Another lesson for
> me I guess.I should test code before posting,unless I'm sure of my post.
>
> The problem was with the brackets in lines 17/18.I got the code running
> but I don't think the 'quit' function works as it
Hey,
Well I have the following:
data_received = s.recv(1024)
print data_received
That only prints this when the bot connects:
''':irc.opera.com NOTICE AUTH :*** Looking up your hostname...'''
Nothing else, so I am not sure whether it would actually save anything
other than that if I chose to
On 9/20/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> "Boykie Mackay" <[EMAIL PROTECTED]> wrote
>
> >I have tried the code and it does give a syntax error.Another lesson
> >for
> > me I guess.I should test code before posting,unless I'm sure of my
> > post.
>
> It's a good idea, but don't worry abo
Stephen Nelson-Smith wrote:
> On 9/19/07, cedric briner <[EMAIL PROTECTED]> wrote:
>
>> Hello,
>>
>> I do not understand the behaviour of this:
>>
>> import re
>> re.search('(a)*','aaa').groups()
>> ('a',)
>>
>> I was thinking that the ``*'' will operate on the group delimited by the
>> parenthe
János Juhász wrote:
> Dear Tutors,
>
> I made an OO style triangulation based on an old C progam I made about 10
> years ago.
> The sample is working finally.
> First time I made the triangulation with recursion, but I reached the
> recursion limit very shortly.
> So I changed the recursion to a
Ulrich Holtzhausen wrote:
> शंतनु (Shantanoo) wrote:
>
>> Instead of writing your own code for the bot, I would suggest using
>> supybot (http://supybot.com/).
>>
>> regards,
>> shantanoo
>>
>>
> Hey, thank you for the suggestion. I do know about supybot and phenny,
> both are python bo
On 9/20/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
> "bhaaluu" <[EMAIL PROTECTED]> wrote
>
> > of it. But the search worked even when stackB
> > and stackC were empty. Interesting.
>
> You never checked stackB or stackC when they were
> empty because it always found something in a prior
> stack firs
"Boykie Mackay" <[EMAIL PROTECTED]> wrote
>I have tried the code and it does give a syntax error.Another lesson
>for
> me I guess.I should test code before posting,unless I'm sure of my
> post.
It's a good idea, but don't worry about it. I've been caught out a few
times myself.
Alan G
I have tried the code and it does give a syntax error.Another lesson for
me I guess.I should test code before posting,unless I'm sure of my post.
The problem was with the brackets in lines 17/18.I got the code running
but I don't think the 'quit' function works as it should.
Being a novice I thin
शंतनु (Shantanoo) wrote:
> Instead of writing your own code for the bot, I would suggest using
> supybot (http://supybot.com/).
>
> regards,
> shantanoo
>
Hey, thank you for the suggestion. I do know about supybot and phenny,
both are python bots. I want to get experience in some IRC parameters
On 9/20/07, Ulrich Holtzhausen <[EMAIL PROTECTED]> wrote:
> I recently used the existing codebase of a very very simple IRC bot of
> which is in one of O'Reilly's books. I modified it a bit and added the
> NICK properties etc. and I was able to get it to join the server and my
> IRC channel. Howeve
I recently used the existing codebase of a very very simple IRC bot of
which is in one of O'Reilly's books. I modified it a bit and added the
NICK properties etc. and I was able to get it to join the server and my
IRC channel. However I'd like to know how can I get it to print to
screen what's
On 9/20/07, cedric briner <[EMAIL PROTECTED]> wrote:
> To let you know, I'm writing a script to generate bind9 configuration
> from a nis hosts table. So I was trying in a one re to catch from this:
>
> [ ...] [# comment]
> e.g:
> 10.12.23.45 hostname1 alias1 alias2 alias3 # there is a nice com
Alan Gauld wrote:
> "Boykie Mackay" <[EMAIL PROTECTED]> wrote
>
>
>> doesn't seem to be properly formatted.There should be a comma after
>> the
>> closing quotation marks,a closing bracket after the first variable
>> and a
>> % sign before the next i.e:
>>
>>
>>> print "Your expected earn
"Boykie Mackay" <[EMAIL PROTECTED]> wrote
> doesn't seem to be properly formatted.There should be a comma after
> the
> closing quotation marks,a closing bracket after the first variable
> and a
> % sign before the next i.e:
>
>> print "Your expected earnings for %s is %d",
>> %(financeLogs['m
"James" <[EMAIL PROTECTED]> wrote
> I have a question regarding threading in Python. I'm trying to
> write
> a wrapper script in Python that will spin off multiple (lots!) of
> instances of an I/O benchmark/testing utility.
Are these instances of an external program or simply instances
of some
I don't know if it's any help,but the line mentioned in the error
message;
File "./pyfinances.py", line 18
>print "Your expected earnings for %s is %d" %
> (financeLogs['month'],
> financeLogs['total'])
>^
doesn't seem to be properly formatted.There sh
"Ulrich Holtzhausen" <[EMAIL PROTECTED]> wrote
First the good news, what you are doing should work.
> File "./pyfinances.py", line 18
>print "Your expected earnings for %s is %d" %
> (financeLogs['month'],
> financeLogs['total'])
>^
> SyntaxError: invalid syntax
>
> Non-working pro
"bhaaluu" <[EMAIL PROTECTED]> wrote
> of it. But the search worked even when stackB
> and stackC were empty. Interesting.
You never checked stackB or stackC when they were
empty because it always found something in a prior
stack first.
> I could see, all three conditionals in popNum(num)
> w
42 matches
Mail list logo