Create a single standalone .exe from a Python program

I have been working on a small windows command line tool that I wanted to distribute it as a single executable file on windows. I tried cx_freeze and py2exe. Both of these tools worked well, but I couldn't find an easy way to compress make the whole program into a …

more ...

View string including special characters like newlines in Python

After spending a frustrating hour or two trying to format a string, i stumbled on python's repr() funcion. repr() allows you to inspect a string object when you're troubleshooting your code. For example:

I was trying to understand a string that was shown in the terminal like this:

print mystring …
more ...