Python does not play well with others

S

Szabolcs Nagy

Paul said:
Numpy should certainly be included and I think there are efforts in
that direction. There is also a movement to choose a web framework to
include and Django might be a good choice. I think the Zope
maintainers want to keep Zope separate and I think PIL has an
incompatible license...

do not do that

(1)
i love when i can create a minimalistic system

think about it this way: what if you want to run python on an embeded/
low resource system?

if you want python to do webhosting the solution is _not_ to include
every related package

look at eg. debian: you can use it for lowresource system, desktop,
scientific computation and for webserver as well because of it's
package management system --> you can build a min. system and a huge
system as well.

(2)
seriously, python is a programming language and not a flee market (so
don't compare it to java or php)

unfortunately lots of ppl working on web related stuff think web is
the only reason a programming language should exist, which is pretty
stupid

i don't want a "webmodule" in a stdlib at all. implementing the
standards and recommendations should be enough. web in general is a
huge and ugly bloat, keep it away from a language core.

(3)
having a maintained set of modules for every possible problem is nice,
but shouldn't be a part of the core lib.

eg. numpy, mysql, ssl, pil, ... are not needed in the stdlib since
most of the programming tasks don't need those

they should be maintained separately, with an easy way to find and
install them. that's what cheese shop and distutils are for.

for me batteries included means i get a clean and consistent stdlib
and if i need special functionality i can add modules and extensions
easily

nsz
 
P

Paul Rubin

Ben Finney said:
Python is being touted as a good language for *many* purposes, not
just web applications. Python is also a "competitor" to Java, to Ruby,
to Perl, to many other languages. They all have strengths and
weaknesses.

Yes but in the cases where Python's weakness compared with one of
those other languages is lack of library functionality, if Python can
remedy the weakness by incorporating similar functionality into its
library it should do so.
That doesn't follow at all. Many consider the humungous function
library of PHP to be a significant downside of the system, which
criterion leaves Python ahead. More is not necessarily better.

I've never heard that as a PHP criticism, at least in any large scale
deployment, which is what a hosting service is.
In which case, there should be no problem with *you* installing
whatever software you need to use the system for what you want.

No. That would be colo or something similar , where I'm basically
paying for bare metal plus electricity and network, and I'm completely
in charge of the software. Web hosting means the ISP is in charge of
all the software except for my application (i.e. they handle the OS,
language package, web server, and db, as described above). So they
run (typically) Linux, MySQL, Apache, and PHP; and I get to upload my
own PHP apps and use the PHP library. That's a lot less work for me
since I don't have to stay on top of kernel patches or firewall
configuration, and it's cheaper because they host a bazillion sites
(virtual hosts) in a a single server instance.
Either they are providing far more than the minimal set you describe
above, or this is entirely outside their domain. Make up your mind.

No it's you who's got it wrong, I just described above what they're
doing. Do you actually use any services like this?
You can't claim both that the hosting company should have to maintain
a comprehensive set of functionality, *and* that they should not have to.

They should get a distro that includes a lot of stuff, type "make",
and all the stuff becomes available to their users.
 
P

Paul Rubin

Diez B. Roggisch said:
This is simply not true. J2SE doesn't include a web-framework. J2EE
does, but it's a separate multi-megabyte-download.

I thought J2SE comes with JSP. Maybe that's not a "framework" in the
fancy sense though.
PHP _is_ a web centered language, so to say it "includes" a
And _both_ of them don't contain DB connectivity modules! J2SE has
JDBC - which is just a bunch of interfaces. You need to download each
and every driver.

Hmm, I thought it came with drivers. Maybe those come with the db
instead?
 
P

Paul Rubin

I can't speak authoritatively for either PHP or J2SE, but I suspect the
latter at least has some signifiant monetary support (if not outright gobs
of human resources) from Sun. PHP seems to have a more limited application
domain (web apps) from which it has expanded a bit. Can I build a PHP site
out of the box with a PostgreSQL or Oracle backend?

I believe so, from having looked at the docs a while back, but I
haven't tried it.
Does J2SE have something comparable to Numpy or scipy?

I don't think so, but Python doesn't either.
While might do the occasional bit of Python hacking for free, I still need
to put food on the table. My employer doesn't care if MySQLdb (to use one
of your examples) is delivered with Python or not. They aren't likely to
want to support me to solve your problems.

