Migrating to perl?

Skip Montanaro skip at mojam.com
Fri Jan 5 10:11:16 EST 2001


    Joel> I thought of the question about security and the need for taint
    Joel> modes but then I realized since there may not be system calls like
    Joel> `del *.*` there might not be a need for it.  I'm sure that if
    Joel> Python is in general use as a CGI language then those issues have
    Joel> been cleared up.  Are there any thing you have to watch for like
    Joel> running in taint mode in perl?

There are ways to execute "del *.*":

    import os
    os.system("del *.*")

I've been fortunate enough to always work on my own web servers and never
have to worry about other peoples' code messing with my system, but if
you're providing server space to potentially hostile clients, check out the
rexec (restricted execution) module.

BTW, once you have the basics of Python down, this URL will generally be
your most frequently used link into the documentation:

    http://www.python.org/doc/current/lib/modindex.html

    Joel> My main reason is I'm working on a web based game and need to
    Joel> build a map image dynamically.  Its a hex based map and I worked
    Joel> hard with the help of geometry expert on another group to make it
    Joel> work right.  I would hate to have to build a module like that from
    Joel> scratch, especially since graphic file standards are not exactly
    Joel> my forte.  I only have a vague understanding of their inner
    Joel> workings.

If it's written in C, you should be able to write a wrapper (in C) around it
that will make its functionality available from Python.  If that's the case,
check here:

    http://www.python.org/doc/current/ext/ext.html

    Joel> I just downloaded Activestates build for Python.  I went there
    Joel> first since I've got accustomed to their services.  Is a good
    Joel> build?  As good as Pythonlabs?  Better?

I couldn't tell you.  I'm a Unix weenie.  I boot my laptop into Windows when
I need to run Excel... ;-)

    Joel> BTW, I noticed when I first looked around this newsgroup there was
    Joel> a mention of a couple of options of using Perl modules with
    Joel> Python.  Minotaur I think it was called.  Could you use that to
    Joel> wrap Python around Mason?  I agree, its a nice package.  I really
    Joel> don't have a problem with perls packages but writing my own or
    Joel> doing anything off the beaten path is getting to be too much like
    Joel> work -- making the hard things harder.

Probably not a solution for me.  On the other hand, I believe the folks at
Digital Creations were working on a scheme to allow so-called external
methods written in Perl to be executed within their Zope web application
system.  I've no idea what the status of that is.

-- 
Skip Montanaro (skip at mojam.com)
Support the Mojam.com Affiliates Program: http://www.mojam.com/affl/
(847)971-7098




More information about the Python-list mailing list