Re: Looking for volunteers developing wsgi Webmailer Application!
Because the world really needs this crap that is developed in php5, or big Personal Information Management Systems like Horde, what often nobody needs. Am 04.10.2014 um 19:52 schrieb Denis McMahon: > On Sat, 04 Oct 2014 17:52:18 +0200, Tamer Higazi wrote: > >> I am planing to develop on longer time a n open source Webmailer written >> in Python (not 2.7.x) with: > > Because the world really needs another webmailer spamengine. > -- https://mail.python.org/mailman/listinfo/python-list
Looking for volunteers developing wsgi Webmailer Application!
Hi people! I am planing to develop on longer time a n open source Webmailer written in Python (not 2.7.x) with: bottle.py zca, zope.interface Mail sasl and/or dovecot python-slimta-piperelay a wsgi webmailer which could be easily added in uWSGI. I am looking for people, who'd like to contribute got some time... Cheers, Tamer -- https://mail.python.org/mailman/listinfo/python-list
Re: problems decoding json objects
You are right! It was all alone my mistake which I recently figured out. Thanks for helping me. Tamer Am 14.05.2014 11:20, schrieb Ben Finney: > Tamer Higazi writes: > > That's not a valid JSON document. See http://json.org/>. > -- https://mail.python.org/mailman/listinfo/python-list
problems decoding json objects
Hi people! My JSON String: from json.decoder import JSONDecoder myjs = '{"AVName":"Tamer","ANName":"Higazi","AAnschrift":"Bauerngasse","AHausnr":"1","APLZ":"55116","AOrt":"Mainz"},{"KontaktTel":["01234","11223344"],{"ZahlungsArt":"0"},{"ZugangsDaten":["tamer.hig...@nomail.com","mypass"]}' If I try to decode it, with: JSD = JSONDecoder() rsx = JSD.decode(myjs) I get this error message: >>> JSD.decode(myjs) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.7/json/decoder.py", line 368, in decode raise ValueError(errmsg("Extra data", s, end, len(s))) ValueError: Extra data: line 1 column 108 - line 1 column 220 (char 107 - 219) How do I solve this problem ?! For any help, thanks Tamer -- https://mail.python.org/mailman/listinfo/python-list
Re: Python IM server
Take Twisted! twistedmatrix has all you need! Am 31.03.2014 13:03, schrieb Wesley: > Hi all, > I want to develop a instant message server, simply has user and group > entity. > > Is there any better existing open-source one? > Thus I can download and have a look. > > Thanks. > Wesley > -- https://mail.python.org/mailman/listinfo/python-list
Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.
Hi Mark! It is an advise, in which language somebody wants to code is of course everybodys free choice. However, I believe according wxWidgets it would be better coding in the native language the system had been developed. The other thing, specially if you would make a customer project, I don't know how to pack the app written in python in an installer. Perhaps I am wrong, and you could give me in exchange an advise ?! I also believe in performance. An application written in C++, can be compiled easily on the target platform (like on windows systems) with it's native compiler. How would it be with wxPython ?! Thanks for your response Tamer On 16.12.2013 03:18, Mark Lawrence wrote: On 16/12/2013 00:34, Tamer Higazi wrote: But to be honest, I don't believe that Python is the best choice for GUI development, but it's only an opinion. Otherwise I would advise you going into C++ and code with wxWidgets. Tamer Can you state why you prefer C++ and wxWidgets over Python and wxPython, which wraps wxWidgets? -- https://mail.python.org/mailman/listinfo/python-list
Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.
For wxPython there is a good book. You will feel convinient. But to be honest, I don't believe that Python is the best choice for GUI development, but it's only an opinion. Otherwise I would advise you going into C++ and code with wxWidgets. Tamer On 14.12.2013 14:12, Jai wrote: GUI:-want to learn GUI programming in python , how should i proceed. There are lots of book here so I am confuse which book i should refer so that i don't waste time . please answer -- https://mail.python.org/mailman/listinfo/python-list
Re: grab dict keys/values without iterating ?!
Hi Peter! I got the message I know that I could have used a database. I am using for a good reason the ZODB Database. I am making things in the ZODB Database persistent, I don't like to distribute among machines. Making use of sqlite, won't give me the possibility to scale as the amount of data and requests are high. I am thinking of scalability. Of course I could use the MongoDB as well. But this is from my side for THESE KIND of things not desired. I am thinking of making Files through objects in the ZODB Database persistent, and relational databases on long time make me sick I will workout a bselect sollution for my problem! Thanks for your support. Tamer On 11.12.2013 14:10, Peter Otten wrote: Tamer Higazi wrote: Hi Dave! You were absolutely right. I don't want to iterate the entire dict to get me the key/values Let us say this dict would have 20.000 entries, but I want only those with "Aa" to be grabed. Those starting with these 2 letters would be only 5 or 6 then it would take a lot of time. In which way would you prefer to store the data, and which functions or methods would you use effectively to accomplish this task ? Well, Dave already gave one approach: [Dave Angel] For example if you stored all the keys in a sorted list you could use bisect. See also http://docs.python.org/dev/library/bisect.html Another option would be to use a database. Assuming the table 'lookup' has two columns 'key' and 'value' you'd get the matching rows with select key, value from lookup where key like 'Aa%'; A lightweight database that comes with Python is sqlite: http://docs.python.org/dev/library/sqlite3.html http://www.sqlite.org/ -- https://mail.python.org/mailman/listinfo/python-list
Re: grab dict keys/values without iterating ?!
Hi Dave! You were absolutely right. I don't want to iterate the entire dict to get me the key/values Let us say this dict would have 20.000 entries, but I want only those with "Aa" to be grabed. Those starting with these 2 letters would be only 5 or 6 then it would take a lot of time. In which way would you prefer to store the data, and which functions or methods would you use effectively to accomplish this task ? I deeply apologize of not defining the question more defined. English is not my mother tongue. I'll do my best next time. Thanks Tamer On 11.12.2013 06:47, Dave Angel wrote: On Wed, 11 Dec 2013 02:02:20 +0200, Tamer Higazi wrote: Is there a way to get dict by search terms without iterating the entire dictionary ?! I want to grab the dict's key and values started with 'Ar'... Your wording is so ambiguous that each respondent has guessed differently. I'm guessing that you want all key/value pairs for which the key begins with the two letters 'Ar' I'm guessing further that your objection to iterating the entire dictionary is not code size but performance. If both assumptions are valid then I'll point out that a dict has no ordering to it. If you want an approach that doesn't iterate over the entire structure you'll need to store the data differently. For example if you stored all the keys in a sorted list you could use bisect. -- https://mail.python.org/mailman/listinfo/python-list
grab dict keys/values without iterating ?!
Hi people! Is there a way to get dict by search terms without iterating the entire dictionary ?! Let us assume I have: {'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'} I want to grab the dict's key and values started with 'Ar'... I could make an iterator and look if it's inside. I wasn't able to find it, but I am asking myself if dict has a builtin method to get me these key/values on the fly. Why do I ask you?! I am working with the ZODB Database, where I make use of a PersistentDict and PersistentList, and I want I would thank you for a short reply. Tamer -- https://mail.python.org/mailman/listinfo/python-list
Fire Method by predefined string!
Hi people! Assume we have 2 methods, one called Fire and the other __DoSomething. I want the param which is a string to be converted, that I can fire directly a method. Is it somehow possible in python, instead of writing if else statements ???! Tamer class(object): def Fire(self,param) #possible ?! self.__param(): def _DoSomething(self): print 'I did it!' -- https://mail.python.org/mailman/listinfo/python-list
sendmail library ?!
Hi people! I am looking for a python library that does mailing directly through "sendmail". When I look into the docs, I see only an "smtlip" library but nothing that could serve with sendmail or postfix. Any ideas ?! Thanks Tamer -- https://mail.python.org/mailman/listinfo/python-list
opposite of __init__.py
Hi people! I have asked myself a question, if there is a opposite of "__init__.py" like "__del__.py" ?! I want, that when the application ends, certain functions are executed. I know I could make a constructor and a destructor, but I simply want to know if there is a opposite Thanks Tamer -- http://mail.python.org/mailman/listinfo/python-list
xsd:anyType parameter in suds!
Hi people! I have a problem passing an xs:anyType Parameter in "suds". The original sample is an application, where a "PHP Array" is being passed for the remoted method. What is the same type in python to accomplish the task?! doc with sample: http://kasapi.kasserver.com/dokumentation/?open=soap here the sample code with it's output: from suds.client import Client class KasAPI(object): def __init__(self): self.__WSDL = 'https://kasserver.com/schnittstelle/soap/wsdl/KasAuth.wsdl' self.client = Client(self.__WSDL) KasOBJ = KasAPI() print KasOBJ.client output: Suds ( https://fedorahosted.org/suds/ ) version: 0.4 GA build: R699-20100913 Service ( KasApiAuthenticationService ) tns="https://kasserver.com/"; Prefixes (0) Ports (1): (KasApiAuthenticationPort) Methods (1): KasAuth(xs:anyType Params, ) Types (0): -- http://mail.python.org/mailman/listinfo/python-list
Re: SOAPpy.Types.faultType: Cannot use object of type stdClass as array
Hi Chris! The example from the website is buggy because the WSDL urls are not correct... $WSDL_AUTH = 'https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl' $WSDL_API ='https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl' which I had replaced so far. then you will see the results, even if the login and pass do not match. I think for many python developers it might be really interesting to know, WHAT A PHP ARRAY is in python in a SOAP environment. Tamer Am 23.03.2013 21:55, schrieb Chris Angelico: > On Sun, Mar 24, 2013 at 6:38 AM, Tamer Higazi wrote: >> Chris! >> I did what you said before in several ways. >> >> The last way was putting the user and password directly into the dict as >> parameter ALWAYS ends up telling me, that I cannot use object of >> standard type class as ARRAY >> >> I did it this time with suds. So packaging issue is now out of scope, >> and always the same headache. >> >> >> now tell me what this error might tell me: >> >> >> suds.WebFault: Server raised fault: 'Cannot use object of type stdClass >> as array' > > So it's the same error this way, too. That error came back from the > server, and is being quoted verbatim. That means that, ultimately, the > problem is in the XML blob that you're sending it; the trick is to > figure out what exactly the server isn't happy with. > > (Aside: The server is at least partly at fault here. It should be > giving more useful error messages. But I'm assuming you don't have any > control over the server.) > > I tried the reference PHP implementation off the web site, and it's > coming back with 500 Internal Server Error with body of text/html, > which is clearly buggy documentation. When I change it to use the WSDL > you're using, I can actually get something plausible out of it. > > Modified PHP code: > > > // URIs zu den WSDL-Dateien > $WSDL_AUTH = 'https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl'; > //$WSDL_API = 'https://kasserver.com/schnittstelle/soap/wsdl/KasApi.wsdl'; > > // Logindaten > $kas_user = 'w001234'; // KAS-Logon > $kas_pass = 'xxx'; // KAS-Passwort > $session_lifetime = 1800; // Gültigkeit des Tokens in Sek. bis zur > neuen Authentifizierung > $session_update_lifetime = 'Y'; // Soll bei jeder Aktion die > Sessionlifetime wieder auf den > // Wert in "$session_lifetime" > gesetzt werden? ('Y' / 'N') > try > { > $SoapLogon = new SoapClient($WSDL_AUTH,["trace"=>1]); // url zur wsdl - > Datei > $CredentialToken = $SoapLogon->KasAuth( > array('KasUser' => $kas_user, > 'KasAuthType' => 'sha1', > 'KasPassword' => sha1($kas_pass), > 'SessionLifeTime' => $session_lifetime, > 'SessionUpdateLifeTime' => > $session_update_lifetime > ) > ); > } > > // Fehler abfangen und ausgeben > catch (SoapFault $fault) > { > echo > "Request:\n".$SoapLogon->__getLastRequestHeaders()."\n".$SoapLogon->__getLastRequest()."\n"; > echo > "Response:\n".$SoapLogon->__getLastResponseHeaders()."\n".$SoapLogon->__getLastResponse()."\n"; > trigger_error("Fehlernummer: {$fault->faultcode}, > Fehlermeldung: {$fault->faultstring}, > Verursacher: {$fault->faultactor}, > Details: {$fault->detail}", E_USER_ERROR); > } > > > > (Another aside: Until I added the two echo lines, this had a try/catch > that simply triggered a fatal error. This is pointless. Just let the > error happen!) > > Here's the packet the PHP code sends: > > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; > xmlns:ns1="urn:xmethodsKasApiAuthentication" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > xmlns:ns2="http://xml.apache.org/xml-soap"; > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";> xsi:type="ns2:Map"> xsi:type="xsd:string">KasUser xsi:type="xsd:string">w001234 xsi:type="xsd:string">KasAuthType xs
Re: SOAPpy.Types.faultType: Cannot use object of type stdClass as array
Chris! I did what you said before in several ways. The last way was putting the user and password directly into the dict as parameter ALWAYS ends up telling me, that I cannot use object of standard type class as ARRAY I did it this time with suds. So packaging issue is now out of scope, and always the same headache. now tell me what this error might tell me: suds.WebFault: Server raised fault: 'Cannot use object of type stdClass as array' File "/storage/PyProjects/toolsAPP/python/KASUpdate2.py", line 23, in KasObj = KASSystem() File "/storage/PyProjects/toolsAPP/python/KASUpdate2.py", line 20, in __init__ 'SessionUpdateLifeTime':'Y'}) File "/storage/PyENV/lin/toolsENV/lib/python2.7/site-packages/suds-0.4-py2.7.egg/suds/client.py", line 542, in __call__ File "/storage/PyENV/lin/toolsENV/lib/python2.7/site-packages/suds-0.4-py2.7.egg/suds/client.py", line 602, in invoke File "/storage/PyENV/lin/toolsENV/lib/python2.7/site-packages/suds-0.4-py2.7.egg/suds/client.py", line 649, in send File "/storage/PyENV/lin/toolsENV/lib/python2.7/site-packages/suds-0.4-py2.7.egg/suds/client.py", line 702, in failed File "/storage/PyENV/lin/toolsENV/lib/python2.7/site-packages/suds-0.4-py2.7.egg/suds/bindings/binding.py", line 265, in get_fault and when I open the python files they hand me out only the error messages, which was sent back from Server! here is the code: import hashlib from suds.client import Client from suds import WebFault class KASSystem: def __init__(self): WSDL_AUTH = 'https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl' WSDL_API = 'https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl' m = hashlib.sha1() m.update('userpass') SoapClient = Client(WSDL_AUTH) SoapClient.service.KasAuth({ 'KasUser':'userlogin', 'KasAuthType':'sha1', 'KasPassword':m.hexdigest(), 'SessionLifeTime':1800, 'SessionUpdateLifeTime':'Y'}) KasObj = KASSystem() Tamer Am 23.03.2013 16:03, schrieb Chris Angelico: > On Sun, Mar 24, 2013 at 12:33 AM, Tamer Higazi wrote: >> Hi Chris! >> thanks But I am about of going nuts I did everything according >> their sample: >> >> http://kasapi.kasserver.com/dokumentation/?open=soap > > Since I'm not fluent in German, I'm relying on Google Translate to > read of that page. (I didn't find an obvious English version of the > page, but maybe I just didn't look in the right place.) > > One thing I've found about the PHP SOAP library is that it seems to > behave quite oddly in some circumstances - my suspicion is the WSDL > file (eg when it's unable to load it). Try monitoring the actual > traffic - SOAP is XML carried over HTTP, so you should be able to just > snoop the TCP/IP socket (easiest way might be to switch in your own > server). See if you can spot a difference between the request that PHP > sends and the one your Python script sends. Fortunately you're not > moving megabytes of data around, here - it should be easy enough to > eyeball the requests and see what's different about them :) > > A tip, by the way: > > userpass = ['login','password'] > m = hashlib.sha1() > m.update(userpass[1]) > > userpass[1] = m.hexdigest() > loginData = {'user':userpass[0],'pass':userpass[1]} > > 'KasUser':loginData['user'], > 'KasPassword':loginData['pass'], > > You keep packaging and repackaging the credentials. I'm assuming you > won't actually have them hard-coded like that (if you do, I would > recommend hard-coding the SHA1 hash, rather than the password itself), > so I'll stick with the userpass list (or tuple, which would work > exactly the same way). > > password = hashlib.sha1(userpass[1]).hexdigest() > ... > 'KasUser':userpass[0], > 'KasPassword':password, > > Or even inline that completely (which is what I'd probably do). > There's no need to stuff it into a dictionary, only to pull it out > again. > > Also: A try/except that just prints out the error message usually > isn't helpful. Save yourself the trouble, at least during initial > testing - just let the exception terminate your script. You'll get all > the same information, plus the full traceback, and it's cost you > exactly zero development time :) Later on, you can add try/except if > you need to do something other than terminate, but often that "later > on" never even happens. > > ChrisA > -- http://mail.python.org/mailman/listinfo/python-list
Re: SOAPpy.Types.faultType: Cannot use object of type stdClass as array
Hi Chris! thanks But I am about of going nuts I did everything according their sample: http://kasapi.kasserver.com/dokumentation/?open=soap and wanted to accomplish it in python! If I pass a dict, I get the error telling me, this nonsense. What should I do?! I even tried it in "suds" instead of soappy, and I am not getting further. Tamer Am 21.03.2013 17:21, schrieb Chris Angelico: > On Thu, Mar 21, 2013 at 6:06 AM, Tamer Higazi wrote: >> SOAPpy.Types.faultType: > type stdClass as array> > > stdClass looks like a PHP error. Check out the server's requirements; > perhaps you need to provide something as a list that you're providing > as a dict, or something. I'd look at that loginData, for instance. > > ChrisA > -- http://mail.python.org/mailman/listinfo/python-list
Soappy: "Fault SOAP-ENV:Client: session_lifetime_syntax_incorrect"
Hi people! I try to access the service of my provider through SOAP, with the credentials I received from my provider once before. Hier ist der 33 lines of code: from SOAPpy import WSDL from SOAPpy.Errors import HTTPError as SoapHTTPError from SOAPpy.Types import faultType import hashlib class KASSystem: def __init__(self): WSDL_AUTH = 'https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl' WSDL_API = 'https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl' userpass = ['mylogin','mypassword'] m = hashlib.sha1() m.update(userpass[1]) userpass[1] = m.hexdigest() loginData = {'user':userpass[0],'pass':userpass[1]} self.__SoapClient = WSDL.Proxy(WSDL_AUTH) try: self.__CredentialToken = self.__SoapClient.KasAuth('authAnfrage',{ 'KasUser':loginData['user'], 'KasAuthType':'sha1', 'KasPassword':loginData['pass'], 'SessionLifeTime':1800, 'SessionUpdateLifeTime':'Y'}) except (SoapHTTPError), e: print "Fehlermeldung:", e.code,e.msg KasObj = KASSystem() Here is the error message: Traceback (most recent call last): File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 38, in KasObj = KASSystem() File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 32, in __init__ 'SessionUpdateLifeTime':'Y'}) File "build/bdist.linux-x86_64/egg/SOAPpy/Client.py", line 540, in __call__ File "build/bdist.linux-x86_64/egg/SOAPpy/Client.py", line 562, in __r_call File "build/bdist.linux-x86_64/egg/SOAPpy/Client.py", line 475, in __call SOAPpy.Types.faultType: I really don't know what I did wrong for any help, I am grateful! Tamer -- http://mail.python.org/mailman/listinfo/python-list
SOAPpy.Types.faultType: Cannot use object of type stdClass as array
Hi poeple! I wrote a small script, and I am not getting smartwhat is ment with this error message... Any ideas?! I got this error message: SOAPpy.Types.faultType: File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 32, in KasObj = KASSystem() File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 27, in __init__ 'SessionLifeTime':loginData['sess_lt'],'SessionUpdateLifeTime':'Y'}) Here is the code: from SOAPpy import WSDL from SOAPpy.Errors import HTTPError as SoapHTTPError from SOAPpy.Types import faultType import hashlib class KASSystem(object): def __init__(self): WSDL_AUTH = 'https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl' WSDL_API = 'https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl' userpass = ['login','password'] m = hashlib.sha1() m.update(userpass[1]) userpass[1] = m.hexdigest() loginData = {'user':userpass[0],'pass':userpass[1]} self.__SoapServer = WSDL.Proxy(WSDL_AUTH) try: self.__CredentialToken = self.__SoapServer.KasAuth({ 'KasUser':loginData['user'], 'KasAuthType':'sha1', 'KasPassword':loginData['pass'], 'SessionLifeTime':1800,'SessionUpdateLifeTime':'Y'}) except (SoapHTTPError), e: print "Fehlermeldung:", e.code,e.msg KasObj = KASSystem() -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Monty Python in Syria
Exactly! NOT PROGRAMMING related has NOTHING TODO HERE! Tamer Am 15.08.2012 16:42, schrieb Dotan Cohen: > On Wed, Aug 15, 2012 at 5:41 PM, Dotan Cohen wrote: >> And now for something completely different. >> >> Not programming related, but at 1:20 I was expecting a different question: >> http://www.aljazeera.com/news/middleeast/2012/08/2012813103922872697.html >> >> I figured if anybody could appreciate that, it would be the folks here. >> Enjoy! >> > > For context, start the video at 1:00. > > -- http://mail.python.org/mailman/listinfo/python-list
Re: dictionary into desired variable....
Sorry, I ment of course list what I exaclty ment is that if I assign value = Number that I automaticly assign y[1][3][6][1][1] a new number. more detailled explained: let us say a would be x = [2,5,4] y = a[3] if I change y to [] I want the result to be x = [2,5,[]] and that's automaticly independently how deep i dig. Sorry for the inconvenience. Tamer Am 10.08.2012 16:31, schrieb Chris Angelico: > On Sat, Aug 11, 2012 at 12:02 AM, Tamer Higazi wrote: >> Hi! >> suppose you have a dictionary that looks like this: >> >> x = [1,3,6,1,1] which should represent a certain other variable. >> >> in reality it would represent: >> >> y[1][3][6][1][1] >> >> Now, how do I write a python routine, that points in this dictionary, >> where I should receive or set other values. > > For a start, that looks like a list, not a dictionary. A dict in > Python is a mapping, eg a hashtable - an unordered pairing of keys and > values. But this might do what you want: > > value = y > for idx in x: >value = value[idx] > > At the end of that, 'value' will be the same as 'y[1][3][6][1][1]'. > > If that's not what you mean, you may want to clarify your question some. > > Hope that helps! > > Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list
dictionary into desired variable....
Hi! suppose you have a dictionary that looks like this: x = [1,3,6,1,1] which should represent a certain other variable. in reality it would represent: y[1][3][6][1][1] Now, how do I write a python routine, that points in this dictionary, where I should receive or set other values. Tamer -- http://mail.python.org/mailman/listinfo/python-list
Re: Communication between C++ server and Python app
Take the twisted library. I used to write myself a socket server and client. Socket is fast, but you need on the other hand to know how big the dataset might be, that will be serialized and deserialized as well. Tamer Am 29.04.2012 08:24, schrieb Cameron Simpson: > On 29Apr2012 11:42, Chris Angelico wrote: > | On Sun, Apr 29, 2012 at 10:45 AM, kenk > wrote: > | > I've got a server process written in C++ running on Unix machine. > | > On the same box I'd like to run multiple Python scripts that will > | > communicate with this server. > | > > | > Can you please suggest what would be best was to achieve this ? > | > | Personally, I would recommend a TCP socket, because that allows the > | flexibility of splitting across multiple computers. > > And the pain of ensuring security, if you're in an open network. > > | But for > | efficiency, you may want to consider a Unix socket too. > > A UNIX socket or even a named pipe has the benefit of: > - not being available remotely > - access control with normal UNIX permissions > and of course efficiency as you say. > > Generalising to a TCP socket later shouldn't be too hard if the need > arises. > > Cheers, -- http://mail.python.org/mailman/listinfo/python-list
Re: MAJOR JAVA EVANGELIST CONVERTS TO PYTHON !!!!!!!!!!!!!!
AND PYTHON IS REALLY COOL! Especially this beautiful JPype Bridge that makes it possible to push requests between PYTHON and JAVA. really really really cool! Am 27.02.2012 01:05, schrieb John Ladasky: On Feb 26, 12:29 am, BV wrote: MAJOR CANADIAN CHRISTIAN MISSIONARY CONVERTS TO ISLAM MAJOR JAVA EVANGELIST CONVERTS TO PYTHON !! ...Hey, someone has to keep the spam around here on-topic. -- http://mail.python.org/mailman/listinfo/python-list
access address from object and vice versa
Hi people! I have asked myself the following thing. How do I access the address of an object and later get the object from that address ?! I am heavily interisted. thank you Tamer -- http://mail.python.org/mailman/listinfo/python-list
Re: Zealotry [was Re: how to install lxml in window xp?]
dear people! I have just opened my MTU client, and figured out that through my comment, i caused a complete NONSENSE discussion at all. 1. I am not a zealot or whatever. I code on Linux and port it on MAC and WINDOWS. I do write solutions for customers across the whole 3 platform, and mostly I succeed because I have to figure out in advance which software (packages) are being supported and how far. 2. There are many open source projects out (don't ask where, look for yourself, you are old enough!) as well commercial software vendors who don't offer their products, or give support for Windows XP. 3. All of you know, that windows xp is by Microsoft not anymore supported. Neither with Security Updated, Enhancements with Software, SDK or whatever. and not only XP, also Win95,98,ME, and 2000 Professional (not the server editions). 4. Of course any OS has it's advantages and disadvantages. Gentoo is a rolling distribution, when it's set up it works nicely. Of course, you have to invest a lot of effort to get in what doesn't mean that Debian and Ubuntu, and the others are worse. Those who want to get packages maintained by others and love to get the System to run quickly is very good with the other distributions, and coding on those platforms make fun too. >From my personal point of view, I will never set up a gentoo machine as a server in a datacenter, I would rather use BSD Unix. But this is something that personally everybody has to decide for him/herself. Now, I hope that I put a line under this discussions and beg the kids between the age of 18 - 24 who are really impulsive to fire around with the guns on others to stop this nonsense thread. That doesn't leave a nice picture in the community. PS: However, I will read the next mails in the list according this subject but I will stop commenting it, because it's getting for me too childish. Tamer Am 13.01.2012 16:32, schrieb John Gordon: > In <4f0fbad0$0$29984$c3e8da3$54964...@news.astraweb.com> Steven D'Aprano > writes: > >> Why is it that only Linux and Mac users are accused of being "zealots"? > > Perhaps because Windows, being in a position of market dominance, doesn't > *need* zealots. > -- http://mail.python.org/mailman/listinfo/python-list
Re: how to install lxml in window xp?
Am 12.01.2012 06:08, schrieb Brian Curtin: > On Wed, Jan 11, 2012 at 23:01, Tamer Higazi wrote: >> Use Linux! >> Specially Gentoo Linux! > > Not a useful answer. then take windows 7 instead of something that is no more supported by the vendor itself. I am running Python 64Bit on my Windows machine and almost every library could have been installed my sides with the MSSDK and the Visual C++ 2008 Express Edition compiler in the background, that tasks are invoked automatically by easy_install. So, instead of making yourself continuously headache for an outdated OS I advise taking a low performance OS like, let us say, xubunutu that has a light environment instead of gnome3 or kde4 for a WindowsXP designed CPU. Tamer -- http://mail.python.org/mailman/listinfo/python-list
Re: how to install lxml in window xp?
Use Linux! Specially Gentoo Linux! Tamer Am 09.01.2012 10:18, schrieb 水静流深: > in my xp ,python26,easy_install installed. > i want to install lxml in window xp > 1.c:\python26\scripts\easy_install lxml > > what i get is: > > Reading http://codespeak.net/lxml > Best match: lxml 2.3.3 > Downloading http://lxml.de/files/lxml-2.3.3.tgz > Processing lxml-2.3.3.tgz > Running lxml-2.3.3\setup.py -q bdist_egg --dist-dir > c:\windows\temp\easy_install > -58e4ap\lxml-2.3.3\egg-dist-tmp-hyg1bg > Building lxml version 2.3.3. > Building with Cython 0.15.1. > ERROR: 'xslt-config' is not recognized as an internal or external command, > operable program or batch file. > > ** make sure the development packages of libxml2 and libxslt are > installed ** > > Using build configuration of libxslt > warning: no files found matching 'lxml.etree.c' under directory 'src\lxml' > warning: no files found matching 'lxml.objectify.c' under directory > 'src\lxml' > warning: no files found matching 'lxml.etree.h' under directory 'src\lxml' > warning: no files found matching 'lxml.etree_api.h' under directory > 'src\lxml' > warning: no files found matching 'etree_defs.h' under directory 'src\lxml' > > > Reading http://codespeak.net/lxml > Best match: lxml 2.3.3 > Downloading http://lxml.de/files/lxml-2.3.3.tgz > Processing lxml-2.3.3.tgz > Running lxml-2.3.3\setup.py -q bdist_egg --dist-dir > c:\windows\temp\easy_install > -58e4ap\lxml-2.3.3\egg-dist-tmp-hyg1bg > Building lxml version 2.3.3. > Building with Cython 0.15.1. > ERROR: 'xslt-config' is not recognized as an internal or external command, > operable program or batch file. > > ** make sure the development packages of libxml2 and libxslt are > installed ** > > Using build configuration of libxslt > warning: no files found matching 'lxml.etree.c' under directory 'src\lxml' > warning: no files found matching 'lxml.objectify.c' under directory > 'src\lxml' > warning: no files found matching 'lxml.etree.h' under directory 'src\lxml' > warning: no files found matching 'lxml.etree_api.h' under directory > 'src\lxml' > warning: no files found matching 'etree_defs.h' under directory 'src\lxml' > warning: no files found matching 'pubkey.asc' under directory 'doc' > warning: no files found matching 'tagpython*.png' under directory 'doc' > warning: no files found matching 'Makefile' under directory 'doc' > > error: Setup script exited with error: None > > how can i install the lxml in my xp?? > > -- http://mail.python.org/mailman/listinfo/python-list
Re: Python3 on MacOsX Lion?
Hi Rich! Why don't you ask the maintainer who built the macport?! Why don't you try to to figure out with "WHAT" kind of tools they have built the mac port and "WHERE" to get them either. And ask him also how to set the flags to build the 64bit edition. Then you don't have to be afraid of any prebuild mac port editions. This is how I would do it. Tamer Am 02.01.2012 22:23, schrieb K Richard Pixley: On 1/2/12 13:03 , Benjamin Kaplan wrote: On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley wrote: Where would I look to find the current expected status of python3 on MacOsX Lion? The distributed binaries aren't capable of allowing extensions that use gcc. I can build the source naked, but then it lacks some libraries, notably, readline. Attempting to build the full Mac packages fails, even with the few tiny patches I used for 2.7.2. Is anyone working on this? Are there pre-release patches available? Should I be asking elsewhere? --rich -- Have you tried building through Macports? No, I haven't. Macports scares me. When I tried them, or fink, in the past, they rapidly polluted my boot disk and I didn't have any way to unpollute it other than reloading from scratch. In freebsd, netbsd, or any of the linux distributions, I can trivially create a virtual machine in about 20 minutes, screw with it as I like, and toss it in seconds. In modern linux, I can create a root file system with btrfs, snapshot, chroot to the snapshot and munge away. When I'm done, I can just toss the snapshot. (Can do snapshots in vmware too). If I screw up my boot drive in MacOsX, I'm in for hours of recovery time reloading from Time Machine. While that's a lot better than it used to be now that Time Machine is available, (reloading can now be done largely unattended), it's not a price I'm willing to pay in order to attempt to use Macports. --rich -- http://mail.python.org/mailman/listinfo/python-list
Re: Does anyone use Python Tools for visual studio?
buy wingIDE or use PyDEV If you tell me that you are using IronPython then buy wingIDE, there you can make use of the .net classes in python too. Tamer Am 01.11.2011 18:01, schrieb Wei: > On Nov 1, 12:57 pm, Wei wrote: >> I got several buggy things going on. >> First, the view of class tree stops expanding after creating more than >> two classes. >> Second, after 800 lines of code the classes and methods can't be >> folded. (meaning the + sign is gone) >> P.S. there is no warning or errors in my code. > > Also, I am using 64 bit win7 professional. -- http://mail.python.org/mailman/listinfo/python-list
Re: sending more then 2 messages at a time to a SocketServer fails
Am 01.11.2011 17:13, schrieb Miki Tebeka: > MKTest.getObj(data[0]) will return the same object on every call(with the > same data that was initialized 1'st time). Any Daten parameter after the 1'st > call is ignored. Not true! The singleton object has nothing todo. Here one more example for you: Client: import socket data = ['Tamer'] received = [None,None] HOST,PORT = "localhost", sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((HOST, PORT)) sock.send('%s' % data) received[0] = sock.recv(1024) sock.send('%s' % data) received[1] = sock.recv(1024) sock.close() print received Server: import SocketServer from ast import literal_eval class MySockX(SocketServer.BaseRequestHandler): def handle(self): data = self.request.recv(1024) data = literal_eval(data) data = '%s' % data[0] self.request.send('%s %s' % ('Halloaaa',data)) if __name__ == "__main__": HOST, PORT = "localhost", server = SocketServer.TCPServer((HOST,PORT),MySockX) server.serve_forever() with it's result: ['Halloaaa Tamer', ''] the 2nd argument from the list is EMPTY. Now tell me why?! -- http://mail.python.org/mailman/listinfo/python-list
don't get JPE (Java Python Extension) compiled.
Hi people! I want to compile the Java Python Extension which I downloaded through CVS "http://jpe.cvs.sourceforge.net/jpe/"; Building JPE by bootstrapping the makefile system with the cmd: "python makefile.py" from the top source directory. I receive the following error message: working in use make command ksh /home/tamer/JPE/libplus/bin/pybatch.ksh /home/tamer/JPE/libplus /usr/bin/python -c "import devkit; devkit.pythonexe = None; import imp; imp.load_source( 'makefile', 'makefile.py', open( 'makefile.py')).genmake()" /bin/sh: ksh: command not found make: *** [all] Error 127 for any help solving my problem getting JPE compiled, I would thank you very much Tamer Higazi -- http://mail.python.org/mailman/listinfo/python-list
call by reference howto????
Hi! Can somebody of you make me a sample how to define a function based on "call by reference" ??? I am a python newbie and I am not getting smart how to define functions, that should modify the variable I passed by reference. thanks in advance Tamer -- http://mail.python.org/mailman/listinfo/python-list
Re: Python for web...
http://www.djangobook.com/ if you love to read that book online. Otherwise, if you don't have DSL, just mirror the site for offline usage with "wget" Tamer [EMAIL PROTECTED] wrote: > Hi everyone, > > I have to develop a web based enterprise application for my final year > project. Since i am interested in open source, i searched the net. > Almost 90% of them were PHP and MySQL. Cant we use python for that ? I > tried several sites, but there is not enough tutorial for beginners > [mod_python, PSP etc]. I couldnt find any detailed book, not even a > single book :( All the python books are covering only CGI part) > > Any suggestions? Any recommended book? > > Execuse my English. > > Thushanthan. -- http://mail.python.org/mailman/listinfo/python-list
most loved template engine on python is?
Hi people! After deciding choosing python as my future killer application language for writing web applications, I need from you guys still some support, if you apologize. Question: Which is the most loved template engine for python? I see, that I can do more aspect oriented programming with python as with ruby (as comparing those languages). God thanks, I do not have to create an object for every small thing in python and still generate classes and access methods statically. Tamer -- http://mail.python.org/mailman/listinfo/python-list
Re: PHP Developer highly interested in Python (web development) with some open questions...
Am Sonntag, den 24.02.2008, 13:44 +0100 schrieb Christian Heimes: > > Plone and Archetypes (based on Zope) have a tool named ArchGenXML. It > takes UML XMI files and generates content types, workflows and products > for the Plone CMS. I don't want workflows, I want the classes and methods generated. Or do I understand this answer wrong > Source code encryption can't stop people from reading or stealing your > code. Microsoft tries it, Apple tries it and even the RIAA tries it. > None of them had success in the past. :] > > A proper service contract is more important. Not true! you can disassemble the app and then have fun reading, not that easy. I simply want that nobody reads the "sourcecode" or better said the content of the python files I would have generated. But I think I have found one sollution. I have red that the bytecode compiler from Python is very advanced (more then the PHP bcompiler) to give me good brotection. Still I will have to look a lot for Python libraries which give me the same hardcore feeling like ezComponent (ez.no). I think Python is great! And I will soon dive there in! :) What is the difference between Ruby and Python? Can anyone say that to me? -- http://mail.python.org/mailman/listinfo/python-list
PHP Developer highly interested in Python (web development) with some open questions...
Hi! My brother is dreaming and dying for python and swear that it is the ultimate killer application language. I am coding Webapplication in PHP5 and ask myself if for python are: - application frameworks like: "Zend Framework" and ezComponents - What is the Zope Applikation Server? Is it also a Webserver like the Apache or Tomcat Webserver? - Is there a way of Round Tripp engineering based on UML XMI Files to generate python files (with it's dependencies) - Let us assume, I want to write a Web application in Python (what I did now in PHP5) and want to distribute my work under commercial usage. Can I encrypt my work and generate Licence Files for Customers who would purchase my End-Sollution like with: - Zend Encoder - IonCube - SourceGuardian ??? I just ask, because I have finished a product and will encrpyt it with the Ioncube encoder based on PHP5. for answering all my Questions, I would thank you guys very much. Tamer Higazi -- http://mail.python.org/mailman/listinfo/python-list
PHP Developer highly interested in Python (web development) with some open questions...
Hi! My brother is dreaming and dying for python and swear that it is the ultimate killer application language. I am coding Webapplication in PHP5 and ask myself if for python are: - application frameworks like: "Zend Framework" and ezComponents - What is the Zope Applikation Server? Is it also a Webserver like the Apache or Tomcat Webserver? - Is there a way of Round Tripp engineering based on UML XMI Files to generate python files (with it's dependencies) - Let us assume, I want to write a Web application in Python (what I did now in PHP5) and want to distribute my work under commercial usage. Can I encrypt my work and generate Licence Files for Customers who would purchase my End-Sollution like with: - Zend Encoder - IonCube - SourceGuardian ??? I just ask, because I have finished a product and will encrpyt it with the Ioncube encoder based on PHP5. for answering all my Questions, I would thank you guys very much Tamer Higazi -- http://mail.python.org/mailman/listinfo/python-list