Function from C/PHP to Python

2008-08-06 Thread Grom
Hello everyone :) I have one problem with that function in C int calc_passcode(const char* pass, char* code) { int magic1 = 0x50305735; int magic2 = 0x12345671; int sum = 7; char z; while ((z = *pass++) != 0) { if (z == ' ') continue; if (z == '\t') continue;

Re: Function from C/PHP to Python

2008-08-07 Thread Grom
On 7 Sie, 06:01, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Wed, 06 Aug 2008 20:15:11 -0700, Grom wrote: > > Hello everyone :) > > I have one problem with that function in C > ... > > Can someone help me to rewrite it to python? >

Problem with Twisted

2008-09-01 Thread Grom
Hello. I have something like that: from twisted.words.protocols.jabber import xmlstream from twisted.internet import protocol from twisted.words.xish import domish, utility from twisted.internet import reactor from twisted.python import log import sys, hashlib log.startLogging(sys.stdout) def ma