[ python-Bugs-1603688 ] SaveConfigParser.write() doesn't quote %-Sign

2006-11-27 Thread SourceForge.net
Bugs item #1603688, was opened at 2006-11-27 13:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603688&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Rebecca Breu (rbreu)
Assigned to: Nobody/Anonymous (nobody)
Summary: SaveConfigParser.write() doesn't quote %-Sign

Initial Comment:
>>> parser = ConfigParser.SafeConfigParser()
>>> parser.add_section("test")
>>> parser.set("test", "foo", "bar%bar")
>>> parser.write(open("test.config", "w"))
>>> parser2 = ConfigParser.SafeConfigParser()
>>> parser2.readfp(open("test.config"))
>>> parser.get("test", "foo")
Traceback (most recent call last):
  File "", line 1, in ?
  File "/usr/lib/python2.4/ConfigParser.py", line 525, in get
return self._interpolate(section, option, value, d)
  File "/usr/lib/python2.4/ConfigParser.py", line 593, in _interpolate
self._interpolate_some(option, L, rawval, section, vars, 1)
  File "/usr/lib/python2.4/ConfigParser.py", line 634, in _interpolate_some
"'%%' must be followed by '%%' or '(', found: %r" % (rest,))
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(', 
found: '%bar'


Problem: SaveConfigParser saves the string "bar%bar" as is and not as 
"bar%%bar".

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603688&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1603789 ] grammatical error in Python Library Reference::Tkinter

2006-11-27 Thread SourceForge.net
Bugs item #1603789, was opened at 2006-11-27 09:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603789&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gabriel M. Elder (eldergabriel)
Assigned to: Nobody/Anonymous (nobody)
Summary: grammatical error in Python Library Reference::Tkinter

Initial Comment:
It's located here: http://www.python.org/doc/current/lib/node690.html

"Flags are proceeded by a `-', like Unix shell command flags, and values are 
put in quotes if they are more than one word."

"proceeded" should be "preceded"

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603789&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Feature Requests-1592899 ] "".translate() docs should mention string.maketrans()

2006-11-27 Thread SourceForge.net
Feature Requests item #1592899, was opened at 2006-11-08 15:23
Message generated for change (Settings changed) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1592899&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ori Avtalion (salty-horse)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: "".translate() docs should mention string.maketrans()

Initial Comment:
The translate() documentation at
http://docs.python.org/lib/string-methods.html#l2h-268
should mention the string.maketrans helper function.

maketrans also mentions "regex.compile" - that should
probably be "re.compile" (although it's less readable).

re.compile should mention maketrans as well.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1592899&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1579370 ] Segfault provoked by generators and exceptions

2006-11-27 Thread SourceForge.net
Bugs item #1579370, was opened at 2006-10-18 03:23
Message generated for change (Comment added) made by eric_noyau
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1579370&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Mike Klaas (mklaas)
Assigned to: Nobody/Anonymous (nobody)
Summary: Segfault provoked by generators and exceptions

Initial Comment:
A reproducible segfault when using heavily-nested
generators and exceptions.

Unfortunately, I haven't yet been able to provoke this
behaviour with a standalone python2.5 script.  There
are, however, no third-party c extensions running in
the process so I'm fairly confident that it is a
problem in the core.

The gist of the code is a series of nested generators
which leave scope when an exception is raised.  This
exception is caught and re-raised in an outer loop. 
The old exception was holding on to the frame which was
keeping the generators alive, and the sequence of
generator destruction and new finalization caused the
segfault.   

--

Comment By: Eric Noyau (eric_noyau)
Date: 2006-11-27 18:07

Message:
Logged In: YES 
user_id=1388768
Originator: NO

We are experiencing the same segfault in our application, reliably.
Running our unit test suite just segfault everytime on both Linux and Mac
OS X. Applying Martin's patch fixes the segfault, and makes everything
fine and dandy, at the cost of some memory leaks if I understand
properly.

This particular bug prevents us to upgrade to python 2.5 in production.

--

Comment By: Tim Peters (tim_one)
Date: 2006-10-28 06:18

Message:
Logged In: YES 
user_id=31435

