Re: hide python code !
Bayazee wrote: hi can we hide a python code ? if i want to write a commercial software can i hide my source code from users access ? we can conver it to pyc but this file can decompiled ... so ...!! do you have any idea about this ...? Use Pyrex in order to build C-Modules from the critical parts of your software. --- First Iranian Open Source Community : www.python.ir Interesting ... but you are not a member of this community. Right? --Armin -- http://mail.python.org/mailman/listinfo/python-list
Re: Python multithreading on cluster system? Embedding python in PVM?
abhinav wrote: Hi guys.I have read that one cannot perform true multithreading in python due to global interpreter lock mechanism.Suppose i have to implement a crawler on a say cluster system like clusterknoppix so that i can use parallel virtual machine (PVM)for programming in multiprocessor environment or say open MPI.Can i integrate python with PVM or MPI.Can i embed python into C for programming in multiprocessor environment.Is there any way of embedding python in PVM or MPI so that i can implement a true cluster based search engine? Any help would be very kind.Thanks. http://pypvm.sourceforge.net --Armin -- http://mail.python.org/mailman/listinfo/python-list
Re: editor for Python on Linux
Mladen Adamovic wrote: Hi! I wonder which editor or IDE you can recommend me for writing Python programs. I tried with jEdit but it isn't perfect. Nothing is perfect ... but try SciTE and Eric http://www.die-offenbachs.de/detlev/eric3.html --Armin http://www.steinhoff-automation.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Match First Sequence in Regular Expression?
Alex Martelli wrote: Christoph Conrad [EMAIL PROTECTED] wrote: Hello Roger, since the length of the first sequence of the letter 'a' is 2. Yours accepts it, right? Yes, i misunderstood your requirements. So it must be modified essentially to that what Tim Chase wrote: m = re.search('^[^a]*a{3}b', 'xyz123aabbaaab') ...but that rejects 'aazaaab' which should apparently be accepted. ... and that is OK. That was the request: I'm looking for a regular expression that matches the first, and only the first, sequence of the letter 'a', and only if the length of the sequence is exactly 3. --Armin Alex -- http://mail.python.org/mailman/listinfo/python-list
Re: Should I move to Amsterdam?
Adriaan Renting wrote: Well, I'm not sure if Amsterdam is nice, but the Netherlands is o.k., except for the weather. I'd like to descripbe it as 49 weeks of autumn, 1 week of spring, 1 week of summer, 1 week of winter. Currently my employer only has an opening for a Microwave Antenna designer though, sorry no Python coders. http://www.astron.nl/astron/jobs/index.htm Seems like a nice column, I'll read it completely some other time. Wade [EMAIL PROTECTED] 08/24/05 2:31 pm http://www.slate.com/id/2124561/entry/2124562/ Nice little series by Seth Stevenson for Americans daydreaming about emigration. Somewhere, anywhere ... maybe Amsterdam? I've never been to the Netherlands myself, but it sounds very civilized. What a joke ... Amsterdam is 'civilized' since several hundreds of years :) --Armin Extra Python connection, besides the obvious one: Is gezellig related to the Zen of Python? ( http://wordcraft.infopop.cc/eve/ubb.x/a/tpc/f/6351024471/m/2041067571/r/3901049571 ) -- Wade Leftwich Ithaca, NY -- http://mail.python.org/mailman/listinfo/python-list
PyXML/expat and the empty elements
Hi all, is it possible to get the name of an empty element specified by element/ ... the expat parser seems only to recognize the element/element form Regards Armin -- http://mail.python.org/mailman/listinfo/python-list
Re: PyXML/expat and the empty elements
Armin Steinhoff wrote: Hi all, is it possible to get the name of an empty element specified by element/ ... the expat parser seems only to recognize the element/element form Regards Armin Ok ... found the root of the problem. The expat parser is OK :) Regards Armin -- http://mail.python.org/mailman/listinfo/python-list
Re: pyvm -- faster python
Stelios Xanthakis wrote: Kay Schluehr wrote: Yes. What we are seeking for and this may be the meaning of Armins intentiously provocative statement about the speed of running HLLs is a successor of the C-language and not just another VM interpreter that is written in C and limits all efforts to extend it in a flexible and OO-manner. Python is just the most promising dynamic OO-language to follow this target. Bytecode engine is the best method for dynamic code execution (exec, eval, etc). A low level OOP language would be very suitable for a python VM. pyvm has that. A big part of it is written in lightweight C++ [1]. Realy ? I have downloaded the lwc distribution and checked it out. It was a surprise that none of the examples are working. I'm using SuSE 9.0 with gcc 3.3.1 ... Is there a working version of lwc ??? Regards Armin That makes it less portable as the lwc preprocessor is using GNU-C extensions. However, it's the same extensions also used by the linux kernel and AFAIK the intel compiler supports them too. So probably the bigger competitor of pyvm is boost-python. And that's one reason the release of the source is stalled until it gets better. Stelios [1] http://students.ceid.upatras.gr/~sxanth/lwc/ -- http://mail.python.org/mailman/listinfo/python-list
Re: GIL release
Alastair Basden wrote: Hi, Does anyone know whether there is a way for a python thread to release the global interpreter lock, and let all other threads have a chance at running before re-acquiring it? Does the thread scheduling follow a round-robin method? The thread itself are scheduled by the OS ... the access to the GIL is managed by 'cooperative scheduling'. --Armin Thanks, agb. -- http://mail.python.org/mailman/listinfo/python-list
Re: Calling a C program from a Python Script
Brad Tilley wrote: Is it possible to write a file open, then read program in C and then call the C program from a Python script like this: for root, files, dirs in os.walk(path) for f in files: try: EXECUTE_C_PROGRAM If possible, how much faster would this be over a pure Python solution? I would compile that C program into a shared library (*.so or *.dll ) in order to use that shared library with ctypes ... that's the easiest way, IMHO :) ( http://starship.python.net/crew/theller/ctypes ) Regards Armin Thank you, Brad -- http://mail.python.org/mailman/listinfo/python-list
CTYPE 0.9.2 porting problems
Hi all, I ported ctypes 0.9.2 to QNX6.3 ... 99.9 % is working but only the unittest test_functions.py makes some problem. Here is the code: p = pointer(c_int(99)) result = f(p) self.failUnlessEqual(result.contents.value, 99) #--- works!! # We need to keep the pointer alive, otherwise the contents change: result = f(pointer(c_int(99))) print result.contents.value self.failIfEqual(result.contents.value, 99) Error message: # python test_functions.py ..99 F. == FAIL: test_pointers (__main__.FunctionTestCase) -- Traceback (most recent call last): File test_functions.py, line 194, in test_pointers self.failIfEqual(result.contents.value, 99) File /usr/local/lib/python2.3/unittest.py, line 310, in failIfEqual raise self.failureException, \ AssertionError: 99 == 99 What's the problem here? 99 isn't equal 99 :) -- Ran 16 tests in 0.053s FAILED (failures=1) # # XXX But this not! WHY on earth? BUT this IS working!! arg = byref(v) result = f(arg) self.failIfEqual(result.contents, v.value) I see always a crash of Python if the library call time() is used ... but it happens only with this call. What could be in general the reasons?? Regards Armin -- http://mail.python.org/mailman/listinfo/python-list