mod_python: what's going on here?

2005-09-04 Thread Robert J. Hansen
I'm not entirely certain comp.lang.python is the proper newsgroup for
mod_python questions, but "comp.lang.python.web" doesn't seem to exist,
so... my apologies in advance if this is considered off-topic.

I'm attempting to get mod_python 3.1.4/python 2.4.1 working on Apache
2.0.54 running under OS X.  Apache was compiled from source with a
simple

/configure --enable-so --with-mpm=worker

... followed by the make/make install dance.  mod_python was almost as
simple:

./configure --with-apxs=/usr/local/apache2/bin/apxs \
  --with-python=/sw/bin/python2.4

... followed by the requisite dance.

At this point, all's well.  The following bits were added to
httpd.conf:

LoadModule python_module /usr/local/apache2/modules/mod_python.so

   AddHandler mod_python .py
   PythonHandler mptest
   PythonDebug on


... one apachectl restart later, Apache was running fine and serving
pages.  The version string at the bottom of some static pages listed
mod_python as being present, so I reckoned that meant it was all
installed all right.  However, any attempt to serve a mod_python
script, mptest.py, from the test subdirectory results in a 500 Internal
Server Error.  Nothing gets written to error_log, but access_log
confirms the 500 was sent.

Does anyone have any experience with mod_python on OS X/Apache
environments?  Can anyone shed some light on 500s that don't leave
traces in the error logs, or what precise incantation I need to make
mod_python start serving up scripts?

Also, if this is not appropriate for this group, does anyone know of a
Python group for which this is more appropriate?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What is unique about Python?

2005-12-23 Thread Robert J. Hansen
> [w]hat is innovative about Python, either in its design or implementation?

This is probably the wrong approach to take.

What Python brings to the table isn't a new capability, but an elegant
and straightforward notation.  It's not as beautiful as LISP, but it's
close.  Sell it on that, not on any unique or rare capabilities.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Open letter to BDFL begging forgiveness.

2006-08-06 Thread Robert J. Hansen
ObWarning: I'm not Guido.  I'm not even a friend of Guido.

That said, some people think I have a clue about the open-source
community, so maybe this will be worth something.  And perhaps it
won't.  Take it with a grain of salt.

> However, I am beginning to suspect that my status as persona
> non grata in your eyes is getting in the way of other people in
> this group to accept me.

This may be a hard thing to come to terms with, but you're probably not
important enough to be persona non grata.  After all, in order to be
persona non grata you have to be... a persona.  No, no, I'm not telling
you that you're not a person.  But ask yourself: what have you done for
Python lately?  What have you done to warrant being treated like a Kent
Pitman, a James Kanze, a Peter Seibel, an Alex Martelli, just to pick a
few well-known and well-respected names from various programming
languages?

Join mailing lists.  Become active in a user's group.  Write code.  Be
generous with your knowledge.  Help newbies.  Practice humility.
Always ask yourself, "could I be wrong here?"

Do it for long enough and you'll get a reputation for being a
productive member of the community.  And then you'll find that you
never needed 'forgiveness' at all.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: excel in unix?

2006-08-10 Thread Robert J. Hansen
> is it possible to create excel files using python in Unix env?

Yes.  An Excel file is just a sequence of bytes, and Python can write
sequences of bytes just fine.  So can many other languages, but why
would you want to use anything but Python?

That's a useless answer to your question, I know.  Perhaps in the
future you may wish to consider asking a more focused question: it
helps people understand precisely what you want to know, and helps
people avoid giving you true-but-useless answers.  :)

> if so, what module should i use?

Python does not have built-in support for Excel-formatted data.
Microsoft Excel is a closed source program with a proprietary data
format, as evidenced by the extreme difficulty competing spreadsheet
software has in correctly implementing the format.  More than that,
attempting to do so would very possibly open Python up to some
unpleasant corners of IP law.

I'd suggest using the formats of Gnumeric or OpenOffice, since those
are open and fully documented.  When you're done, just load them up in
Gnumeric or OpenOffice and use those apps to export them to Microsoft
Excel.  OpenOffice is scriptable--I don't know about Gnumeric--so this
will probably not be unduly painful.

That said, I certainly haven't tried it.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Encryption

2006-02-16 Thread Robert J. Hansen
Honestly, the best thing you can do when it comes to writing crypto
code is _not_ write crypto code.  It's far better to instead use
pre-existing, trusted, scrutinized, audited code.  You'll probably be
better served looking for a Python interface to OpenSSL, which will
provide you with all the algorithms you'll want and then some.

pyopenssl might be what you're looking for, it might not.  I've never
used it, but that looks like the place to start.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python vs. Lisp -- please explain

2006-02-19 Thread Robert J. Hansen
> what [is it] about Python that is so different from Lisp that it
> can't be compiled into something as fast as compiled Lisp?

IMO, it's the lack of competing implementations.

LISP has a very well-defined ANSI specification.  Lots of different
people have written LISPs, from Franz to Steel Bank to GNU to... etc.
Each of these competes with the others on different grounds; some are
purely interpreted (ala CLISP), some are compiled (CMUCL), some are...
etc.  They all implement substantially the same language, but the
plethora of different implementations has been a tremendous boon for
the development of efficient compilers, interpreters and garbage
collectors.

By comparison, Python lacks anywhere near as many competing
implementations.

In some respects the lack of competing implementations is a Good Thing.
 In some respects it's a Bad Thing.  On balance it's just a thing.

-- 
http://mail.python.org/mailman/listinfo/python-list