> I tried Tim's hope.py on Linux x86_64 and
> Mac OS X 10.4 with debug builds and neither
> one crashed.  Tim's guess looks pretty damn
> good too.

Neal, note that it's the /Windows/ malloc that fills freed
memory with "dangerous bytes" in a debug build -- this
really has nothing to do with that it's a debug build of
/Python/ apart from that on Windows a debug build of Python
also links in the debug version of Microsoft's malloc.

The valgrind report is pointing at the same thing.  Whether
this leads to a crash is purely an accident of when and how
the system malloc happens to reuse the freed memory.

--

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-10-28 05:56

Message:
Logged In: YES 
user_id=33168

Mike, what platform are you having the problem on?

I tried Tim's hope.py on Linux x86_64 and Mac OS X 10.4 with
debug builds and neither one crashed.  Tim's guess looks
pretty damn good too.  Here's the result of valgrind:

Invalid read of size 8 

   at 0x4CEBFE: PyTraceBack_Here (traceback.c:117) 

   by 0x49C1F1: PyEval_EvalFrameEx (ceval.c:2515)  

   by 0x4F615D: gen_send_ex (genobject.c:82)   

   by 0x4F6326: gen_close (genobject.c:128)

   by 0x4F645E: gen_del (genobject.c:163)  

   by 0x4F5F00: gen_dealloc (genobject.c:31)   

   by 0x44D207: _Py_Dealloc (object.c:1928)

   by 0x44534E: dict_dealloc (dictobject.c:801)

   by 0x44D207: _Py_Dealloc (object.c:1928)

   by 0x4664FF: subtype_dealloc (typeobject.c:686) 

   by 0x44D207: _Py_Dealloc (object.c:1928)

   by 0x42325D: instancemethod_dealloc (classobject.c:2287)

 Address 0x56550C0 is 88 bytes inside a block of size 152
free'd
   at 0x4A1A828: free (vg_replace_malloc.c:233)

   by 0x4C3899: tstate_delete_common (pystate.c:256)   

   by 0x4C3926: PyThreadState_DeleteCurrent (pystate.c:282)

   by 0x4D4043: t_bootstrap (threadmodule.c:448)   

   by 0x4B24C48: pthread_start_thread (in
/lib/libpthread-0.10.so)  

The only way I can think to fix this is to keep a set of
active generators in the PyThreadState and calling
gen_send_ex(exc=1) for all the active generators before
killing the tstate in t_bootstrap.

--

Comment By: Michael Hudson (mwh)
Date: 2006-10-19 08:58

Message:
Logged In: YES 
user_id=6656

> and for some reason Python uses the system malloc directly
> to obtain m

[ python-Feature Requests-1572210 ] help(x) for keywords too

2006-11-27 Thread SourceForge.net
Feature Requests item #1572210, was opened at 2006-10-06 10:06
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1572210&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Nobody/Anonymous (nobody)
Summary: help(x) for keywords too

Initial Comment:
At the interactive prompt, help(object) is very useful.

It would be nice if it also worked on keywords.

"""
>>> help(object)
Help on class object in module __builtin__:

class object
 |  The most base type
"""

vs 

"""
>>> help(with)
SyntaxError: invalid syntax
"""

At the moment, the workaround is to open the 
documentation, pick a document that doesn't seem quite 
right (language reference?), go to the index, and look 
for the keyword.


--

>Comment By: Raymond Hettinger (rhettinger)
Date: 2006-11-27 13:13

Message:
Logged In: YES 
user_id=80475
Originator: NO

Ideally, if help() doesn't find local HTML files, it should be smart
enough to look on doc.python.org.People who need help are not usually
in a position to build their own help files.

--

Comment By: Jim Jewett (jimjjewett)
Date: 2006-11-21 10:41

Message:
Logged In: YES 
user_id=764593
Originator: YES

1600491 contains a doc patch, which is basically just adding Tom Heller's
advice on *how* to build to the error message.

--

Comment By: Thomas Heller (theller)
Date: 2006-10-06 14:25

Message:
Logged In: YES 
user_id=11105

> Is this likely to be a windows build issue?

No.  pydoc cannot use the .chm file.  Either you should
download the HTML files yourself, or you can compile the
.chm file in a windows command shell (note that the
decompilation runs in the background, and has no user
interface):

