Hi,

On Wed, Jun 13, 2012 at 09:21:18AM -0400, Chris McDonough wrote:
> actually use the system Python and consider it more "part of the OS"
> than a development tool for third-party developers.  OS vendors
> don't compile Python for usage by you; they compile it and configure
> it for usage by themselves.  Their requirements may not be yours.

that should largely be a non-issue, imho. Please see below.

> effort, I probably could.  But someone new to Python probably could
> not, at least within a reasonable amount of time, and in that case,
> it's literally easier to just compile another one.

One drawback with compiling your own is that it becomes harder to track
security updates in Python. I prefer to have the 'OS vendor' do that for
me, in which case I only need to keep my virtualenvs up to date.

> consider the "system" Python the domain of the OS vendor and compile
> your own Python for your own work to shortcut all the potential
> landmines.

It also works the other way 'round, if eg. the version from python.org
is maybe not very well suited to the platform - eg. I dimly recall
problems with stock Python needing some patches to run acceptably on
*bsd, where "compiling your own" may fail just as well.

> For example, Python on Ubuntu has the following default sys.path:
> 
> Python 2.7.3 (default, Apr 20 2012, 22:39:59)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys
> >>> sys.path
> ...
> '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
> '/usr/lib/python2.7/dist-packages/ubuntuone-client',
> '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
> '/usr/lib/python2.7/dist-packages/ubuntuone-couch',
> '/usr/lib/python2.7/dist-packages/ubuntuone-installer',
> '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
> 
> Note the inclusion of Ubuntu-specific locations by default.  This
> isn't a problem unless you don't use a virtualenv.  But some
> (insanely) don't.

Instead of suggesting that people should compile their own Python by
default, the docs should imho strongly emphasize that users create a
virtualenv (or maybe one per project) for their Python work. In case the
Python is at an acceptable version, that should really solve most of the
problems. Suggesting to instead

$ sudo apt-get install virtualenvwrapper

or what that would be on other platforms, and then maybe something like

$ mkvirtualenv -a . -i pyramid --no-site-packages virtualenvname

would go a long way to make development easier and encourage good
development practice.

> The system Python on Ubuntu (and many other Linux distros) is also
> compiled with UCS4 Unicode, which effectively doubles the space
> required in memory for each Unicode string without much benefit, as
> the 99% case for webapps doesn't include characters outside the UCS2
> range (at least if those webapps don't use Asian scripts).

Now this is an interesting corner case: Probably, "UCS4 Unicode" is off
by default, which would leave the one with a self-compiled Python - you
aimed at rather clueless people in the first place, right? - might run
into hard-to-track-down trouble somewhere down the road. This appears to
be just another trade-off between support effort and eg. machine effort
(memory).

I would be glad to not have to think about such an issue, and instead
simply assume(d) that my apps would run with little additional effort,
if any, using Asian scripts as well.


Just my 0.02 cents...


Kind regards,
--Toni++

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to