[Chicago] Windows end-of-line and Python

Ken Wasetis [Contextual Corp.] ken.wasetis at contextualcorp.com
Thu Mar 3 04:10:21 CET 2011


When I have a client that runs python on Windows, the de facto, FOSS 
Python IDE that I use is the IDLE editor that either gets installed by 
the Windows installer (.exe) that you downloaded from python.org (check 
the Start menu) or that comes from installing the pywin32 package - 
can't recall which, but it's more than a Notepad replacement, if you 
haven't used it.  It has pythonic syntax highlighting and makes 
debugging your python script in a shell window that it can also open, a 
very trivial thing to do.  4 stars.  This is what I'd have your client 
get used to using on Windows, if they have no interest in other, more 
robust editors.  Does the trick.

Ken

On 2/19/11 6:22 PM, Jonathan Hayward wrote:
> Today I was visiting with a friend and installing OSS on his computer. 
> On an x86_64 Windows 7 box, he had already installed Apache, and I 
> installed Python with a python.org <http://python.org> installer. I 
> opened up Notepad and created a "Hello world" Python CGI script, put 
> it in the cgi-bin directory, saw it crash, and looked in the logs.
>
> The log message complained that I had tried to "import cgi\r": in 
> other words, Python on Windows was choking because the file I made in 
> Notepad used "\r\n" for line breaks. (The equivalent script made with 
> vim, and presumably "\n" for line breaks worked predictably.)
>
> Isn't it a defect/design flaw for Python on Windows to choke on 
> "\r\n"-separated files? Should I file a bug, or is this a side effect 
> of decisions that are now non-negotiable? (I wasn't thrilled, after 
> trying to sell my friend on the idea that Python is a good language 
> with a low barrier to entry, to find that it choked on a 
> Notepad-edited "Hello world!" CGI script.)
>
> -- 
> → Jonathan Hayward, Author, Django JavaScript Integration: AJAX and jQuery
> <https://www.packtpub.com/django-javascript-integration-ajax-and-jquery/book> 
>
> → Author Bio 
> <https://www.packtpub.com/authors/profiles/jonathan-hayward> • 
> LinkedIn Profile <http://www.linkedin.com/in/jonathanhayward> • 
> jonathan.hayward at pobox.com <mailto:jonathan.hayward at pobox.com>
> → Ajax, CGI, CMS, CSS, Django, HTML, IA, JSON, JavaScript, LAMP, 
> Linux, MVC, Perl, PHP, Python, SQL, UI, Unix, Usability, UX, XHTML, XML
> → With a good interest in the human side of computing and making 
> websites a joy to use
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20110302/43bde711/attachment.html>


More information about the Chicago mailing list