C:\Python24\Doc>hh -decompile . Python24.chm

C:\Python24\Doc>dir *.chm
 Datenträger in Laufwerk C: ist ...
 Volumeseriennummer: ...

 Verzeichnis von C:\Python24\Doc

06.10.2006  21:23 3.732 about.html
06.10.2006  21:23 8.689 acks.html
06.10.2006  21:23 4.445 index.html
06.10.2006  21:2335.525 modindex.html
   4 Datei(en) 52.391 Bytes
   0 Verzeichnis(se),  8.506.798.080 Bytes frei

C:\Python24\Doc>

The other HTML files are created in subdirectories, and
help("if") now works.

--

Comment By: Jim Jewett (jimjjewett)
Date: 2006-10-06 11:26

Message:
Logged In: YES 
user_id=764593

No, it doesn't -- but putting the keyword in quotes does at 
least change the error message to saying that topic and 
keyword documentation is not available because the Python 
HTML documentation files could not be found.  

I'm using Windows XP, the 2.4 and 2.5 binaries from 
python.org, if I changed anything it was just the install 
directory to be Python2.5 (or 2.4 for 2.4))

The documentation (as a chm file) is found by the F1 key.  
Is this likely to be a windows build issue?


--

Comment By: Georg Brandl (gbrandl)
Date: 2006-10-06 10:59

Message:
Logged In: YES 
user_id=849994

Doesn't help("if") work for you?

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1572210&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Feature Requests-1572210 ] help(x) for keywords too

2006-11-27 Thread SourceForge.net
Feature Requests item #1572210, was opened at 2006-10-06 11:06
Message generated for change (Comment added) made by jimjjewett
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1572210&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Nobody/Anonymous (nobody)
Summary: help(x) for keywords too

Initial Comment:
At the interactive prompt, help(object) is very useful.

It would be nice if it also worked on keywords.

"""
>>> help(object)
Help on class object in module __builtin__:

class object
 |  The most base type
"""

vs 

"""
>>> help(with)
SyntaxError: invalid syntax
"""

At the moment, the workaround is to open the 
documentation, pick a document that doesn't seem quite 
right (language reference?), go to the index, and look 
for the keyword.


--

>Comment By: Jim Jewett (jimjjewett)
Date: 2006-11-27 13:23

Message:
Logged In: YES 
user_id=764593
Originator: YES

Pointing to docs.python.org doesn't help if you don't have a current net
connection.

In this case, the build instructions *are* the single line from Thomas:

C:\Python24\Doc>hh -decompile . Python25.chm

Since hh comes with windows, the barrier is fairly low.


--

Comment By: Raymond Hettinger (rhettinger)
Date: 2006-11-27 13:13

Message:
Logged In: YES 
user_id=80475
Originator: NO

Ideally, if help() doesn't find local HTML files, it should be smart
enough to look on doc.python.org.People who need help are not usually
in a position to build their own help files.

--

Comment By: Jim Jewett (jimjjewett)
Date: 2006-11-21 10:41

Message:
Logged In: YES 
user_id=764593
Originator: YES

1600491 contains a doc patch, which is basically just adding Tom Heller's
advice on *how* to build to the error message.

--

Comment By: Thomas Heller (theller)
Date: 2006-10-06 15:25

Message:
Logged In: YES 
user_id=11105

> Is this likely to be a windows build issue?

No.  pydoc cannot use the .chm file.  Either you should
download the HTML files yourself, or you can compile the
.chm file in a windows command shell (note that the
decompilation runs in the background, and has no user
interface):

C:\Python24\Doc>hh -decompile . Python24.chm

C:\Python24\Doc>dir *.chm
 Datenträger in Laufwerk C: ist ...
 Volumeseriennummer: ...

 Verzeichnis von C:\Python24\Doc

06.10.2006  21:23 3.732 about.html
06.10.2006  21:23 8.689 acks.html
06.10.2006  21:23 4.445 index.html
06.10.2006  21:2335.525 modindex.html
   4 Datei(en) 52.391 Bytes
   0 Verzeichnis(se),  8.506.798.080 Bytes frei

C:\Python24\Doc>

