Encryption source code with md5

2010-03-28 Thread catalinf...@gmail.com
Dear friends . I have two simple questions: It is possible to encrypt with md5 python source code? What option do I have to protect my python source code? Thank you . -- http://mail.python.org/mailman/listinfo/python-list

Re: GIF89A and PIL

2010-03-28 Thread garabik-news-2005-05
Harishankar wrote: > >> Just opening, and then saving the same file with no changes at all, >> resulted in a 72 byte file growing to 920. >> >> I thought it was GIF87a vs GIF89a... but have since come to determine it >> doesn't appear to be. I decided to give PNG a try again, since those >> extr

Re: Encryption source code with md5

2010-03-28 Thread alex goretoy
There's not many options when it comes to obfuscating python source. If you even do find a way to obfuscate it. It won't take much to reverse it. That's just how python works. Really I wouldn't even worry about looking for a way to do this, reason behind that is that it's not difficult to reverse i

Re: Encryption source code with md5

2010-03-28 Thread starglider develop
py2exe On 28 March 2010 07:59, catalinf...@gmail.com wrote: > Dear friends . > > I have two simple questions: > It is possible to encrypt with md5 python source code? > What option do I have to protect my python source code? > > Thank you . > -- > http://mail.python.org/mailman/listinfo/python-l

Re: Encryption source code with md5

2010-03-28 Thread Lawrence D'Oliveiro
In message <91541c26-6f18-40c7- a0df-252a52bb7...@l25g2000yqd.googlegroups.com>, catalinf...@gmail.com wrote: > It is possible to encrypt with md5 python source code? Don’t use MD5. > What option do I have to protect my python source code? Copyright. -- http://mail.python.org/mailman/listinfo

Re: Classes as namespaces?

2010-03-28 Thread News123
Hi STephen, Stephen Hansen wrote: > That said... > >> [*] My own subjective dislike for the widespread practice of using >> triple quotes to comment out code is formally similar to this one >> ("the 'intended use' for triple-quoting is not to comment out code", >> etc.). Here I find myself on t

Re: Programmatically discovering encoding types supported by codecs module

2010-03-28 Thread python
Gabriel, Thank you for your analysis - very interesting. Enjoyed your fromlist choice of names. I'm still in my honeymoon phase with Python so I only know the first part :) Regards, Malcolm - Original message - From: "Gabriel Genellina" To: python-list@python.org Date: Wed, 24 Mar 2010

Need help with using SOAP based web service

