Re: wxGlade not updating existing code

Dietmar Schwertberger <[email protected]> Tue, 15 Nov 2022 20:10:35 +0100
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
I think the problem is that your Python source code file uses \r as line 
endings instead of \n or \r\n.

wxGlade uses this code in common.py to read a file into a list of lines, 
but .readlines() fails in this case:

def _read_file(filename):
     "read file into a list of lines (bytes); line ending is normalized 
to \n"
     ret = []
     with open(filename, "rb") as f:
         for line in f.readlines():
             if line.endswith(b"\r\n"): line = line[:-2]+b"\n"
             yield line

Could you please try with a different line endings setting? I thought 
only old Macs before OS X were using \r.

Regards,

Dietmar



_______________________________________________
wxGlade-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxglade-general