The other HTML files are created in subdirectories, and
help("if") now works.

--

Comment By: Jim Jewett (jimjjewett)
Date: 2006-10-06 12:26

Message:
Logged In: YES 
user_id=764593

No, it doesn't -- but putting the keyword in quotes does at 
least change the error message to saying that topic and 
keyword documentation is not available because the Python 
HTML documentation files could not be found.  

I'm using Windows XP, the 2.4 and 2.5 binaries from 
python.org, if I changed anything it was just the install 
directory to be Python2.5 (or 2.4 for 2.4))

The documentation (as a chm file) is found by the F1 key.  
Is this likely to be a windows build issue?


--

Comment By: Georg Brandl (gbrandl)
Date: 2006-10-06 11:59

Message:
Logged In: YES 
user_id=849994

Doesn't help("if") work for you?

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1572210&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1575169 ] isSequenceType returns True for dict subclasses (<> 2.3)

2006-11-27 Thread SourceForge.net
Bugs item #1575169, was opened at 2006-10-11 05:35
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1575169&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Martin Gfeller (gfe)
Assigned to: Raymond Hettinger (rhettinger)
Summary: isSequenceType returns True for dict subclasses (<> 2.3)

Initial Comment:
The following behavior is correct according to the 
documentation. However, it seems weird to me, and 
broke my code when going from 2.3 to 2.4:

Python  2.4.2:
>>> import operator
>>> class deriveddict(dict): pass
... 
>>> d =dict()
>>> dd = deriveddict()
>>> operator.isSequenceType(d)
False
>>> operator.isSequenceType(dd)
True


The last statement returns False in Python 2.3.4.






--

>Comment By: Raymond Hettinger (rhettinger)
Date: 2006-11-27 13:28

Message:
Logged In: YES 
user_id=80475
Originator: NO

Hmm, it may be possible to make the test smarter by checking base classes
known mappings or known sequences in cases where the __getitem__ method
hasn't been overridden.  That would reduce false positives in cases like
this where there is some hint as to whether the __getitem__ method is for
mapping or for sequence behavior.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1575169&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1579370 ] Segfault provoked by generators and exceptions

2006-11-27 Thread SourceForge.net
Bugs item #1579370, was opened at 2006-10-17 19:23
Message generated for change (Comment added) made by mklaas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1579370&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Mike Klaas (mklaas)
Assigned to: Nobody/Anonymous (nobody)
Summary: Segfault provoked by generators and exceptions

Initial Comment:
A reproducible segfault when using heavily-nested
generators and exceptions.

Unfortunately, I haven't yet been able to provoke this
behaviour with a standalone python2.5 script.  There
are, however, no third-party c extensions running in
the process so I'm fairly confident that it is a
problem in the core.

The gist of the code is a series of nested generators
which leave scope when an exception is raised.  This
exception is caught and re-raised in an outer loop. 
The old exception was holding on to the frame which was
keeping the generators alive, and the sequence of
generator destruction and new finalization caused the
segfault.   

--

>Comment By: Mike Klaas (mklaas)
Date: 2006-11-27 10:41

Message:
Logged In: YES 
user_id=1611720
Originator: YES

The following patch resets the thread state of the generator when it is
resumed, which prevents the segfault for me:

Index: Objects/genobject.c
===
--- Objects/genobject.c (revision 52849)
+++ Objects/genobject.c (working copy)
@@ -77,6 +77,7 @@
Py_XINCREF(tstate->frame);
assert(f->f_back == NULL);
f->f_back = tstate->frame;
+f->f_tstate = tstate;
 
gen->gi_running = 1;
result = PyEval_EvalFrameEx(f, exc);

--

Comment By: Eric Noyau (eric_noyau)
Date: 2006-11-27 10:07

Message:
Logged In: YES 
user_id=1388768
Originator: NO

We are experiencing the same segfault in our application, reliably.
Running our unit test suite just segfault everytime on both Linux and Mac
OS X. Applying Martin's patch fixes the segfault, and makes everything
fine and dandy, at the cost of some memory leaks if I understand
properly.

This particular bug prevents us to upgrade to python 2.5 in production.

--

Comment By: Tim Peters (tim_one)
Date: 2006-10-27 22:18

