Re: absolute removal of '\n' and the like

2006-02-10 Thread S Borg
Steven, Thank you very much for your insights. They are quite helpful. S -- http://mail.python.org/mailman/listinfo/python-list

Re: absolute removal of '\n' and the like

2006-02-10 Thread S Borg
Russ, Thanks a ton for ending a 3 day headache. S -- http://mail.python.org/mailman/listinfo/python-list

absolute removal of '\n' and the like

2006-02-10 Thread S Borg
Hello, If I have a string, what is the strongest way to assure the removal of any line break characters? Line break characters must always be the last character in a line, so would this:str = linestring[:-1] work? This is my first real 'learning python' project, and I don't want to get i

line wrapping problem

2006-02-09 Thread S Borg
Hello, I am parsing text from one document to another. I have a scheme similar to: for x in myfoobar: print >> mytextfile, "%s" % mydictionary[x], #all on same line print >> mytextfile, '\n' #new line I am getting line breaks before my explicit line break. Am I unwittingly copy

Python Class use

2006-02-07 Thread S Borg
Hello, I am running Python on Mac OS X. The interpreter has been great for learning the basics, but I would now like to be able to reuse code. How do I write reusable code? I have done it "The Java way": write the class, and save it to my home directory, then call it from the interpreter, here

web crawling.

2006-01-18 Thread S Borg
Hello, I have been writing very simple Python programs that parse HTML and such, mainly just to get a better feel for the language. Here is my question: If I parsed an HTML page into all of the image files listed on that page, how could I request all of those images and download them into some