Great post - I wish there was a unified resource for things like that for other languages/tools. I would only add iPython - a must for any console adventures.
ipython has known issues running certain code. It is not guaranteed to function like a normal interpreter. If you insist on a fancy interpreter, use bpython.
Python Ecosystem - An Introduction
71–78 of 78 posts
Re: Python Ecosystem - An Introduction
#72A formidable effort. It might be matter of taste but recommendations given starting from "Understanding the packages" and to "Install packages that need compiling" are almost harmful. My preference: * you should not care what is your `sys.path` looks like. You need it for debugging if something goes horribly wrong. A tutorial might mention it but things like `sys.path.insert(0,..)` should be avoided or accompanied wi…
Re: Python Ecosystem - An Introduction
#73A formidable effort. It might be matter of taste but recommendations given starting from "Understanding the packages" and to "Install packages that need compiling" are almost harmful. My preference: * you should not care what is your `sys.path` looks like. You need it for debugging if something goes horribly wrong. A tutorial might mention it but things like `sys.path.insert(0,..)` should be avoided or accompanied wi…
> System packages should be managed by a system packager. You shouldn't be using the system Python. Should compile from source and put in /opt/ /. And that shouldn't be owned by some random user. So, you should be using sudo.
Re: Python Ecosystem - An Introduction
#74Earlier quoted context omitted.
ipython has known issues running certain code. It is not guaranteed to function like a normal interpreter. If you insist on a fancy interpreter, use bpython.
These issues are not known to me, could you expand?
There used to be a problem with certain statements being executed as expressions and printed, but I'm told that's been fixed.
The encoding is always Latin-1. Always. Hope you don't use Unicode literals.
It's not Python. It's Python plus other things. That's always a Bad Thing because it precludes taking results from the interpreter and using them in plain Python contexts. web2py also has this problem.
Re: Python Ecosystem - An Introduction
#75Re: Python Ecosystem - An Introduction
#76A formidable effort. It might be matter of taste but recommendations given starting from "Understanding the packages" and to "Install packages that need compiling" are almost harmful. My preference: * you should not care what is your `sys.path` looks like. You need it for debugging if something goes horribly wrong. A tutorial might mention it but things like `sys.path.insert(0,..)` should be avoided or accompanied wi…
Agree with your points. Would add emphasis on ipython and heavy use of interpreter, pylint instead of pyflakes, "learn and prefer builtin modules" rule, and Python in a Nutshell on the desk.
What are your reasons for preferring pylint?
Re: Python Ecosystem - An Introduction
#77Great post. I would add: * the site module, which is imported by default and is what is responsible for setting up the default sys.path. You can skip 'import site' by running python with the -S switch. the site module is written in python, so you can scan through it and understand how python starts up and inits. * PYTHONSTARTUP env variable, which points to a python file that is run (like a bashrc, or AUTOEXEC.BAT, i…
* coloured prompt
* tab-completion
* persistent history
Here's mine: http://mg.pov.lt/pythonrcRe: Python Ecosystem - An Introduction
#78Earlier quoted context omitted.
Great Pythonesque pun there! indented==intended, I'm sure.
This happens to me all the time. My most favorite is when I have to type the word "important", my mind spells "I M P O R T A N T" but my fingers instinctively stop at "import".