Live data from Hacker News

Python Ecosystem - An Introduction

mirnazim.org

31–40 of 78 posts

Re: Python Ecosystem - An Introduction

#31
post #3

pip is a neat system and all, but I still don't see why to use that versus a system package?

if you have multiple projects on a system you may have different dependency requirements. module with version 1 for one project and the same module with version 2 for the other project.

pkg_resources.require() can handle this case. Though `virtualenv` is more explicit.

Re: Python Ecosystem - An Introduction

#32
post #14

I'd love to have one of these for Ruby. Every time I want to try out something written in Ruby I run head-first in to the packaging problem - Debian and Ubuntu don't appear to like shipping a working gem (presumably because it conflicts with how apt likes to do things) and the documentation on how to resolve the resulting inscrutable error messages isn't particularly easy to find. The Mac is a bit better, but I still…

I followed this while learning best practices for Ruby:

http://ascarter.net/2011/09/25/modern-ruby-development.html

It seemed to cover everything that I wanted, coming from a familiar Python background of pip/virtualenv/etc. For reference here's the associated HN commentary:

http://news.ycombinator.com/item?id=3044908

Re: Python Ecosystem - An Introduction

#33
post #28

A 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…

My indented audience was not the pure beginners. I was targeting for developers coming to python from other platforms. Over past 2 years, if I have learned one thing while training interns, trainees and experience devs in Python/Django, it is that packaging confuses people a lot. apt-get vs easy_install vs pip. That is why I choose to spend most time on package management and virtualenv etc. I think, I should have included stronger indications of this.

In general, your feedback is very good and important. Idiomatic Python specifically is an important resource and should have been included.

I will incorporate your feedback as soon as I can squeeze out some time.

Big Thanks!

Re: Python Ecosystem - An Introduction

#36

> Choose Python 3 only if you need to and/or fully understand the implications. I would apply the "if you need to" part to Python 2. "3 if you can, 2 if you must"

Python 3 is still an "eyes open" choice. Python.org all but comes out and says that 2 is still the safer choice. http://wiki.python.org/moin/Python2orPython3 tl;dr "If 3 does everything you need, great. However, there's a good bit of things that still don't work with 3, in which case 2 is the safer choice. Here's a pretty long list of reasons why 2 is probably better for you. ..."

I agree that as of late November 2011, Python 2.7 is the safer choice for a novice.

But I bet within a year, that's no longer true. (This is dependent on package migration, but there's been a lot of progress lately, and the chances of a novice needing a sophisticated package day one is slim anyway.)

There are a few items that Python 3 fixes that will make this a no-brainer when the vast majority of major packages are ported to 3. Specifically, floating point results of integer division, and print as a function are two that come to mind.

I can't tell you how many times I cursed at the same bug as a beginner (back before division was importable from __future__). 1/2 + 1/2 = 0. Uggh!

And the beginner may as well get in the habit day 1 of using parentheses in statements like print("Hello World").

Re: Python Ecosystem - An Introduction

#39
post #27

Please keep the great feedback coming. I will try to incorporate as much as possible. I am indebted to HN community for the great feedback so far.

As an additional supplement - here's a pile of links I've collected that might apply: http://jessenoller.com/good-to-great-python-reads/

Re: Python Ecosystem - An Introduction

#40
post #39
post #27

Please keep the great feedback coming. I will try to incorporate as much as possible. I am indebted to HN community for the great feedback so far.

As an additional supplement - here's a pile of links I've collected that might apply: http://jessenoller.com/good-to-great-python-reads/

Man. That's one hell of a collections. Thanks for sharing
Post reply on HN