Python
Inhaltsverzeichnis |
PIL = Pyhton Image Library
installieren
bei gentoo:
#PIL python image library emerge imaging
links
homepage: http://www.pythonware.com/products/pil/index.htm
howto:
http://www.pythonware.com/library/pil/handbook/ http://effbot.org/imagingbook/ http://infohost.nmt.edu/tcc/help/pubs/pil/index.html
optimierung mit getdata():
http://effbot.org/zone/image-histogram-optimization.htm
gd mit python
http://newcenturycomputers.net/projects/gd-ref.html
pymedia
zugriff auf filme usw
http://www.pymedia.org/
docs:
http://pymedia.org//docs/index.html
doch nur einige filme gehen, andere nicht, vorallem welche mit mencoder selbst geschriebene gehen nicht!
mimetype und file suffix
relevante suchwörter: file name extension python mime
module mimetypes:
http://docs.python.org/lib/module-mimetypes.html
linux, standart file mime und file name extension
/etc/mime.types
python als cgi
erstes beispiel
von http://www.python.org/doc/essays/ppt/sd99east/sld041.htm
apache configuration, wenn die beiden dateien in /var/www/raw/ liegen:
<Directory /var/www/raw/>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
und das unkommentieren:
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
AddHandler cgi-script .cgi .sh .pl .py
das form.py script
#!/usr/bin/python
import cgi
def main():
print "Content-type: text/html\n"
form=cgi.FieldStorage()
if form.has_key("firstname") and form [[firstname]].value !="":
print "<h1>hoi", form[[firstname]].value,"</h1>"
else:
print "<h1>Fehler, gebe zuerste den first name ein</h1>"
main()
die dazugehörige website form.html
<html> <body> <form method="get" action="form.py"> <p>first name :<input type="text" name="firstname"> <p>last name :<input type="text" name="lastname"> <p>to submit, click:<input type="submit" value="yeah"> <input type="hidden" name="session" value="1f9a2"> </form> </body> </html>
mod_python
statt über das cgi interface kann python auch über mod_python für apache von apache betrieben werden. auch kann über mod_python auch psp (python server pages) wird über mod_python benutzt.psp erlaubt es wie php code direkt in html zu schreiben, dieser wird dann durch mod_python ausgeführt.
performance
http://wiki.python.org/moin/PythonSpeed/PerformanceTips
links
hompage:
http://www.modpython.org/
sonst:
http://de.wikipedia.org/wiki/Mod_python http://www.onlamp.com/pub/a/python/2003/10/02/mod_python.html
psp (python server pages):
http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html
links zu python
- http://www.python.org/doc/2.4.1/
- python wiki: http://www.python.org/moin/
- python debuger für jdit: http://jpydbg.sourceforge.net/
- regular expression: http://www.amk.ca/python/howto/regex/
- qickref: http://rgruet.free.fr/PQR2.3.html