![]() |
|
|||||||
| Newsgroup de.comm.provider.webspace Speicherplatz und Umleitung im WWW. |
|
|
Themen-Optionen | Ansicht |
|
#1
|
|||
|
|||
|
Salut!
Ich suche web hosting zum Preis von <= EUR 20/Monat, wo der unten eingefügte Beispielcode läuft. Der verwendet folgende Software: - Python >=2.6 http://www.python.org/ - ClearSilver >=0.10.5 http://www.clearsilver.net/ - Python Imaging Library (PIL) >=1.1.6 http://www.pythonware.com/products/pil/ - SQLite >=3.6.14.2 mit python interface http://www.sqlite.org/ http://docs.python.org/library/sqlite3.html Ich benötige zudem: - cron jobs - Eine Schnittstelle, um per Script E-Mail-Forwarder zu verwalten, daher erstellen und löschen. Bei postfix lässt sich evtl. mit aliases(5) was machen. - sftp access - Das Übliche: access log files, email accounts, forwarder und aliases, POP3s, IMAPs, .htaccess, cgi, https, SSL Zertifikat einstellen - In Zukunft evtl. PostgreSQL mit Python-Modulen oder auch Python 3 - >=1 GB Speicherplatz auf der HD Beispielcode: test.py #v+ #!/usr/bin/env python2.6 import hashlib, os, sys, time # Python Standard Library import Image, neo_cgi, sqlite3 # external modules connection = sqlite3.connect('test.db') cursor = connection.cursor() cursor.execute('CREATE TABLE IF NOT EXISTS \ test (hash STRING PRIMARY KEY, epoch INTEGER);') connection.commit() neo_cgi.cgiWrap(sys.stdin, sys.stdout, os.environ) page = neo_cgi.CGI() page.parse() if page.hdf.getValue('Query.image', ''): image = Image.open(page.filehandle('image')) image.thumbnail((240, 240), Image.ANTIALIAS) image.save('test.jpeg', 'JPEG') with open('test.jpeg') as file: hash = hashlib.sha256(file.read()).hexdigest() cursor.execute('INSERT OR REPLACE INTO test \ (hash, epoch) VALUES (?, ?);', \ (hash, time.time())) connection.commit() cursor.execute('SELECT * FROM test;') for row in cursor: page.hdf.setValue('image', row[0]) page.hdf.setValue('image.' + row[0], str(row[1])) page.display('test.html') connection.close() #v- test.html #v+ <h1>new</h1> <form action="" method="post" enctype="multipart/form-data"> <input type="file" name="image" /> <input type="submit" value="upload image and save hash value" /> </form> <h1>last</h1> <p><img src="test.jpeg" /></p> <h1>previous</h1> <dl> <?cs each:item = image ?> <dt><?cs name:item ?></dt><dd><?cs var:item ?></dd> <?cs /each ?> </dl> #v- Wo kriege ich solches web hosting? Wo kriege ein ähnliches Angebot? -- à dieu Andreas |
| Themen-Optionen | |
| Ansicht | |
|
|
Ähnliche Themen
|
||||
| Thema | Erstellt von | Forum | Antworten | Letzter Beitrag |
| Python Programmierer/Python Programmiererinnen | yellowtab.org | Newsgroup de.etc.beruf.selbstaendig | 1 | 09-13-2009 10:02 AM |
| Suche Leute für Python-Webshop | Volker Birk | Newsgroup de.org.ccc | 1 | 08-05-2008 07:44 AM |
| Suche Leute für Python-Webshop | Volker Birk | Newsgroup de.alt.sysadmin.recovery | 1 | 08-05-2008 07:44 AM |
| [de.comp.lang.python] Re: Fragen zu Python von einem Interessenten. | Thomas Rachel | Newsgroup de.alt.netdigest | 0 | 02-25-2008 08:55 PM |
| Suche Provider für MX Hosting | Christoph Strauch | Newsgroup de.comm.provider.webspace | 10 | 11-20-2007 08:53 PM |