issues

2016-01-14 Thread Gert Förster
Ladies, Gentlemen, using the PyCharm Community Edition 4.5.4, with Python-3-5-1-amd64.exe, there is constantly a “Repair”-demand. This is “successful” when executed. Without execution, there results an “Error code 1602” error. Please help me? Sincerely Yours, Gert Förster -- https

[no subject]

2011-03-02 Thread Gert Schmidt
Von meinem iPhone gesendet -- http://mail.python.org/mailman/listinfo/python-list

wiki language

2011-01-01 Thread gert
sider this technique in your future projects. | | client request | | \{"cmd":"order", | \ "sid":"bac0c1f9a9362f9e", | \ "input":"..."} | | server response | | \{"cmd":"order", | \ "sid":"bac0c1f9a9362f9e",

Re: http://pypi.python.org/pypi

2010-04-30 Thread gert
On Apr 29, 10:49 pm, James Mills wrote: > On Fri, Apr 30, 2010 at 5:53 AM, gert wrote: > > How do you upload a plain text .py file as a source file? > > http://lmgtfy.com/?q=python+distutils+tutorial http://lmgtfy.com/?q=does+not+work :) I have only access to the webpage form to

http://pypi.python.org/pypi

2010-04-29 Thread gert
How do you upload a plain text .py file as a source file? I get Error processing form invalid distribution file -- http://mail.python.org/mailman/listinfo/python-list

Re: feature request for a wget -r like implementation in python3

2010-04-18 Thread gert
On Apr 17, 1:14 am, "Gabriel Genellina" wrote: > En Thu, 15 Apr 2010 16:37:37 -0300, gert escribió: > > > [a wget -r like implementation in python3] > > So I can make a recursive http download script > > What about calling wget itself? subprocess.call(['wge

Re: feature request for a wget -r like implementation in python3

2010-04-18 Thread gert
On Apr 16, 3:41 am, alex23 wrote: > On Apr 16, 5:37 am, gert wrote: > > > So I can make a recursive http download script > > My goal is a one click instruction to install and launch my > > projecthttp://code.google.com/p/appwsgi/ > > Here's Guido's

feature request for a wget -r like implementation in python3

2010-04-15 Thread gert
So I can make a recursive http download script My goal is a one click instruction to install and launch my project http://code.google.com/p/appwsgi/ -- http://mail.python.org/mailman/listinfo/python-list

Re: except KeyError: print("this was not a key error?")

2009-10-11 Thread gert
On Oct 11, 7:48 am, Michel Alexandre Salim wrote: > On Oct 10, 7:59 pm, gert wrote: > > >http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/order.wsgi > > > I screwed up some sql statement > > > INSERT INTO orders (pid,uid,bid,time) VALUES (?,?,2,DATETIME(

except KeyError: print("this was not a key error?")

2009-10-10 Thread gert
http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/order.wsgi I screwed up some sql statement INSERT INTO orders (pid,uid,bid,time) VALUES (?,?,2,DATETIME('NOW'))", (v['pid']),s.UID) bid does not exist anymore, but why does the KeyError exception occur when only my sql statement is wron

Re: elif alternative

2009-09-17 Thread gert
On Sep 18, 2:35 am, gert wrote: > On Sep 18, 2:11 am, Chris Rebert wrote: > > > > > On Thu, Sep 17, 2009 at 5:03 PM, gert wrote: > > > > > > > So far i have this > > >http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/app

Re: elif alternative

2009-09-17 Thread gert
On Sep 18, 2:11 am, Chris Rebert wrote: > On Thu, Sep 17, 2009 at 5:03 PM, gert wrote: > > > > > So far i have this > >http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointme... > > > I have 3 problems left Any_GID, Everybody_no_GID, > > Just

Re: elif alternative

2009-09-17 Thread gert
On Sep 18, 12:18 am, gert wrote: > On Sep 18, 12:12 am, gert wrote: > > > > > On Sep 18, 12:09 am, gert wrote: > > > > On Sep 17, 9:48 pm, Chris Rebert wrote: > > > > > On Thu, Sep 17, 2009 at 12:38 PM, gert wrote: > > > > > Ca

Re: elif alternative

2009-09-17 Thread gert
On Sep 18, 12:12 am, gert wrote: > On Sep 18, 12:09 am, gert wrote: > > > > > On Sep 17, 9:48 pm, Chris Rebert wrote: > > > > On Thu, Sep 17, 2009 at 12:38 PM, gert wrote: > > > > Can anybody show me a better looking alternative for this elif > &g

Re: elif alternative

2009-09-17 Thread gert
On Sep 18, 12:09 am, gert wrote: > On Sep 17, 9:48 pm, Chris Rebert wrote: > > > > > On Thu, Sep 17, 2009 at 12:38 PM, gert wrote: > > > Can anybody show me a better looking alternative for this elif > > > structure ? > > > Use a dictionary with func

Re: elif alternative

2009-09-17 Thread gert
On Sep 17, 9:48 pm, Chris Rebert wrote: > On Thu, Sep 17, 2009 at 12:38 PM, gert wrote: > > Can anybody show me a better looking alternative for this elif > > structure ? > > Use a dictionary with functions as values. For example: > > #untested obviously &g

Re: elif alternative

2009-09-17 Thread gert
On Sep 17, 9:48 pm, Chris Rebert wrote: > On Thu, Sep 17, 2009 at 12:38 PM, gert wrote: > > Can anybody show me a better looking alternative for this elif > > structure ? > > Use a dictionary with functions as values. For example: > > #untested obviously &g

elif alternative

2009-09-17 Thread gert
Can anybody show me a better looking alternative for this elif structure ? http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointment.wsgi -- http://mail.python.org/mailman/listinfo/python-list

Re: how to edit .wsgi file extebtions with IDLE on windows

2009-09-07 Thread gert
On Sep 4, 6:07 am, "Gabriel Genellina" wrote: > En Sat, 29 Aug 2009 20:29:43 -0300, gert escribió: > > > > > On Aug 29, 11:16 pm, "Gabriel Genellina" > > wrote: > >> En Sat, 29 Aug 2009 17:14:14 -0300, gert   > >> escribió: > >

Re: how to edit .wsgi file extebtions with IDLE on windows

2009-08-29 Thread gert
On Aug 29, 11:16 pm, "Gabriel Genellina" wrote: > En Sat, 29 Aug 2009 17:14:14 -0300, gert escribió: > > > On Aug 29, 9:31 pm, Chris Rebert wrote: > >> On Sat, Aug 29, 2009 at 5:40 AM, gert wrote: > >> > On Aug 29, 6:43 am, "Gabriel Genellina"

Re: how to edit .wsgi file extebtions with IDLE on windows

2009-08-29 Thread gert
On Aug 29, 9:31 pm, Chris Rebert wrote: > On Sat, Aug 29, 2009 at 5:40 AM, gert wrote: > > On Aug 29, 6:43 am, "Gabriel Genellina" > > wrote: > >> En Fri, 28 Aug 2009 15:31:31 -0300, gert escribió: > > >> > I can't figure out how to enable

Re: how to edit .wsgi file extebtions with IDLE on windows

2009-08-29 Thread gert
On Aug 29, 6:43 am, "Gabriel Genellina" wrote: > En Fri, 28 Aug 2009 15:31:31 -0300, gert escribió: > > > I can't figure out how to enable the .py shell and syntax highlighting > > for .wsgi file extensions using IDLE for windows ? > > That's a Win

how to send 100 continues in wsgi application ?

2009-08-28 Thread gert
how do you send 100 continues in a wsgi applications ? when using curl -T file http://localhost/upload.wsgi on the wsgiref.simple_server it get stuck waiting for a 100 continue import os def application(environ, response): query=os.path.join(os.path.dirname(__file__),'teemp') ran

how to edit .wsgi file extebtions with IDLE on windows

2009-08-28 Thread gert
I can't figure out how to enable the .py shell and syntax highlighting for .wsgi file extensions using IDLE for windows ? -- http://mail.python.org/mailman/listinfo/python-list

Re: How does the file.seek() work ?

2009-08-27 Thread gert
On Aug 26, 7:28 pm, gert wrote: > On Aug 26, 12:46 am, Graham Dumpleton > wrote: > > > > > On Aug 25, 5:37 am, Tim Chase wrote: > > > > > I want the file pointer set to 100 and overwrite everything from there > > > [snip] > > > &

Re: How does the file.seek() work ?

2009-08-26 Thread gert
On Aug 26, 12:46 am, Graham Dumpleton wrote: > On Aug 25, 5:37 am, Tim Chase wrote: > > > > I want the file pointer set to 100 and overwrite everything from there > > [snip] > > > def application(environ, response): > > >     query=os.path.join(os.path.dirname(__file__),'teemp') > > >    

Re: How does the file.seek() work ?

2009-08-24 Thread gert
On Aug 24, 9:37 pm, Tim Chase wrote: > > I want the file pointer set to 100 and overwrite everything from there > [snip] > > def application(environ, response): > >     query=os.path.join(os.path.dirname(__file__),'teemp') > >     range=environ.get('HTTP_RANGE','bytes=0-').replace > > ('by

How does the file.seek() work ?

2009-08-24 Thread gert
I want the file pointer set to 100 and overwrite everything from there curl -C 100 -T upload2.wsgi http://192.168.2.17/appwsgi/wsgi/upload2.wsgi -v w+ overwrites my file completely r+ overwrites nothing a+ only makes my file bigger import os def application(environ, response): query=os.path

Re: resume upload wsgi script

2009-08-10 Thread gert
On Aug 10, 10:39 am, "Diez B. Roggisch" wrote: > > 250KB :) > > So why do you bother? > > > Its just HTTP1.1 has everything for making ftp like file transfers > > possible. > > When I write it to a file then I am back at square one because I still > > need to load it completely to get it into a bl

Re: resume upload wsgi script

2009-08-09 Thread gert
On Aug 9, 8:25 pm, "Diez B. Roggisch" wrote: > gert schrieb: > > > > > On Aug 9, 4:42 pm, "Diez B. Roggisch" wrote: > >> gert schrieb: > > >>> On Aug 9, 3:17 pm, "Diez B. Roggisch" wrote: > >>>>

Re: resume upload wsgi script

2009-08-09 Thread gert
On Aug 9, 4:42 pm, "Diez B. Roggisch" wrote: > gert schrieb: > > > > > On Aug 9, 3:17 pm, "Diez B. Roggisch" wrote: > >> gert schrieb: > > >>> I working on a resume upload script and encountered the following > >>> pro

Re: resume upload wsgi script

2009-08-09 Thread gert
On Aug 9, 3:17 pm, "Diez B. Roggisch" wrote: > gert schrieb: > > > I working on a resume upload script and encountered the following > > problems > > > sql: Could not decode to UTF-8 column 'SUBSTR(picture,?)' wit

resume upload wsgi script

2009-08-09 Thread gert
I working on a resume upload script and encountered the following problems sql: Could not decode to UTF-8 column 'SUBSTR(picture,?)' with text '\ufffd\ufff d\ufffd\ufffd↑!ExifEf1gL6KM7Ij5ae0gL6KM7cH2cH2GI3 Content-Disposition: form-data; name="Filename" DSC00013.JPG Ef1 w

HTTP_RANGE

2009-08-08 Thread gert
thC=str(lengthF-int(offset[0][0])) bitS=int(offset[0][0]) bitE=lengthF-1 bytes='bytes '+str(bitS)+'-'+str(bitE)+'/'+str(lengthF) response('200 OK', [('Content-Length', lengthC), ('Content- Range',bytes)]) return [ou

Re: cgi.fieldstorage()

2009-07-25 Thread gert
On Jul 25, 2:33 am, "Diez B. Roggisch" wrote: > gert schrieb: > > > On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote: > >> gert schrieb: > > >>> this is a non standard way to store multi part post data on disk > >>> def application(

Re: cgi.fieldstorage()

2009-07-24 Thread gert
On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote: > gert schrieb: > > > this is a non standard way to store multi part post data on disk > > > def application(environ, response): > >     with open('/usr/httpd/var/wsgiTemp','w') as f: > >

cgi.fieldstorage()

2009-07-24 Thread gert
this is a non standard way to store multi part post data on disk def application(environ, response): with open('/usr/httpd/var/wsgiTemp','w') as f: while True: chunk = environ['wsgi.input'].read(8192).decode('latin1') if not chunk: break f.write(chun

Re: join two selects

2009-05-21 Thread gert
On May 21, 4:54 pm, Tim Golden wrote: > gert wrote: > > I am trying to figure out how to join two selects ? > > > SELECT * FROM search > > SELECT eid, SUM(pnt) AS total_votes FROM vote > > > CREATE TABLE votes ( > >     eid  INTEGER PRIMARY KEY, > >

join two selects

2009-05-21 Thread gert
I am trying to figure out how to join two selects ? SELECT * FROM search SELECT eid, SUM(pnt) AS total_votes FROM vote CREATE TABLE votes ( eid INTEGER PRIMARY KEY, uid VARCHAR(64), pnt INETEGER DEFAULT 0, ); CREATE TABLE search ( eid INTEGER PRIMARY KEY, txt VARCHAR(64)

Re: open(os.path.join(os.path.dirname(__file__), '../www/bin/picture.png'), 'rb')

2009-05-16 Thread gert
On May 16, 3:40 pm, gert wrote: > On May 16, 3:16 pm, "Diez B. Roggisch" wrote: > > > gert schrieb: > > > > open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'), > > > 'rb') > > > how do you do this on

Re: open(os.path.join(os.path.dirname(__file__), '../www/bin/picture.png'), 'rb')

2009-05-16 Thread gert
On May 16, 3:16 pm, "Diez B. Roggisch" wrote: > gert schrieb: > > > open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'), > > 'rb') > > how do you do this on windows (py3) so it still works on linux ? > > os.path.join(&q

open(os.path.join(os.path.dirname(__file__), '../www/bin/picture.png'), 'rb')

2009-05-16 Thread gert
open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'), 'rb') how do you do this on windows (py3) so it still works on linux ? -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite single transaction without foreign key or triggers

2009-05-11 Thread gert
On 11 mei, 23:07, Rob Williscroft wrote: > gert wrote in news:d7591495-4661-4243-ad7e-f142d8244e88 > @e24g2000vbe.googlegroups.com in comp.lang.python: > > > I am trying to do this in a single transaction, the 3 separate > > statements work fine, but i am screwed if

sqlite single transaction without foreign key or triggers

2009-05-11 Thread gert
I am trying to do this in a single transaction, the 3 separate statements work fine, but i am screwed if they are not executed together. ### db.execute('BEGIN') # db.execute('UPDATE users SET uid=? WHERE uid=?',(v['uid'],s.UID)) db.execute('UPDATE sessions SET uid=? WHERE si

Re: return functions

2009-05-02 Thread gert
On May 3, 12:17 am, gert wrote: > On May 2, 10:58 pm, gert wrote: > > > > > On May 2, 10:44 pm, gert wrote: > > > > Aldo i like the cerrypy wsgi server very much, i do not like the tools > > > that go with it > > > so i am stuck with a con

Re: eval(WsgiApplication)

2009-05-02 Thread gert
On May 2, 2:15 pm, Дамјан Георгиевски wrote: > >> > How do I do this in python3? > > >> What's wrong with importing it? > > > The problem is that my wsgi files have a wsgi extention for mod_wsgi > > use > .. > > mod_wsgi has a .wsgi handler because it is recommended to rename the > > wsgi file wit

Re: return functions

2009-05-02 Thread gert
On May 2, 10:58 pm, gert wrote: > On May 2, 10:44 pm, gert wrote: > > > Aldo i like the cerrypy wsgi server very much, i do not like the tools > > that go with it > > so i am stuck with a configuration file that looks like this > > >http://pastebin.com/m4d8184

Re: return functions

2009-05-02 Thread gert
On May 2, 10:44 pm, gert wrote: > Aldo i like the cerrypy wsgi server very much, i do not like the tools > that go with it > so i am stuck with a configuration file that looks like this > > http://pastebin.com/m4d8184bc > > After 152 line I finally arrived to a point where

return functions

2009-05-02 Thread gert
Aldo i like the cerrypy wsgi server very much, i do not like the tools that go with it so i am stuck with a configuration file that looks like this http://pastebin.com/m4d8184bc After 152 line I finally arrived to a point where i was thinkig "thats it, this is like going to work on a uni cycle an

Re: eval(WsgiApplication)

2009-05-02 Thread gert
On May 2, 10:25 am, Arnaud Delobelle wrote: > gert writes: > > I would like to read the following from a text file > > > from json import loads > > from gert.db import Db > > def application(environ, response): > >     v = loads(environ['wsgi.inpu

eval(WsgiApplication)

2009-05-01 Thread gert
I would like to read the following from a text file from json import loads from gert.db import Db def application(environ, response): v = loads(environ['wsgi.input'].read(int(environ ['CONTENT_LENGTH'])).decode('utf-8')) db = Db() db.execute('UPDATE votes SET count=count+1 WHERE vid=?'

Re: with open('com1', 'r') as f:

2009-04-05 Thread gert
On Apr 5, 12:24 am, "Gabriel Genellina" wrote: > En Sat, 04 Apr 2009 14:11:12 -0300, gert escribió: > > > On Apr 4, 5:20 pm, Kushal Kumaran wrote: > >> On Fri, 03 Apr 2009 22:10:36 +0200 > >> Christian Heimes wrote: > >> > gert wrote: > &

Re: with open('com1', 'r') as f:

2009-04-04 Thread gert
On Apr 4, 5:20 pm, Kushal Kumaran wrote: > On Fri, 03 Apr 2009 22:10:36 +0200 > > Christian Heimes wrote: > > gert wrote: > > > I do understand, and I went looking into pySerial, but it is a long > > > way from getting compatible with python3.x and involves othe

Re: with open('com1', 'r') as f:

2009-04-04 Thread gert
On Apr 3, 10:10 pm, Christian Heimes wrote: > gert wrote: > > I do understand, and I went looking into pySerial, but it is a long > > way from getting compatible with python3.x and involves other libs > > that are big and non pyhton3.x compatible. > > So don't

Re: with open('com1', 'r') as f:

2009-04-04 Thread gert
On Apr 4, 12:58 am, Lawrence D'Oliveiro wrote: > In message <8bc55c05-19da-41c4- > > b916-48e0a4be4...@p11g2000yqe.googlegroups.com>, gert wrote: > >     with open('com1', 'r') as f: > >         for line in f: > >              print(&#x

Re: with open('com1', 'r') as f:

2009-04-03 Thread gert
On Apr 3, 3:44 pm, "Gabriel Genellina" wrote: > En Thu, 02 Apr 2009 20:04:14 -0300, gert escribió: > > > On Apr 2, 8:53 pm, Kushal Kumaran wrote: > >> On Thu, 2 Apr 2009 10:01:02 -0700 (PDT) > >> gert wrote: > >> > from subprocess import * &

Re: with open('com1', 'r') as f:

2009-04-02 Thread gert
On Apr 2, 8:53 pm, Kushal Kumaran wrote: > On Thu, 2 Apr 2009 10:01:02 -0700 (PDT) > > > > gert wrote: > > from subprocess import * > > > check_call(['mode', 'COM1:9600,N,8,1,P'],shell=True) > > while True: > >     with open('

with open('com1', 'r') as f:

2009-04-02 Thread gert
from subprocess import * check_call(['mode', 'COM1:9600,N,8,1,P'],shell=True) while True: with open('com1', 'r') as f: for line in f: print('line') This works very well except for one thing. After a reboot I have to launch 1 time any windows serial exe application no mate

Re: Threading and tkinter

2009-03-25 Thread gert
On Mar 7, 9:40 am, Jani Hakala wrote: > > After reading the docs and seeing a few examples i think this should > > work ? > > Am I forgetting something here or am I doing something stupid ? > > Anyway I see my yellow screen, that has to count for something :) > > I have been using the following sc

Re: Python 3 consistency proposal

2009-03-24 Thread gert
On Mar 25, 1:23 am, Steven D'Aprano wrote: > On Tue, 24 Mar 2009 16:45:26 -0700, gert wrote: > > Rename all built in classes with a capital letter example Str() Int() > > Object() > > > Make () optional for a function definition class Test: > >     pass >

Python 3 consistency proposal

2009-03-24 Thread gert
Rename all built in classes with a capital letter example Str() Int() Object() Make () optional for a function definition class Test: pass def test: pass Any chance Guido would approve this :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: No module named _sqlite3

2009-03-11 Thread gert
On Mar 9, 8:31 pm, gert wrote: > Testing 3.1 i get this with 3.0 it works > > python/lib/python3.1/sqlite3/dbapi2.py", line 27, in , > ImportError:No module named _sqlite3, never mind had some include problems during compiling, nothing to do with 3.1 -- http://mail.python.org

No module named _sqlite3

2009-03-09 Thread gert
Testing 3.1 i get this with 3.0 it works python/lib/python3.1/sqlite3/dbapi2.py", line 27, in , ImportError:No module named _sqlite3, -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading and tkinter

2009-03-06 Thread gert
On Mar 6, 7:42 pm, a...@pythoncraft.com (Aahz) wrote: > [posted and e-mailed -- please reply to the group] > > In article > <492d5db9-3681-4ae8-827e-f2a4f66be...@v39g2000yqm.googlegroups.com>, > > gert   wrote: > > >After reading the docs and seeing a few exa

Re: Threading and tkinter

2009-02-19 Thread gert
Hope you do not mind ignoring part of answers, so I can figure out more why things work the way they are. This two examples work, what i do not understand is that in function display i do not have to declare root, v or x ? -- example 1 -- from tkinter import * from _thread import s

Re: Threading and tkinter

2009-02-19 Thread gert
On Feb 19, 3:20 am, Steve Holden wrote: > gert wrote: > > Can you first explain why x stay's 0 please and how i should update x > > using threads ? > > > fromtkinterimport * > > from _thread import start_new_thread > > from time import sleep > >

Re: Threading and tkinter

2009-02-18 Thread gert
Can you first explain why x stay's 0 please and how i should update x using threads ? from tkinter import * from _thread import start_new_thread from time import sleep x=0 def weegbrug(x): while True: x=x+1 sleep(0.5) start_new_thread(weegbrug,(x,)) root = Tk() v = StringVar(

Re: Threading and tkinter

2009-02-18 Thread gert
On Feb 18, 8:25 am, "Hendrik van Rooyen" wrote: > "gert" wrote: > > > After reading the docs and seeing a few examples i think this should > > work ? > > Am I forgetting something here or am I doing something stupid ? > > Anyway I see

Threading and tkinter

2009-02-17 Thread gert
After reading the docs and seeing a few examples i think this should work ? Am I forgetting something here or am I doing something stupid ? Anyway I see my yellow screen, that has to count for something :) from tkinter import * from threading import Thread class Weegbrug(Thread): def __init__

Re: v = json.loads("{'test':'test'}")

2009-01-25 Thread gert
On Jan 26, 12:40 am, "Diez B. Roggisch" wrote: > >> But all of this is not JSON. > > > Yes it is, you just make it more python dictionary compatible :) > > No, what you do is to make it more incompatible with other > json-implementations. Which defies the meaning of a standard. > > Besides, {foo :

Re: v = json.loads("{'test':'test'}")

2009-01-25 Thread gert
On Jan 25, 11:51 pm, "Diez B. Roggisch" wrote: > gert schrieb: > > > On Jan 25, 11:16 pm, Дамјан Георгиевски wrote: > >>> raise ValueError(errmsg("Expecting property name", s, end)) > >>>http://docs.python.org/library/json.html > &g

Re: v = json.loads("{'test':'test'}")

2009-01-25 Thread gert
On Jan 25, 11:16 pm, Дамјан Георгиевски wrote: > > raise ValueError(errmsg("Expecting property name", s, end)) > >http://docs.python.org/library/json.html > > What am I doing wrong ? > > try this > v = json.loads('{"test":"test"}') > > JSON doesn't support single quotes, only double quotes. the f

v = json.loads("{'test':'test'}")

2009-01-25 Thread gert
raise ValueError(errmsg("Expecting property name", s, end)) http://docs.python.org/library/json.html What am I doing wrong ? -- http://mail.python.org/mailman/listinfo/python-list

Re: s=str(binary)

2009-01-20 Thread gert
b = environ['CONTENT_TYPE'].split('boundary=')[1] oops forgot, is indeed better solution :) -- http://mail.python.org/mailman/listinfo/python-list

Re: s=str(binary)

2009-01-20 Thread gert
On Jan 20, 9:41 pm, John Machin wrote: > On Jan 21, 5:31 am, gert wrote: > > > On Jan 20, 5:23 am, John Machin wrote: > > > > On Jan 20, 12:54 pm, gert wrote: > > > > > How do you convert s back to binary data in python 3 so I can put in a > >

Re: s=str(binary)

2009-01-20 Thread gert
On Jan 20, 5:23 am, John Machin wrote: > On Jan 20, 12:54 pm, gert wrote: > > > How do you convert s back to binary data in python 3 so I can put in a > > sqlite blob ? > > Is there a build in function or do I need to use binascii ? > > byte(s) or bin(s) would make

s=str(binary)

2009-01-19 Thread gert
How do you convert s back to binary data in python 3 so I can put in a sqlite blob ? Is there a build in function or do I need to use binascii ? byte(s) or bin(s) would make more sense but can not figure it out ? -- http://mail.python.org/mailman/listinfo/python-list

bin = FieldStorage(fp=environ['wsgi.input'], environ=environ)

2009-01-18 Thread gert
in python3.0 this does not work File "/usr/python/lib/python3.0/email/feedparser.py", line 99, in push data, self._partial = self._partial + data, TypeError: Can't convert 'bytes' object to str implicitly So what do i need to wrap around environ['wsgi.input'] so it does work ? -- http://mail.pyth

s=ascii(hexlify(urandom(10)))

2009-01-18 Thread gert
I expected that py3 did not converted the b'...' indication too ? b'afc76815e3fc429fa9d7' -- http://mail.python.org/mailman/listinfo/python-list

Re: s=ascii(hexlify(urandom(10)))

2009-01-17 Thread gert
On Jan 18, 12:20 am, "Martin v. Löwis" wrote: > >>> s = str(hexlify(urandom(8)))[2:18] > >> And your question is? > > > No question just solution to get rit of b'' :) > > Ah. hexlify(urandom(8)).decode('ascii') Ok that one looks better then mine :) -- http://mail.python.org/mailman/listinfo/pytho

Re: s=ascii(hexlify(urandom(10)))

2009-01-17 Thread gert
On Jan 18, 12:05 am, "Martin v. Löwis" wrote: > gert wrote: > > On Jan 17, 9:08 pm, "Martin v. Löwis" wrote: > >>> I expected that py3 did not converted the b'...' indication too ? > >>> b'afc76815e3fc429fa9d7' > >>

Re: s=ascii(hexlify(urandom(10)))

2009-01-17 Thread gert
On Jan 17, 9:08 pm, "Martin v. Löwis" wrote: > > I expected that py3 did not converted the b'...' indication too ? > > > b'afc76815e3fc429fa9d7' > > You mean, just because you invoked the ascii() builtin, the b > prefix should disappear? Re-read the documentation of the > ascii() builtin - it prob

Re: s = sha1(random()).hexdigest()

2009-01-16 Thread gert
On Jan 17, 1:14 am, gert wrote: > On Jan 16, 7:08 am, "Martin v. Löwis" wrote: > > > >  s = urandom(10).encode('hex') > > > >  AttributeError: 'bytes' object has no attribute 'encode' > > > py> binascii.hexlify(os.u

Re: s = sha1(random()).hexdigest()

2009-01-16 Thread gert
On Jan 16, 7:08 am, "Martin v. Löwis" wrote: > >  s = urandom(10).encode('hex') > > >  AttributeError: 'bytes' object has no attribute 'encode' > > py> binascii.hexlify(os.urandom(10)) > b'92b91d5734a9fe562f23' > sqlite3 s = hexlify(urandom(10)) db.execute('SELECT sid FROM sessions WHERE sid=?

Re: except sqlite3.Error as e:

2009-01-15 Thread gert
On Jan 16, 1:47 am, gert wrote: > except sqlite3.Error as e: >     ERROR = "Error " + ... > > how does except work in python3 ? except sqlite3.Error as e: ERROR = "Error " + e.args[0] oops i thought it did not work somehow in 3.0 but it does :) -- http://

except sqlite3.Error as e:

2009-01-15 Thread gert
except sqlite3.Error as e: ERROR = "Error " + ... how does except work in python3 ? -- http://mail.python.org/mailman/listinfo/python-list

Re: s = sha1(random()).hexdigest()

2009-01-15 Thread gert
On Jan 16, 1:20 am, Paul Rubin <http://phr...@nospam.invalid> wrote: > gert writes: > > s = sha1(random()).hexdigest() > > > TypeError: object supporting the buffer API required, > > > How does sha1 work in python3.0 please ? > > sha1 hashes strings, not num

Re: s = sha1(random()).hexdigest()

2009-01-15 Thread gert
On Jan 16, 1:14 am, gert wrote: > from random import random > from hashlib import sha1 > s = sha1(random()).hexdigest() > > TypeError: object supporting the buffer API required, > > How does sha1 work in python3.0 please ? s = sha1(bytes(random(),'utf-8')).hexdi

[python3.0] s = sha1(random()).hexdigest()

2009-01-15 Thread gert
from random import random from hashlib import sha1 s = sha1(random()).hexdigest() TypeError: object supporting the buffer API required, How does sha1 work in python3.0 please ? -- http://mail.python.org/mailman/listinfo/python-list

Re: python3.0 MySQLdb

2009-01-14 Thread gert
On Jan 13, 11:58 pm, "Martin v. Löwis" wrote: > Steve Holden wrote: > > Daniel Fetchinson wrote: > >>> I need something to connect to a database, preferably mysql, that > >>> works in python3.0 please. > >> And your question is? > > > Surely it's fairly obvious that the question is "does such a th

Re: i want to join developer group

2009-01-13 Thread gert
On Jan 13, 1:36 pm, gkc...@gmail.com wrote: > Hello, >       I want to contribute to the open source projects. Open source is about finding where you are good at. Contributing is a product of the skills you learn. -- http://mail.python.org/mailman/listinfo/python-list

Re: python3.0 MySQLdb

2009-01-12 Thread gert
Its for testing mod_wsgi trunk on Python3.0 in combination with a database. Does anybody has a patch for MySQLdb ? -- http://mail.python.org/mailman/listinfo/python-list

Re: python3.0 MySQLdb

2009-01-12 Thread gert
On Jan 12, 8:25 pm, "Daniel Fetchinson" wrote: > > I need something to connect to a database, preferably mysql, that > > works in python3.0 please. > > And your question is? MySQLdb or something else for python3.0 ? -- http://mail.python.org/mailman/listinfo/python-list

python3.0 MySQLdb

2009-01-12 Thread gert
I need something to connect to a database, preferably mysql, that works in python3.0 please. -- http://mail.python.org/mailman/listinfo/python-list

Re: pxssh submit su commands = very very slow

2008-06-29 Thread gert
On Jun 29, 4:45 am, Dan Stromberg <[EMAIL PROTECTED]> wrote: > On Sat, 28 Jun 2008 19:08:59 -0700, gert wrote: > > this does the same except 100 times faster ? > > > I don't understand the logic about the prompt, its not the same as the > > output from the

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
print child.before child.sendline('ls -l') child.expect('[EMAIL PROTECTED]:') print child.before child.sendline('su') child.expect('assword:') child.sendline('123') child.expect('[EMAIL PROTECTED]: /srv/www/gert') print child.before child.sendline('ls -l') child.expect('[EMAIL PROTECTED]:') print child.before -- http://mail.python.org/mailman/listinfo/python-list

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
On Jun 29, 1:44 am, gert <[EMAIL PROTECTED]> wrote: > On Jun 29, 1:19 am, Neil Hodgson <[EMAIL PROTECTED]> > wrote: > > > gert: > > > > This works but after the su command you have to wait like 2 minutes > > > before each command g

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
On Jun 29, 1:19 am, Neil Hodgson <[EMAIL PROTECTED]> wrote: > gert: > > > This works but after the su command you have to wait like 2 minutes > > before each command gets executed ? > >             s.sendline ('su') > >             s.expect('Pas

pxssh submit su commands = very very slow

2008-06-28 Thread gert
This works but after the su command you have to wait like 2 minutes before each command gets executed ? What did i do wrong ? import pxssh try: s = pxssh.pxssh() s.login ('127.0.0.1', 'gert', '123') s.sendline (

Re: ssh

2008-04-30 Thread gert
Eric Wertman wrote: > >from popen2 import Popen3 > >def ssh(host,command) : >''' Wraps ssh commands ''' >ssh_exec = ['/usr/bin/ssh -qnx -F ssh_config', host, command] >cmd = ' '.join(ssh_exec) >output,errors,status = process(cmd) >return output,errors,status > >def process(cmd)

  1   2   >