View Single Post
Old 02-29-2012, 12:31 PM   #308
KevinH
Guru
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 836
Karma: 349410
Join Date: Nov 2009
Device: many
Hi,

Thanks for that info. Interestingly, a feature of most unzip programs is the ability to do automatic end of line conversions since there is no way for a cross-platform script file to have only one set of line ending across all platforms.

On my command line version of unzip this is done using the -a option.

So will you please try by grabbing the .zip again and unzipping it using the command line:

unzip -a Mobi_Unpack_v041.zip

and see if that same problem still happens. On my machine, unzip recognizes that python scripts are text files and converts the \r\n to just \n line endings automagically.

Please let me know what you find out.

KevinH

Quote:
Originally Posted by frostschutz View Post
Thanks.

Mobi_Unpack.pyw does not run natively in Linux (when trying to start it directly) because it uses DOS style \r\n line terminators, so it keeps looking for a "/usr/bin/python\r" which naturally does not exist. So it has to be started with "python Mobi_Unpack.pyw" or loaded and saved with Unix style \n newlines.

I'll test this in more detail when I get my next mobi book.
KevinH is offline   Reply With Quote