The same could be said of Tkinter (a large and complex library module)
or IDLE (a full blown mid-sized application shipped with Python). The
answer is the same for both: if you don't need to use a given module,
then don't. Why would I expect your employer to solve my problems
anyway, even if they relate to some module that you actually use?
 
P

Paul Rubin

iceberg.) The Pylons, web.py, Karrigell, Webware and TurboGears people
might (rightly) feel slighted if you include Django but not their
frameworks.

Yeah well, the Wxpython, PyQt, PyGTK etc. people may feel slighted
that Tkinter got included and their stuff didn't, and the Eric,
Eclipse, Komodo etc. people may feel slighted that IDLE got included,
but that doesn't stop Tkinter and IDLE from being useful and worth
shipping in Python. We were talking about db connectivity modules
which are quite a bit simpler than tkinter. We were also talking
about an SSL wrapper, which *is* included with Python, but is broken
(doesn't examine certificates) so people use external modules instead,
which is just lame.
Where would you stop? At the boundaries of your particular application
interests?

Basic competitive analysis. People ask here all the time "I'm trying
to write application XYZ, should I use language L or should I use
Python" (L is usually Java or PHP but can be other things). There's
always immediately a flood of responses about why Python is better
than language L for application XYZ. If the Pythonistas are serious
about such a claim, competitive analysis says they should be willing
to look at what language L does to support application XYZ (example:
PHP includes database connectivity), make a checklist of L's features,
and see to it that Python achieves (at least) parity in those areas.
 
K

Kirk Sluder

Paul Rubin said:
I do think the core should have more stuff than it does, so that its
functionality can be on a par with competing language distros like
J2SE and PHP. Both of those distros include database connectvity
modules and web frameworks.

Can't speak for PHP, but J2SE requires the additional installation
of the Mysql Connector/J JDBC driver. Java also does not include a
web framework as far as I can tell, with many people bolting on
struts and Tomcat for this purpose.

Now granted, it may or may not be a good idea for python to copy the
java way of doing things by including the generic database API into
the core libraries rather than expect database module developers to
use the API. But that doesn't solve the core problem that you can't
get database connectivity just through the core language.

And for that matter, perl doesn't include the database drivers or a
web framework either.

php does, but I've always considered php to be a web framework with
an embedded programming language. Comparing python to php here
strikes me as comparing apples and oranges.
 
D

Diez B. Roggisch

Paul said:
I thought J2SE comes with JSP. Maybe that's not a "framework" in the
fancy sense though.

JSP is also part of J2EE.

http://java.sun.com/products/jsp/

"""
Another key concern of the Java EE 5 specification has been the
alignment of its webtier technologies, namely JavaServer Pages (JSP),
JavaServer Faces (JSF), and JavaServer Pages Standard Tag Library (JSTL).
"""
Hmm, I thought it came with drivers. Maybe those come with the db
instead?

Might be, for some. For others where the vendor doesn't care about Java,
they aren't.

And they certainly require special treatment like putting them in the
classpath, setting up the project directory and the like - no simple
import will work out of the box, as it would witch python standard lib
drivers.

diez
 
D

Diez B. Roggisch

Paul said:
I believe so, from having looked at the docs a while back, but I
haven't tried it.

The docs cover all the available drivers, as they are hard-coded in the
source. Yet you need to specify inclusion of them at compile-time, and
as I said: some distros don't ship with non-OS-drivers.
I don't think so, but Python doesn't either.


The same could be said of Tkinter (a large and complex library module)
or IDLE (a full blown mid-sized application shipped with Python). The
answer is the same for both: if you don't need to use a given module,
then don't. Why would I expect your employer to solve my problems
anyway, even if they relate to some module that you actually use?

As far as I can tell, primary concerns for inclusion of modules are twofold:

- dependencies, which certainly are an issue for DB-modules! Or do you
want every python build to need the oracle OCI drivers installed? Plus
headers?

- maintainer commitment.

Diez
 
K

Kirk Sluder

Paul Rubin said:
If the Pythonistas are serious
about such a claim, competitive analysis says they should be willing
to look at what language L does to support application XYZ (example:
PHP includes database connectivity), make a checklist of L's features,
and see to it that Python achieves (at least) parity in those areas.

Well, digging into this, php includes database connectivity if
compiled against the database client libraries. So it's not as if
you can just download php and have it work against the database you
want.

I also don't think that python as a general-purpose programming
language is in direct competition to web frameworks like PHP and
ColdFusion. Perhaps the right answer is to say that PHP is a better
solution for people wanting a web templating framework with embedded
scripting, while Python is a better solution for people who want a
general scripting/application language with broad support for
specific applications via add-on modules.

But then again, I'm one of those heterodox people who argue that one
should fit the tool to the problem. Common Lisp, bash, awk, sed and
R are other great languages for different domains.
 
P

Paul Rubin

Diez B. Roggisch said:
And they certainly require special treatment like putting them in the
classpath, setting up the project directory and the like - no simple
import will work out of the box, as it would witch python standard lib
drivers.

Well, that's nowhere near as big a deal as having yet another set of
vendors or maintainer to deal with. Minimizing configuration is nice,
but getting your software from as few different sources as possible is
also a big win.
 
J

Jorge Godoy

Paul Rubin said:
Well, that's nowhere near as big a deal as having yet another set of
vendors or maintainer to deal with. Minimizing configuration is nice,
but getting your software from as few different sources as possible is
also a big win.

So we should get a better egg support. Then it would all be just a matter of
easy_install <something>. As it is that easy for thousands of modules on CPAN
for Perl.
 
S

skip

Szabolcs> seriously, python is a programming language and not a flee
Szabolcs> market (so don't compare it to java or php)

If it grew to be as bloated as Java it might well become a "flee"
market. ;-)

Skip
 
S

skip

Paul> Why would I expect your employer to solve my problems anyway, even
Paul> if they relate to some module that you actually use?

Your reasoning seems to be that Python should contain the functional union
of everything at least in Java and PHP if not Perl, Ruby and Tcl as well.
Free software or not, each person who contributes to the development of the
Python core has to put food on the table. As an example, I suspect most
core Java development is funded directly by Sun who pays its employees to
develop libraries, JIT compilers and the like. While my employer pays me to
program in Python I'm not paid to develop core Python code. What little I
do is done on my own time.

If you want to turn the Python distribution into a kitchen sink, make the
argument on python-dev and be prepared to shoulder your share of the burden
should your arguments sway the group as a whole.

Skip
 
S

skip

Paul> Yeah well, the Wxpython, PyQt, PyGTK etc. people may feel slighted
Paul> that Tkinter got included and their stuff didn't, and the Eric,
Paul> Eclipse, Komodo etc. people may feel slighted that IDLE got
Paul> included, but that doesn't stop Tkinter and IDLE from being useful
Paul> and worth shipping in Python.

They were both pretty much the only games in town when they were included
with Python. If they were developed in today's environment I doubt they
would be included.

Paul> Basic competitive analysis. People ask here all the time "I'm
Paul> trying to write application XYZ, should I use language L or should
Paul> I use Python" (L is usually Java or PHP but can be other things).

So every time some lame ass PHP refugee gripes about something they think
Python is missing which PHP includes we should scan the horizon for all the
candidates and toss them in the next release?

Skip
 
S

skip

Jorge> So we should get a better egg support. Then it would all be just
Jorge> a matter of easy_install <something>.

I'm all in favor of that...

Skip
 
D

Dennis Lee Bieber

On 02 Feb 2007 11:10:04 -0800, Paul Rubin <http://[email protected]>
declaimed the following in comp.lang.python:

A day late but, what the heck...
languages do. PHP hosting providers don't have to install a separate
PHP to MySQL interface gizmo as far as I know.

Really? Then why does the MySQL AB download site at
http://dev.mysql.com/downloads/connector/php/ list both a
"Connector/PHP" AND a "native MySQL driver" for PHP? Along with ODBC,
..NET, and two variations of Java connectors.

--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
D

Dennis Lee Bieber

Now granted, it may or may not be a good idea for python to copy the
java way of doing things by including the generic database API into
the core libraries rather than expect database module developers to
use the API. But that doesn't solve the core problem that you can't
get database connectivity just through the core language.
Off-hand, the equivalent to Java's JDBC would be to have a standard
ODBC module in Python. One would still have to install the DBMS-specific
ODBC drivers, but those are often supplied by the DBMS provider, and
would be independent of Python build level. THIS is something I would
agree should be put into place... I believe the win32 extension has an
early version of an ODBC module, I'm not sure what pyodbc qualifies as,
and much mention is made of mxODBC... Make one of these (probably one of
the latter two, as the win32 stuff is system specific) part of the
standard library -- it's probably then easier to get a hosting provider
to install an ODBC back-end obtained from the DBMS provider and usable
by any scripting language with ODBC modules then it is to persuade them
to build a module that is tied to language and DBMS versions.

However, most Python DB-API adapters are "native mode" drivers,
linking directly to both the Python run-time AND to the DBMS-provided
client libraries. They don't have the overhead of going through the ODBC
intervening layers and can support all the particulars of a specific
DBMS, rather than being stretched over a lowest-common denominator of
ODBC.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
P

Paul Boddie

I agree with the remark about paying them for the service. The only
reason why a provider would have Python available, an allocation of
MySQL database instances per user, but not MySQLdb installed, would be
that they want to stick with a conservative set of packages which
requires zero admin (and thus zero outlay on administration), and that
they don't understand obvious requirements for using MySQL with
Python. I don't think they'd get my business.

[...]
There are a number of languages which are primarily used for "web
development". PHP is the *only* one that ships with MySQL client
access.

Ruby doesn't (only primarily web development because of rails)
ASP, either .NET or classic, doesn't.
Java (in any form I'm aware of) doesn't.

You need to get the MySQL Connector/J driver, or whatever it's called
this month.
Cold Fusion doesn't.
Perl doesn't.

Who wants to host at a company that can't install packages anyway?

Quite. I imagine that most GNU/Linux distributions (and various BSDs)
provide at least some version of MySQLdb as a package. If a company
can't manage to provide Python plus MySQL, and then let their users
combine the two by installing a stock package (a single command or
some mouse clicks in the package manager), without offering up
"concerns" about how "secure" such a package might be (which I imagine
some providers might do if they want to discourage people from using
it), then I'd be a bit more concerned about how well they're keeping
up with security updates and how good they are at performing other
elementary administration tasks.

Paul
 
P

Paul Boddie

Paul said:
Yes but in the cases where Python's weakness compared with one of
those other languages is lack of library functionality, if Python can
remedy the weakness by incorporating similar functionality into its
library it should do so.

Python should only incorporate functionality in order to offer a
coherent experience (where the omission of functionality would
otherwise lead to a flawed experience). For example, having support
for SSL in the socket module offers a coherent experience because it
means that urllib and related modules can offer to support SSL-related
URLs out of the box. That said, there's probably a case for better
library design and having things like SSL-related "protocol handlers"
be available as plugins, detected and integrated in some kind of
framework, although this would bring in configuration issues of its
own.

[...]
No. That would be colo or something similar , where I'm basically
paying for bare metal plus electricity and network, and I'm completely
in charge of the software.

Or a virtual private server.
Web hosting means the ISP is in charge of all the software except for my application (i.e. they handle the OS,
language package, web server, and db, as described above). So they
run (typically) Linux, MySQL, Apache, and PHP; and I get to upload my
own PHP apps and use the PHP library. That's a lot less work for me
since I don't have to stay on top of kernel patches or firewall
configuration, and it's cheaper because they host a bazillion sites
(virtual hosts) in a a single server instance.

That's known as "shared hosting" these days, I believe. The advantage
of shared hosting is arguably convenience for everyone concerned: the
provider has a static configuration; the users have the stability of a
managed system. However, this only works for people whose needs are
met with that configuration, obviously. The big thing for people
wanting decent Python support in shared hosting environments (aside
from complaints about process isolation) is whether it's easy or
obvious enough for providers to make configurations that Python people
would actually use.

Probably the biggest inhibitor, as far as I can see, has been the
server technology chosen. Many hosting providers have historically
offered no better than CGI for Python, whilst PHP runs within Apache
itself, and it has previously been stated that mod_python has been
undesirable with regard to isolating processes from each other.
Consequently, a number of Python people seem to have held out for
other "high performance" solutions, which various companies now offer.
No it's you who's got it wrong, I just described above what they're
doing. Do you actually use any services like this?

If a hosting provider claims Python and MySQL support, then I'd hope
that they have worked out that the MySQLdb package glues the two
together. Perhaps better information is necessary for those hosting
companies who haven't worked such things out: you'd have a metapackage
for stuff like this in certain distributions.
They should get a distro that includes a lot of stuff, type "make",
and all the stuff becomes available to their users.

So, for the less forward-thinking providers a metapackage would be the
solution, then?

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,299
Latest member
JewelDeLaC

Latest Threads

Top