thanks!
On 11/10/05, Liam Clarke <[EMAIL PROTECTED]> wrote:
> Hi Shi,
>
> For what you're doing, nothing at all.
>
> When you use a colon, slice syntax, it defaults to [start:end] so p =
> a[:] is the same as
> p = a[0:len(a)]
>
> Regards,
>
> Liam Clarke
>
> On 11/11/05, Shi Mu <[EMAIL PROTECTED]
what is the difference between the two ways of assigning the list?
p=a vs. p=a[:]
>>> a=range(5)
>>> a
[0, 1, 2, 3, 4]
>>> p=a
>>> p
[0, 1, 2, 3, 4]
>>> p=a[:]
>>> p
[0, 1, 2, 3, 4]
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/li
Did you manage to get something that worked for you?
Johan
CPIM Ronin wrote:
>Can someone suggest a specific tutorial strictly on report writing?
>
>I'm able to write reports fairly easily in Python. I know the stuff like
>str(round(x,2)) where x = 3.145678 will yield 3.14. What I'm looking for
Try looking here;
http://sourceforge.net/projects/mysql-python
Johan
captnswing wrote:
>Hello all,
>I would like to log messages to a database (mysql)
>I found the example log_test14.py that comes with python logging
>module http://www.red-dove.com/python_logging.html
>but that example is a bi
I see. maybe some websites are blocked to me.
On 11/10/05, Danny Yoo <[EMAIL PROTECTED]> wrote:
>
> Hi Shi Mu,
>
> There are some direct ways you can find a delaunay triangulation
> implementation in Python. In fact, the first Google hit to "triangulation
> python" should come up with something r
> But that was the PAST. This is FINALLY the FUTURE. And while I am a bit
> disappointed those flying cars that were promised aren't here yet, we of the
> future now have the luxury of white space with no downside.
Whaddaya mean, no flying cars?
http://www.moller.com/skycar/
Aside from that, th
A good natured word of explanation for Chris and others:
Rest assured I am not criticizing the FORM and USE of white space that Python so eloquently uses,
and subsequently makes it so beautiful and easy to read to the eye, by my example
of a single line of BASIC. Actually, back in the day, I
On Thu, Nov 10, 2005, Kent Johnson wrote:
>Bill Campbell wrote:
>
>>The problem I'm working on now is to have our client's machines connect to
>>our XML-RPC server in cron jobs which will do at least two things, check to
>>see if their dynamic IP address has changed so we can update DNS for them,
>
Bill Campbell wrote:
> The problem I'm working on now is to have our client's machines connect to
> our XML-RPC server in cron jobs which will do at least two things, check to
> see if their dynamic IP address has changed so we can update DNS for them,
> and/or let our system know they're still al
Title: Message
Hi
Terry,
Python
is great, very much so if the last you used was Basic.
I
highly recommend Alan Gauld's tutorial, but I look forward to your queries here.
:-)
Liam
Clarke-Hutchinson
-Original Message-From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
On Tue, Nov 08, 2005, Kent Johnson wrote:
>Kent Johnson wrote:
>> Bill Campbell wrote:
>>
>>>Is there a way in python for a method to determine its parent?
>>>
>>>In particular, I'm working with SimpleXMLRPCServer, and would
>>>like to be able to find the client_address in the routine that
>>>has
I want to thank everyone for their responses. This has help tremendously to ease my mind. Thanks!
Branching in the program, is actually my real anxiety, as I have been feeling the void, (maybe
that should be WITHDRAWALS!) as I am working my way through How To Think Like a Computer
Scientist
(I accidentally sent this to the originator. Sorry.)
Sweet!
Almost everything is sooo familiar, yet, merged in many interesting ways. I never had a DO WHILE statement, but
in many ways, your further examples are like a combination of my old FOR NEXT loop and IF logical evaluation statement
> compared Python to old style BASIC. You might find it helpful if you
> were weaned on BASIC. You can still find the old site here:
>
> http://www.freenetpages.co.uk/hp/alan.gauld/oldtutor/
>
> Check out the Loops topic for the GOTO discussion.
Oops, so long since I looked at that version...
> In Basic, I would have said:
>
> 10 x = x + 1 : print x : goto 10
Tsk, tsk, even in BASIC that's considered bad form :-)
10 FOR X =1 to 10
20 PRINT X
30 NEXT
Would be the better BASIC form.
And as you've seen Python provides a close analog to
that in its for loop.
for X in [1,2,3,4,
Hi Shi Mu,
There are some direct ways you can find a delaunay triangulation
implementation in Python. In fact, the first Google hit to "triangulation
python" should come up with something relevant.
Also, try the search "triangulation" in:
http://www.python.org/pypi?%3Aaction=search_form
A
On Thu, 10 Nov 2005, Terry Kemmerer wrote:
> I'm working on Ch. 5, "Fruitful Functions", or "How To Think Like A
> Computer Scientist" and I still can't count.
> (Don't laugh! I can't play the violin either...)
>
> In Basic, I would have said:
>
> 10 x = x + 1 : print x : goto 10
Good heave
Terry Kemmerer wrote:
> I'm working on Ch. 5, "Fruitful Functions", or "How To Think Like A
> Computer Scientist" and I still can't count.
> (Don't laugh! I can't play the violin either...)
>
> In Basic, I would have said:
>
> 10 x = x + 1 : print x : goto 10
>
> run
> 1
> 2
> 3
> etc
>
>
Terry Kemmerer wrote:
> In Basic, I would have said:
>
> 10 x = x + 1 : print x : goto 10
>
> run
> 1
> 2
> 3
> etc
>
> How is this done in Python? (So I can stop holding my breath as I study
> this great languageand relax.)
In Python there is no goto, as you have discovered. Loops
On 11/11/05, Terry Kemmerer <[EMAIL PROTECTED]> wrote:
> I'm working on Ch. 5, "Fruitful Functions", or "How To Think Like A
> Computer Scientist" and I still can't count.
> (Don't laugh! I can't play the violin either...)
>
> In Basic, I would have said:
>
> 10 x = x + 1 : print x : goto 10
I'm working on Ch. 5, "Fruitful Functions", or "How To Think Like A Computer Scientist" and I still can't count.
(Don't laugh! I can't play the violin either...)
In Basic, I would have said:
10 x = x + 1 : print x : goto 10
run
1
2
3
etc
I don't know why, but this great UNKNOWN bother
lol,
that's just funny.
On 11/10/05, Shi Mu <[EMAIL PROTECTED]> wrote:
> the Internet is down for one day and so wonderful to have so many
> responses. i have checked all the links you guys mentioned. what i
> want is delaunay triangulation and the available ones online are
> written in C, Java
the Internet is down for one day and so wonderful to have so many
responses. i have checked all the links you guys mentioned. what i
want is delaunay triangulation and the available ones online are
written in C, Java and FORTRAN. I want to see some in Python because
it is hard for me to figure out
hello, I'm getting this strange error:
myArray1[1:2] = myArray2[3:4]
TypeError: Array can not be safely cast to required type
everytime I try to copy a slice from one array to the next this error occurs. the slices are the same size and I initialized the arrays using Numeric.zeros(10, 'Flo
Yahoo! FareChase - Search multiple travel sites in one click.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Yahoo! FareChase - Search multiple travel sites in one click.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi, I do this all the time. I use a recipe, and import a daemon module.
The module is here:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731
in your script, just do
import daemon
and
daemon.createDaemon()
Works like a charm.
Hugo
Frank Hoffsümmer wrote:
> Hello all,
> I found
Bernard Lebel wrote:
> Hello,
>
> I have compiled this regular expression, with 3 strings. Basically it
> looks like this.
>
> r'word1|word2|word3'
>
> The point is to try to match one of these words in a string.
>
> Now let say I indeed got a match in a string. How can I find out wich
> one, b
Never mind, just came accross "groups" of the match object. Can't
believe there is such a nice feature!
Cheers
Bernard
On 11/10/05, Bernard Lebel <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have compiled this regular expression, with 3 strings. Basically it
> looks like this.
>
> r'word1|word2|
Hello,
I have compiled this regular expression, with 3 strings. Basically it
looks like this.
r'word1|word2|word3'
The point is to try to match one of these words in a string.
Now let say I indeed got a match in a string. How can I find out wich
one, between word1-word2-word3 has the string be
Hello all,
I would like to log messages to a database (mysql)
I found the example log_test14.py that comes with python logging
module http://www.red-dove.com/python_logging.html
but that example is a bit greek for me ... :) and it doesnt work with
mysql
is there some kind of tutorial how to get
Alan Gauld wrote:
>>As in Pythagoras?
>>
>>
>
>
>
>>Or as in triangulation on a 2D surface, navigation etc.?
>>
>>
>
>
>
>>Or, do you mean radio triangulation by directional signal propagation
>>
>>
>
>
>
>>Or, do you mean drawing a triangle in Tkinter?
>>
>>
>
>Or even trian
Frank Hoffsümmer wrote:
>Hello all,
>I found this gem of a python recipe that allows me to monitor a hierarchy of
>folders on my filesystem for additions / changes / removals of files:
>http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215418
>
>I would like to monitor a folder hierarchy us
Hello,
I want to write a module that transfers a given file to a given destination
with a given protocol (ftp, sftp, scp)
to start out, just ftp would be sufficient
the destination machines are sometimes unavailable, or the transfer fails
sometimes due to connection problems
I have several questio
Hello all,
I found this gem of a python recipe that allows me to monitor a hierarchy of
folders on my filesystem for additions / changes / removals of files:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215418
I would like to monitor a folder hierarchy using this script but now I
wonde
Hi Ismael,
I'm glad you found the answer. It is very enlightening as I thought I
had to do with locale and did some tests without getting the problem (I
do not have BS installed now)
As I speak Spanish this had got me worried. :/
Hugo
Ismael Garrido wrote:
> Found the problem myself.
> (loo
Hello,
On Thu, 2005-11-10 at 11:00 +0100, Joerg Woelke wrote:
> On Thu, Nov 10, 2005 at 02:04:20PM +1300, John Fouhy wrote:
> > On 10/11/05, Gregor Lingl <[EMAIL PROTECTED]> wrote:
> > > but Shi Mu didn't ask for a program in English ;-)
> >
> > This is pretty off-topic, but ---
> >
> > Is it po
On Thu, Nov 10, 2005 at 02:04:20PM +1300, John Fouhy wrote:
> On 10/11/05, Gregor Lingl <[EMAIL PROTECTED]> wrote:
> > but Shi Mu didn't ask for a program in English ;-)
>
> This is pretty off-topic, but ---
>
> Is it possible to be a programmer and not speak English? Are there any
> languages ou
On Thu, Nov 10, 2005 at 01:55:37AM +0100, Gregor Lingl wrote:
>
>
> Liam Clarke-Hutchinson schrieb:
> > German is an awesome language, I love the compound words (if that's what
> > they are). What does 'Gegenuhrzeigersinn' mean in English?
> >
>
> counterclockwise
Try "Donaudampfschifffahrtska
The suprising thing about Latin Perl is that it's more
readable than normal Perl
Matt
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
> Is it possible to be a programmer and not speak English? Are there any
> languages out there where the reserved words, library functions, etc.
> are in (say) German?
This is second-hand news so treat with caution but a colleague of mine used
to work for Norsk Data in Norway writing financial pro
41 matches
Mail list logo