Re: [Tutor] os.spawnlp and os.spawnlpe

2005-05-29 Thread Danny Yoo
On Sun, 29 May 2005, Jonas Melian wrote: > which is the difference between os.spawnlp and os.spawnlpe? With an > example, please. I don't understand it. Hi Jonas, The difference is that the one that ends with an 'e' allows us to make the spawned process use an entirely clean Unix shell environ

Re: [Tutor] increment operator

2005-05-29 Thread hugonz
No, there is not. Integers are inmutable types, so you cannot modify them in place, so you do: i += 1 or i = i+1 which creates a new integer and makes "i" reference it. Hugo > Hello >Is there a increment operator in python similar to c++ > like so "SomeVariable++" > > __

Re: [Tutor] Planning a program with algorithm?

2005-05-29 Thread Pujo Aji
Before you write algorithm it is always good to know every aspect of the programing language you will use. python has built in function like set, data like list, dictionary, style like list comprehension, lambda etc that worth knowing before you start to write algorithm. It is always good to

[Tutor] Planning a program with algorithm?

2005-05-29 Thread . ,
I know how to write a prog. But, I don't know how to plan a prog. with algorithm. If algorithm of a part of a prog. is like.. --- create an empty jumble word whi

Re: [Tutor] Dudes with os.spawnlp

2005-05-29 Thread Jonas Melian
Kent Johnson wrote: > I don't know the answer to your question, but I wonder what you mean by > 'dudes'. You use that word a > lot and it never makes sense to me; I suspect you mistake its meaning. > > Can you find another word? > Oh sorry, s/dudes/doubts __

Re: [Tutor] Dudes with os.spawnlp

2005-05-29 Thread Kent Johnson
I don't know the answer to your question, but I wonder what you mean by 'dudes'. You use that word a lot and it never makes sense to me; I suspect you mistake its meaning. From dictionary.com: 1. Informal. An Easterner or city person who vacations on a ranch in the West. 2. Informal.

Re: [Tutor] UTF-8 by default

2005-05-29 Thread Kent Johnson
Jonas Melian wrote: > Kent Johnson wrote: > >>>How write by default in UTF-8 instead of ASCII? >> >> >>How are you writing the file? What encoding is your data originally? >> > > > For writing the XML file: > >>>ElementTree.ElementTree(root).write("file.xml") The elementTree.write() method tak

[Tutor] Dudes with os.spawnlp

2005-05-29 Thread Jonas Melian
This code run 'X -configure' using $PATH for looking for its path :: try: #retcode = call("X" + " -configure", shell=True) # 2.4 code_return = os.spawnlp(os.P_WAIT, "X", "X", "-configure") if retcode < 0: print >>sys.stderr, "Child was terminated by signal", -retcode els

[Tutor] os.spawnlp and os.spawnlpe

2005-05-29 Thread Jonas Melian
Hi, which is the difference between os.spawnlp and os.spawnlpe? With an example, please. I don't understand it. Thanks! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Using Python to keep peace in the house (a little success story)

2005-05-29 Thread Terry Carroll
My wife and I have a disagreement over the use of our digital camera. She likes to have the date printed on the image. I hate that, I like the image to be pristine. Our camera has the option to put the date on the image, but we can't agree on whether to enable it. Well, Python to the rescue.

Re: [Tutor] UTF-8 by default

2005-05-29 Thread Jonas Melian
Kent Johnson wrote: >>How write by default in UTF-8 instead of ASCII? > > > How are you writing the file? What encoding is your data originally? > For writing the XML file: >>ElementTree.ElementTree(root).write("file.xml") The source encoding is UTF-8 ( # -*- coding: utf-8 -*- ) But I also w