Line endings in loaded OTL scrips/extra files

   1701   0   1
User Avatar
Member
9 posts
Joined: 4月 2009
Offline
Howdy!

I have a number of python modules that I am adding to OTLs in either the scripts panel or extra files panel (both have the same behaviors I will describe).

When I press the “Reload All Files” button, all the files are indeed reloaded, but it appears that they are being loaded with Windows style (ie “\r\n”) style line endings. If I just float my mouse over the new file and hit return (adding a newline to the top of the file) then they are all converted to Unix style (ie “\
n”).

I have determined this by printing `repr(source)` just inside the _createModule function in the toolutils.py module, as I am using toolutils.createModuleFromSection to build modules from these files.

The problem is that the Windows style line endings that are in there initially will not compile. The compile call in the _createModule function throws a SyntaxError.

My files all have Unix style endings.

Any ideas as to what is up?
  • Quick Links