Message:
Logged In: YES 
user_id=31435

> I tried Tim's hope.py on Linux x86_64 and
> Mac OS X 10.4 with debug builds and neither
> one crashed.  Tim's guess looks pretty damn
> good too.

Neal, note that it's the /Windows/ malloc that fills freed
memory with "dangerous bytes" in a debug build -- this
really has nothing to do with that it's a debug build of
/Python/ apart from that on Windows a debug build of Python
also links in the debug version of Microsoft's malloc.

The valgrind report is pointing at the same thing.  Whether
this leads to a crash is purely an accident of when and how
the system malloc happens to reuse the freed memory.

--

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-10-27 21:56

Message:
Logged In: YES 
user_id=33168

Mike, what platform are you having the problem on?

I tried Tim's hope.py on Linux x86_64 and Mac OS X 10.4 with
debug builds and neither one crashed.  Tim's guess looks
pretty damn good too.  Here's the result of valgrind:

Invalid read of size 8 

   at 0x4CEBFE: PyTraceBack_Here (traceback.c:117) 

   by 0x49C1F1: PyEval_EvalFrameEx (ceval.c:2515)  

   by 0x4F615D: gen_send_ex (genobject.c:82)   

   by 0x4F6326: gen_close (genobject.c:128)

   by 0x4F645E: gen_del (genobject.c:163)  

   by 0x4F5F00: gen_dealloc (genobject.c:31)   

   by 0x44D207: _Py_Dealloc (object.c:1928)

   by 0x44534E: dict_dealloc (dictobject.c:801)

   by 0x44D207: _Py_Dealloc (object.c:1928)

   by 0x4664FF: subtype_dealloc (typeobject.c:686) 

   by 0x44D207: _Py_Dealloc (object.c:1928)

   by 0x42325D: instancemethod_dealloc (classobject.c:2287)

 Address 0x56550C0 is 88 bytes inside a block of size 152
free'd
   at 0x4A1A828: free (vg_replace_malloc.c:233)

   by 0x4C3899: tstate_delete_common (pystate.c:256)   

[ python-Bugs-1603789 ] grammatical error in Python Library Reference::Tkinter

2006-11-27 Thread SourceForge.net
Bugs item #1603789, was opened at 2006-11-27 15:53
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603789&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Gabriel M. Elder (eldergabriel)
Assigned to: Nobody/Anonymous (nobody)
Summary: grammatical error in Python Library Reference::Tkinter

Initial Comment:
It's located here: http://www.python.org/doc/current/lib/node690.html

"Flags are proceeded by a `-', like Unix shell command flags, and values are 
put in quotes if they are more than one word."

"proceeded" should be "preceded"

--

>Comment By: Georg Brandl (gbrandl)
Date: 2006-11-27 18:51

Message:
Logged In: YES 
user_id=849994
Originator: NO

Thanks for the report, fixed in rev. 52850, 52851 (2.5).

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603789&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1595822 ] read() in windows stops on chr(26)

2006-11-27 Thread SourceForge.net
Bugs item #1595822, was opened at 2006-11-13 11:17
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1595822&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.5
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: reson5 (reson5)
Assigned to: Nobody/Anonymous (nobody)
Summary: read() in windows stops on chr(26)

Initial Comment:
>From standard distribution (installation through .exe 
file):

open() function in Windows (I have win2k and xp)
opens files in text mode and stops on chr(26).
I cannot parse a binary file (!).
On Linux all works fine.

Regards,
   Reson5


--

>Comment By: SourceForge Robot (sf-robot)
Date: 2006-11-27 19:20

Message:
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

--

Comment By: Georg Brandl (gbrandl)
Date: 2006-11-13 11:29

Message:
Logged In: YES 
user_id=849994

chr(26) or Ctrl+Z is the end-of-file character in Windows,
for text-mode files.

If you open the file in binary mode, e.g. with
open("filename", "rb"), there should be
no problems with reading the chr(26).

--

Comment By: reson5 (reson5)
Date: 2006-11-13 11:20

Message:
Logged In: YES 
user_id=1355850

To clarify,
The behavior is not uniform
on Linux it opens in binary and on windows in text (!)

Regards, 
Reson5


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1595822&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com