[Tutor] file methods
Luke Paireepinart
rabidpoobear at gmail.com
Tue Jul 10 00:57:36 CEST 2007
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
> .readlines
> .read
> .xlinesread
>
> 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 as a configuration file.
>
> how do I use those functions, I don't understand the libarry reference.
>
> also, I need to output lines like above to text.txt, how do I do it?
elis - have you looked into any of the tutorials that people have
referred you to?
It appears that you aren't putting forth the effort to learn Python,
and you're just presenting us with any issues you need to solve (I.E.
getting us to do it for you).
Personally, I don't have any desire to help you when I get the
impression that you aren't trying to learn at all.
-Luke
More information about the Tutor
mailing list