2010-03-28 Thread Arun Balagopal
Hi, I am working on a project in text mining using Python. As part of the project I need to use a technical term extractor, and I found the Terminesystem from NACTEM very useful. I have used the web demo (it's pretty nifty) and now want to integrate i

Re: Encryption source code with md5

2010-03-28 Thread Irmen de Jong
On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: In message<91541c26-6f18-40c7- a0df-252a52bb7...@l25g2000yqd.googlegroups.com>, catalinf...@gmail.com wrote: It is possible to encrypt with md5 python source code? Don’t use MD5. Also, md5 is not an encryption algorithm at all, it is a secure h

AUTHENTIC DESIGNER HANDBAGS ACCESSORIES GREAT DISCOUNTS! WWW.VOGUELANDE.COM

2010-03-28 Thread Rolla
Dear Customer, We now have NEW ARRIVAL accessories coming. Please check the site as follows, http://www.voguelande.com/ChanelAcce.html http://www.voguelande.com/Accessories.html CONTACT INFO: i...@voguelande.com -- http://mail.python.org/mailman/listinfo/python-list

رجل حامل في الكويت !!! صور

2010-03-28 Thread اااالوافي
http://www.nb11.net/vb/forumdisplay.php?f=25 -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption source code with md5

2010-03-28 Thread catalinf...@gmail.com
I had a talk about Python and distribution of commercial products created with python. This made me think of a way to protect my source code to be distributed. I thought a live CD version and then to an encryption method of a portion of source code. These thoughts are the source of two questions. -

map, index

2010-03-28 Thread Luis Quesada
Dear all, I am new to Python, so I apologize in advance if you find my questions naive (or if they have been already answered in this forum). 1. What is the most pythonic way of mapping a list where the value each element is mapped to depends on the index of the element. Is there a way of wr

Re: Simple Traits Questions

2010-03-28 Thread Ethan Furman
Robert Kern wrote: On 2010-03-27 08:19 , Ethan Furman wrote: Okay, different post for my actual questions. :) On the PyPI page for strait (http://pypi.python.org/pypi/strait/0.5.1) it has the example of choosing which methods to keep in the composed class: class TOSWidget(BaseWidget): __me

Re: map, index

2010-03-28 Thread Duncan Booth
Luis Quesada wrote: > Is there a way > of writing the following without using zip: > map(lambda (id,v):id*v,zip(range(len(L)),L)) [ id*v for id,v in enumerate(L) ] -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption source code with md5

2010-03-28 Thread Steve Holden
catalinf...@gmail.com wrote: > I had a talk about Python and distribution of commercial products > created with python. This made me think of a way to protect my source > code to be distributed. I thought a live CD version and then to an > encryption method of a portion of source code. These though

Re: sum for sequences?

2010-03-28 Thread Steve Howell
On Mar 27, 3:18 am, Steven D'Aprano wrote: > On Fri, 26 Mar 2010 07:31:17 -0700, Steve Howell wrote: > > From a purely academic standpoint, I'm not convinced that sum() is > > inefficient in terms of big-O complexity, though. > > >  show...@showell-laptop:~$ python > >  Python 2.6.2 (release26-mai

Re: function decorator-like function

2010-03-28 Thread Michele Simionato
Another option is to use my own decorator module (http:// pypi.python.org/pypi/decorator): from decorator import decorator @decorator def d(func, *args): print 3 return func(*args) @d def f(a, b): print a + b f(5, 7) -- http://mail.python.org/mailman/listinfo/python-list

Re: map, index

2010-03-28 Thread Luis Quesada
Duncan Booth wrote: Luis Quesada wrote: Is there a way of writing the following without using zip: map(lambda (id,v):id*v,zip(range(len(L)),L)) [ id*v for id,v in enumerate(L) ] Cool! Thanks! Cheers, Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption source code with md5

2010-03-28 Thread Harishankar
On Sun, 28 Mar 2010 10:08:20 -0400, Steve Holden wrote: > catalinf...@gmail.com wrote: >> I had a talk about Python and distribution of commercial products >> created with python. This made me think of a way to protect my source >> code to be distributed. I thought a live CD version and then to an

Re: sum for sequences?

2010-03-28 Thread Steven D'Aprano
On Sun, 28 Mar 2010 07:16:10 -0700, Steve Howell wrote: > The mildly surprising part of sum() is that is does add vs. add-in- > place, which leads to O(N) vs. O(1) for the inner loop calls, for > certain data structures, notably lists, even though none of the > intermediate results get used by the

Re: Encryption source code with md5

2010-03-28 Thread Steven D'Aprano
On Sun, 28 Mar 2010 10:08:20 -0400, Steve Holden wrote: > catalinf...@gmail.com wrote: >> I had a talk about Python and distribution of commercial products >> created with python. This made me think of a way to protect my source >> code to be distributed. I thought a live CD version and then to an

Re: StringChain -- a data structure for managing large sequences of chunks of bytes

2010-03-28 Thread Steven D'Aprano
On Sun, 28 Mar 2010 06:48:21 +1100, Lie Ryan wrote: > On 03/22/2010 07:07 PM, Steven D'Aprano wrote: >> Perhaps you should have said that it was a wrapper around deque giving >> richer functionality, rather than giving the impression that it was a >> brand new data structure invented by you. Peopl

Re: sum for sequences?

2010-03-28 Thread Duncan Booth
Steve Howell wrote: > The mildly surprising part of sum() is that is does add vs. add-in- > place, which leads to O(N) vs. O(1) for the inner loop calls, for > certain data structures, notably lists, even though none of the > intermediate results get used by the caller. For lists, you could > ma

Re: sum for sequences?

2010-03-28 Thread Steve Howell
On Mar 28, 8:17 am, Duncan Booth wrote: > Steve Howell wrote: > > The mildly surprising part of sum() is that is does add vs. add-in- > > place, which leads to O(N) vs. O(1) for the inner loop calls, for > > certain data structures, notably lists, even though none of the > > intermediate results

Why this Difference in Importing NumPy 1.2 vs 1.4?

2010-03-28 Thread W. eWatson
I wrote a program in Python 2.5 under Win7 and it runs fine using Numpy 1.2 , but not on a colleague's machine who has a slightly newer 2.5 and uses NumPy 1.4. We both use IDLE to execute the program. During import he gets this: >>> Traceback (most recent call last): File "C:\Documents and S

Re: sum for sequences?

2010-03-28 Thread Steve Howell
On Mar 28, 7:57 am, Steven D'Aprano wrote: > On Sun, 28 Mar 2010 07:16:10 -0700, Steve Howell wrote: > > The mildly surprising part of sum() is that is does add vs. add-in- > > place, which leads to O(N) vs. O(1) for the inner loop calls, for > > certain data structures, notably lists, even though

Re: function decorator-like function

2010-03-28 Thread Patrick Maupin
On Mar 28, 9:17 am, Michele Simionato wrote: > Another option is to use my own decorator module (http:// > pypi.python.org/pypi/decorator): > > from decorator import decorator > > @decorator > def d(func, *args): >     print 3 >     return func(*args) > > @d > def f(a, b): >     print a + b > > f(

Re: sum for sequences?

2010-03-28 Thread Patrick Maupin
On Mar 28, 10:17 am, Duncan Booth wrote: > Doing add-in-place isn't the only way to make sum more efficient: if you > assume that addition is associative (which of course the builtin sum can't) > then you can form partial sums. e.g. instead of calculating: ... > > Doing it this way helps summing l

Re: sum for sequences?

2010-03-28 Thread Alf P. Steinbach
* Steve Howell: On Mar 28, 8:17 am, Duncan Booth wrote: Steve Howell wrote: The mildly surprising part of sum() is that is does add vs. add-in- place, which leads to O(N) vs. O(1) for the inner loop calls, for certain data structures, notably lists, even though none of the intermediate result

Re: sum for sequences?

2010-03-28 Thread Steve Howell
On Mar 28, 9:56 am, "Alf P. Steinbach" wrote: > * Steve Howell: >> (talking about summing a list of lists) > >  From a more practical point of view, the sum efficiency could be improved by > doing the first addition using '+' and the rest using '+=', without changing > the > behavior. I like tha

Re: sum for sequences?

2010-03-28 Thread Patrick Maupin
On Mar 28, 11:56 am, "Alf P. Steinbach" wrote: >  From a more practical point of view, the sum efficiency could be improved by > doing the first addition using '+' and the rest using '+=', without changing > the > behavior. Mod parent up :-) -- http://mail.python.org/mailman/listinfo/python

Re: sum for sequences?

2010-03-28 Thread Steve Howell
On Mar 28, 10:21 am, Steve Howell wrote: >     import timeit >     M = 10 >     N = 8000 > >     def in_place( >         start = [], >         sublists = ([[None] * M]) * N >         ): >         # only macro-optimized >         i = 0 >         for sublist in sublists: >             if i == 0: >  

Re: sum for sequences?

2010-03-28 Thread Patrick Maupin
On Mar 28, 12:34 pm, Steve Howell wrote: > FYI I later obtained similar results with the more general: >                   accum += sublist Yeah, but you still have to create an object of the correct type for accum. And for summing small lists, that will actually increase the runtime. (Worst ca

Re: sum for sequences?

2010-03-28 Thread Steve Howell
On Mar 28, 11:16 am, Patrick Maupin wrote: > On Mar 28, 12:34 pm, Steve Howell wrote: > > > FYI I later obtained similar results with the more general: > >                   accum += sublist > > Yeah, but you still have to create an object of the correct type for > accum.   I think you overlooke

Re: Simple Traits Questions

2010-03-28 Thread Robert Kern
On 2010-03-28 08:46 , Ethan Furman wrote: Robert Kern wrote: On 2010-03-27 08:19 , Ethan Furman wrote: Okay, different post for my actual questions. :) On the PyPI page for strait (http://pypi.python.org/pypi/strait/0.5.1) it has the example of choosing which methods to keep in the composed c

Re: Have you embraced Python 3.x yet?

2010-03-28 Thread James Matthews
I am still on py 2.6 and since my code is heavy model dependent. I am bound to the most critical ones. Although I would really like if someone could backport some new stuff done with the GIL on 3.2 (they had a nice talk about it at PyCon) On Fri, Mar 26, 2010 at 5:33 PM, geremy condra wrote: > O

ANN: Pyasm version 0.3

2010-03-28 Thread Grant Olson
Pyasm is a full-featured dynamic assembler written entirely in Python. By dynamic, I mean that it can be used to generate and execute machine code in python at runtime without requiring the generation of object files and linkage. It essentially allow 'inline' assembly in python modules on x86 platf

Re: map, index

2010-03-28 Thread Paul Rubin
Luis Quesada writes: >> [ id*v for id,v in enumerate(L) ] > Cool! Thanks! If you really want to write that in pointfree style (untested): import itertools, operator ... itertools.starmap(operator.mul, enumerate(L)) For your other question, you could probably do something ugly with ifil

Re: sum for sequences?

2010-03-28 Thread Paul Rubin
Steve Howell writes: > The documentation is pretty clear on the intention that sum() is > intended for numbers: ... I've never been big on the idea of duck-typing addition. Who would have thought that (1,2,3)+(4.5.6) was something other than the vector sum? I think itertools.chain more directly

Re: Python Psycopg2 - Interface Error : Connection already closed

2010-03-28 Thread Philip Semanchuk
On Mar 27, 2010, at 5:14 PM, knobbyknees wrote: I'm not sure if this is the right group, but I'm hoping it is... Basically, I'm trying to use pgloader, which depends on python and psycopg2. After banging my head against a wall, I found this: Found this: http://www.mail-archive.com/sqlalch...

Re: Simple Traits Questions

2010-03-28 Thread Terry Reedy
On 3/28/2010 9:46 AM, Ethan Furman wrote: Robert Kern wrote: On 2010-03-27 08:19 , Ethan Furman wrote: Okay, different post for my actual questions. :) On the PyPI page for strait (http://pypi.python.org/pypi/strait/0.5.1) it has the example of choosing which methods to keep in the composed c

OT: Tech Adviser Wanted by Unusual Social Venture Startup AND WEBEX QUESTION

2010-03-28 Thread Fabian Hernandez
-- Forwarded message -- From: G.Lowell Krane Date: 2010/3/27 Subject: Fwd: [Off Topic] Tech Adviser Wanted by Unusual Social Venture Startup AND WEBEX QUESTION To: Daniel Arbelaez Cc: arpunk , Fabian Hernandez Here is the ad i am trying to get Python-list to post ASAP--this wee

Re: [Off Topic] Tech Adviser Wanted by Unusual Social Venture Startup AND WEBEX QUESTION

2010-03-28 Thread Fabian Hernandez
2010/3/27 G.Lowell Krane > Here is the ad i am trying to get Python-list to post ASAP--this weekend. > > Also, in case one of your best applications is not public, and you want to > demonstrate it, do you prefer webex or what do you prefer? > --gary > > -- Forwarded message -- > F

Re: map, index

2010-03-28 Thread Luis Quesada
Paul Rubin wrote: Luis Quesada writes: [ id*v for id,v in enumerate(L) ] Cool! Thanks! If you really want to write that in pointfree style (untested): import itertools, operator ... itertools.starmap(operator.mul, enumerate(L)) For your other question, you could probably do someth

RE: Re: Super() function

2010-03-28 Thread Delaney, Timothy (Tim)
> Gabriel Genellina wrote: >> Alan Harris-Reid escribió: >> >>> Using Python 3.1, I sometimes use the super() function to call the >>> equivalent method from a parent class, for example >>> >>> def mymethod(self): >>> super().mymethod() >>> some more code... >>> >>> Is there any way of wr

Re: sum for sequences?

2010-03-28 Thread Steven D'Aprano
On Sun, 28 Mar 2010 13:49:32 -0700, Paul Rubin wrote: > Steve Howell writes: >> The documentation is pretty clear on the intention that sum() is >> intended for numbers: ... > > I've never been big on the idea of duck-typing addition. Who would have > thought that (1,2,3)+(4.5.6) was something

pythoncom.CoInitialize() not recognised in Eclipse

2010-03-28 Thread KB
Hi there, I have in the past used PythonWin to write python for COM, and switched to Eclipse. I am getting an error from the IDE saying it does not recognise CoInitialize(): import pythoncom pythoncom.CoInitialize() pythoncom.CoUninitialize() (red X next to the two bottom lines sayin

Re: Have you embraced Python 3.x yet?

2010-03-28 Thread Ray Allen
In our company, we still use python-2.5.4, and will be updated to python-2.5.5. I hope we can go to 2.6.x or 3.x, but I'm not sure when. -- http://mail.python.org/mailman/listinfo/python-list

Re: sum for sequences?

2010-03-28 Thread Steven D'Aprano
On Sun, 28 Mar 2010 18:56:26 +0200, Alf P. Steinbach wrote: > From a more practical point of view, the sum efficiency could be > improved by doing the first addition using '+' and the rest using '+=', > without changing the behavior. But that would change the behaviour. The __iadd__ method is not

Re: pythoncom.CoInitialize() not recognised in Eclipse

2010-03-28 Thread Jason Scheirer
On Mar 28, 7:14 pm, KB wrote: > Hi there, > > I have in the past used PythonWin to write python for COM, and > switched to Eclipse. > > I am getting an error from the IDE saying it does not recognise > CoInitialize(): > > > import pythoncom > > pythoncom.CoInitialize() > pythoncom.CoUninitial

Re: pythoncom.CoInitialize() not recognised in Eclipse

2010-03-28 Thread Dieter Verfaillie
Quoting KB : I am getting an error from the IDE saying it does not recognise CoInitialize(): import pythoncom pythoncom.CoInitialize() pythoncom.CoUninitialize() It works out of the box with PyDev 1.5.5.2010030420 on Eclipse 3.5.2 on Windows XP. If nothing seems to work for you, y

How to verify a signature using SHA1WithRSA with python

2010-03-28 Thread Gao
I have a public key, and I want to write a method that verify a string which is a signature signed by this public key's private key. And is M2Crypto I can't find algorithm named "SHA1WithRSA" or so . Could anyone help me? -- http://mail.python.org/mailman/listinfo/python-list