[Tutor] "standard output: Broken pipe"

2007-10-19 Thread James
Hi, I have a snippet of code in a Python script I'm whipping up that's causing a not-so-pretty output. Here's the code: subprocess.call( "yes '' | make oldconfig" , shell=True ) When I run this code, Python loyally executes the command, and then I see the following error on my console: ---

Re: [Tutor] Tutor Digest, Vol 44, Issue 62

2007-10-19 Thread Alan Gauld
"Lazarus billa" <[EMAIL PROTECTED]> wrote > I need computer Training through Tutor-Request > at Python Organisation to maintain my Computer. The Python tutor mailing list provides support for those learning the Python programming language. We do not offer general computing tuition. If your

Re: [Tutor] populating an array or using a dictionary

2007-10-19 Thread Eric Brunson
Bryan Fodness wrote: > The data file is larger than shown, and I was wondering if it would be > better to populate an array or create a dictionary. Which would be > easier? > A dictionary is an array with an index, if you need an index into your data, use a dictionary, if not use an array. >

Re: [Tutor] symbol encoding and processing problem

2007-10-19 Thread Tim Golden
Timmie wrote: > I am totally lost: > * python has ascii as default encoding > * my linux uses UTF-8 (therefore all files created on linux are UTF-8) > * windows uses cp1250 > * IPtyhon something else: on the machine where I am currently on stdin is set > to > cp850 > > So what encoding to I use t

Re: [Tutor] populating an array or using a dictionary

2007-10-19 Thread Bryan Fodness
The data file is larger than shown, and I was wondering if it would be better to populate an array or create a dictionary. Which would be easier? On 10/19/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > > Bryan Fodness wrote: > > I have a data file that I would like to extract data from: > > > > F

Re: [Tutor] populating an array or using a dictionary

2007-10-19 Thread Kent Johnson
Bryan Fodness wrote: > I have a data file that I would like to extract data from: > > FS 1 2 3 4 5 > 1.5 1.000 1.000 1.000 1.000 1.000 > 2.0 0.985 0.994 0.997 0.996 0.996 > 2.5 0.967 0.976 0.981 0.981 0.982 > 3.0 0.949 0.958 0.965 0.966 0.967 > 3.

[Tutor] populating an array or using a dictionary

2007-10-19 Thread Bryan Fodness
I have a data file that I would like to extract data from: FS 1 2 3 4 5 1.5 1.000 1.000 1.000 1.000 1.000 2.0 0.985 0.994 0.997 0.996 0.996 2.5 0.967 0.976 0.981 0.981 0.982 3.0 0.949 0.958 0.965 0.966 0.967 3.5 0.925 0.937 0.945 0.948 0.

Re: [Tutor] symbol encoding and processing problem

2007-10-19 Thread Timmie
> > I still don't know why there is such a encoding mess on Python. For me > this > > totally neglects the statement that python code is easily portable or > executable > > on other platforms. > > I don't think this is entirely fair. For example at the start you had a > file containing cp1252 dat

Re: [Tutor] Tutor Digest, Vol 44, Issue 62

2007-10-19 Thread Lazarus billa
Dear Sir., I need computer Training through Tutor-Request at Python Organisation to maintain my Computer. I also need Books., Litterature and needed help. Please attach me to some Org if u r not able to Justify my request. I am a social worker caring Orphans and Aged Widows. I need thorouh knowledg

Re: [Tutor] aBSOLUTE BEGINNER

2007-10-19 Thread jon vspython
You can find Dive into Python online here: http://diveintopython.org/toc/index.html ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] aBSOLUTE BEGINNER

2007-10-19 Thread Alan Gauld
"Abhishek Negi" <[EMAIL PROTECTED]> wrote > some time of your life as a beginner please consider me that for > python but > not for programming. In that case start with the official Python tutorial (included in the Windows download) and top it up with Dive into Python (included in the ActiveSta