469,590 Members | 2,402 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,590 developers. It's quick & easy.

rstrip error python2.4.3 not in 2.5.1?

Hi,

I wrote some python code that retrieves urls from a txt file. In this
code I use .rstrip() for removing the '\n' at the end of every url.
While this code works on my mac (leopard) with python 2.5.1, this same
code fails to work on an ubuntu server with python 2.4.3

I was wondering if there is a problem with .rstrip() in that python
version?

error :
Traceback (most recent call last):
File "delgraph.py", line 62, in ?
url_metadata = d.get_url(site.rstrip())
Feb 28 '08 #1
2 1417
rstrip() works fine in python 2.4.3. May be the problem lies in
somewhere else.

I tried it in FC6 with Python 2.4.3:
>>url = "abc.com\n"
url.rstrip()
'abc.com'
regards,
Subeen.
http://love-python.blogspot.com/

On Feb 29, 2:30 am, dirkheld <dirkh...@gmail.comwrote:
Hi,

I wrote some python code that retrieves urls from a txt file. In this
code I use .rstrip() for removing the '\n' at the end of every url.
While this code works on my mac (leopard) with python 2.5.1, this same
code fails to work on an ubuntu server with python 2.4.3

I was wondering if there is a problem with .rstrip() in that python
version?

error :
Traceback (most recent call last):
File "delgraph.py", line 62, in ?
url_metadata = d.get_url(site.rstrip())
Feb 28 '08 #2

"dirkheld" <di******@gmail.comwrote in message
news:3b**********************************@s37g2000 prg.googlegroups.com...
| Hi,
|
| I wrote some python code that retrieves urls from a txt file. In this
| code I use .rstrip() for removing the '\n' at the end of every url.
| While this code works on my mac (leopard) with python 2.5.1, this same
| code fails to work on an ubuntu server with python 2.4.3
|
| I was wondering if there is a problem with .rstrip() in that python
| version?
|
| error :
| Traceback (most recent call last):
| File "delgraph.py", line 62, in ?
| url_metadata = d.get_url(site.rstrip())
| --

What is the actual error message [SyntaxError, NameError? etc] that you
clipped?

Feb 28 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by John F Dutcher | last post: by
reply views Thread by Adam | last post: by
1 post views Thread by John Kinson | last post: by
reply views Thread by mmarkzon | last post: by
2 posts views Thread by avenpace | last post: by
reply views Thread by Jaap Spies | last post: by
2 posts views Thread by kyo guan | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.