On Tue, Jul 10, 2007 at 08:24:36AM -0400, bhaaluu wrote:
> Thank you for the clarification.
> One pitfall of experimentation as a Noob is in not knowing enough to
> figure out what or why errors are generated. Thus, this Tutor list is very
> helpful. I really appreciate the feedback.
>
You might
> -Original Message-
>[...]
> I have a file like this one:
>
> command = func_babara
> parameter_1 = 300
> parameter_2 = 300
> parameter_3 = 50
> parameter_4 = 0
> parameter_5 = 0
> parameter_6 = 0
>
>
> ,as you see, i need to process it one line at a time and use
> this .ini file
Greetings,
On 7/9/07, John Fouhy <[EMAIL PROTECTED]> wrote:
> On 10/07/07, bhaaluu <[EMAIL PROTECTED]> wrote:
> > >>> file.readlines()
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > AttributeError: 'str' object has no attribute 'readlines'
>
> This error here is caused by t
"elis aeris" <[EMAIL PROTECTED]> wrote
> python 3.9 File Objects of Python Library Reference
>
Learning to program from the reference manual is possible,
especially if you use the interpreter to experiment as John
has suggested. But it will be much faster and less error prone
if you just work th
"bhaaluu" <[EMAIL PROTECTED]> wrote
>> The best way to find out what the functions do is to experiment
>> with them.
>>
>> eg:
>>
>> >>> f = open('text.txt', 'r')
>> >>> f.readlines()
>>
>> and look at the output.
>
> I like that idea. I made a simple english plain text file, thus:
>
> first lin
On 10/07/07, bhaaluu <[EMAIL PROTECTED]> wrote:
> >>> file.readlines()
> Traceback (most recent call last):
> File "", line 1, in ?
> AttributeError: 'str' object has no attribute 'readlines'
This error here is caused by this earlier statement:
> >>> file=open('text.txt').read()
'file' is now
Greetings,
On 7/9/07, John Fouhy <[EMAIL PROTECTED]> wrote:
>
> The best way to find out what the functions do is to experiment with them.
>
> eg:
>
> >>> f = open('text.txt', 'r')
> >>> f.readlines()
>
> and look at the output.
I like that idea. I made a simple english plain text file, thus:
fi
On 10/07/07, elis aeris <[EMAIL PROTECTED]> wrote:
> from the document i know that if I want to open a text file I do:
>
> f = open("text.txt", "r+")
>
> and thus create f as an file object i can then use.
>
> however, i don't understand these functions
>
> .readline
> .readlines
> .read
> .xlinesr
elis aeris wrote:
> python 3.9 File Objects of Python Library Reference
>
>
>
> from the document i know that if I want to open a text file I do:
>
> f = open("text.txt", "r+")
>
> and thus create f as an file object i can then use.
>
> however, i don't understand these functions
>
> .readline
> .