Steven D'Aprano wrote:
On Sat, 27 Dec 2008 01:41:40 +0100, Stef Mientki wrote:
Sorry if I offended someone, that was certainly not my intention. And I
guess you will be surprised, if I tell you, I don't (want) to understand
any bit of the above code ;-) Come on, the home computer was
2008/12/27 Stef Mientki stef.mien...@gmail.com:
Steven D'Aprano wrote:
No, that only makes it even more confusing. What does Moore's Law have to
do with your willful ignorance about the existence of human languages other
than English?
Nothing.
I even don't (want to) see what bits / bytes /
I have the following kind of strings,
the funny þ is ASCII character 254, used as a separator character
ASCII ends at 127. Just refer to it as chr(254).
note 1)
[FSM]
Counts = 1þ11þ16 == 1,11,16
Init1 = 1þ\BCtrl ==1,Ctrl
State5 = 8þ\BJUMP_COMPL\b\nPCWrite =
On Dec 27, 12:05 am, Stef Mientki stef.mien...@gmail.com wrote:
Yep, chr(254), because it's not in the human range of characters
and it's accepted by windows ini-files.
import unicodedata as ucd
for i in (0,1,2,3,4,7,8):
...s = chr(254)
...enc = 'cp125' + str(i)
...try:
...
John Machin wrote:
On Dec 27, 12:05 am, Stef Mientki stef.mien...@gmail.com wrote:
Yep, chr(254), because it's not in the human range of characters
and it's accepted by windows ini-files.
import unicodedata as ucd
for i in (0,1,2,3,4,7,8):
...s = chr(254)
...enc
On Sat, 27 Dec 2008 01:41:40 +0100, Stef Mientki wrote:
Sorry if I offended someone, that was certainly not my intention. And I
guess you will be surprised, if I tell you, I don't (want) to understand
any bit of the above code ;-) Come on, the home computer was invented
about 1980. If we look
hello,
Is there a function to remove escape characters from a string ?
(preferable all escape characters except \n).
thanks,
Stef
--
http://mail.python.org/mailman/listinfo/python-list
Stef Mientki wrote:
hello,
Is there a function to remove escape characters from a string ?
(preferable all escape characters except \n).
thanks,
Stef
import string
WANTED = string.printable[:-5] + \n
def descape(s, w=WANTED):
return .join(c for c in s if c in w)
James
--
James
On Thu, Dec 25, 2008 at 7:02 AM, James Stroud jstr...@mbi.ucla.edu wrote:
Stef Mientki wrote:
hello,
Is there a function to remove escape characters from a string ?
(preferable all escape characters except \n).
thanks,
Stef
import string
test = 'this\r is a test\t yeah\n'
for c
On Dec 25, 9:00 pm, Stef Mientki stef.mien...@gmail.com wrote:
hello,
Is there a function to remove escape characters from a string ?
(preferable all escape characters except \n).
\n is not what most people would call an escape character. The \
is what most people would call an escape
On Thu, 25 Dec 2008 11:00:18 +0100, Stef Mientki wrote:
hello,
Is there a function to remove escape characters from a string ?
(preferable all escape characters except \n).
Can you explain what you mean? I can think of at least four alternatives:
(1) Remove literal escape sequences
Steven D'Aprano wrote:
On Thu, 25 Dec 2008 11:00:18 +0100, Stef Mientki wrote:
hello,
Is there a function to remove escape characters from a string ?
(preferable all escape characters except \n).
Can you explain what you mean? I can think of at least four alternatives:
I have
On Dec 26, 8:53 am, Stef Mientki stef.mien...@gmail.com wrote:
Steven D'Aprano wrote:
On Thu, 25 Dec 2008 11:00:18 +0100, Stef Mientki wrote:
hello,
Is there a function to remove escape characters from a string ?
(preferable all escape characters except \n).
Can you explain what you
13 matches
Mail list logo