Re: wanting

2006-07-18 Thread Patrick Bothe
placid wrote:
> this is one of my aims in life, to bloody understand this 1337 speak!
100k h3r3, 8|2o:
http://www.1337.net/

Regards,
 Patrick

Ps:
The translator might come in handy.

-- 
2 does not equal 3. Even for large values of 2.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: regex for replacing \r\n

2006-08-07 Thread Patrick Bothe
abcd wrote:
> [...]
> ultimately i am trying to replace all \r\n with somethign else, say
> BLAH.
> 
> For example:
> This is a message
> on a new line
> 
> would become:
> This is a messageBLAHon a new line.
Concluding from your question I think you might be happy with a simple 
string `.replace`:
 >>> s = 'This is a message\r\non a new line'
 >>> print s
This is a message
on a new line
 >>> s.replace('\r\n', 'BLAH')
 >>> print s
'This is a messageBLAHon a new line'

Regards,
 Patrick

-- 
2 does not equal 3. Even for large values of 2.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to save python interpreter's command history

2006-04-26 Thread Patrick Bothe
If you're using an operating system supporting the readline utility
try:

 http://www.python.org/doc/current/tut/node15.html

I am using a slightly modified version of the given example.
The last time I checked the size of my history file it had 4k+ entries.

Regards,
Patrick

-- 
2 does not equal 3. Even for large values of 2.
-- 
http://mail.python.org/mailman/listinfo/python-list