Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Nope. that's not what i mean... Here's a quick run down: edna, is a python mp3 server. (.py) What it does is searches directories for: 1) mp3s 2) jpgs 3) mp3us 4) txt files 5) other folders What I'd like it to do, is upon finding a folder, with a .txt file in it (in my case is probably an albu

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Michael Tobis
I think it's pretty clear that we aren't understanding what you mean by "open a text file and disply its content". I conclude that by "edna" you mean this thing: http://edna.sourceforge.net/ I suspect you are not asking a Python question at all. Did you try opening file:edna-0.6/templates/d

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
nothing is "lame" to me , all help is appreciated :) .\\ax <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mar 30, 11:39 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> In <[EMAIL PROTECTED]>, kyosohma >> wrote: >> > I'm not familiar with ezt formats, however readin

Re: New to Python - Easy way to open a text file

2007-03-30 Thread kyosohma
On Mar 30, 11:39 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, kyosohma wrote: > > I'm not familiar with ezt formats, however reading a text file is a > > breeze. > > This sentence doesn't match the code that follow. It's really simpler > than that ``while`` loo

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Hmm.. maybe it'd help if I explained that I'm playing with edna http://edna.sourceforge.net/ I'll play with this simple code: f = open(r'pathToFile) for line in f: # do something with the line of text such as print it. f.close() and this one from Skip: f = open(plainfiles.href, "r")

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, kyosohma wrote: > I'm not familiar with ezt formats, however reading a text file is a > breeze. This sentence doesn't match the code that follow. It's really simpler than that ``while`` loop. > f = open(r'pathToFile') > while True: > line = f.readline() > if

Re: New to Python - Easy way to open a text file

2007-03-30 Thread skip
Max> Hey gang, I'm new to python coding. I'm trying to find the Max> simplest way to open a text file (on the same server) and display Max> it's content. Try the open() builtin function: f = open(plainfiles.href, "r") print f.read() Skip -- http://mail.python.org/mailman/l

Re: New to Python - Easy way to open a text file

2007-03-30 Thread kyosohma
On Mar 30, 10:49 am, "Max Steel" <[EMAIL PROTECTED]> wrote: > Hey gang, I'm new to python coding. I'm trying to find the simplest way to > open a text file (on the same server) and display it's content. > > The text file is plain text (no markup language of any kind). > > The filename gets found a

New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Hey gang, I'm new to python coding. I'm trying to find the simplest way to open a text file (on the same server) and display it's content. The text file is plain text (no markup language of any kind). The filename gets found and placed into a variable named [plainfiles.href] I'm using python t