Re: Insert trusted timestamp to PDF

2011-12-07 Thread Alec Taylor
Or the python implementation of that RFC: http://pypi.python.org/pypi/rfc3161/0.1.3 On Thu, Dec 8, 2011 at 6:39 PM, wrote: > Hi, take a look at this online tool: http://easytimestamping.com > > It is able to apply RFC3161 compliant trusted timestamps, issued by > accredited Certification Author

Re: Insert trusted timestamp to PDF

2011-12-07 Thread marco . rucci
Hi, take a look at this online tool: http://easytimestamping.com It is able to apply RFC3161 compliant trusted timestamps, issued by accredited Certification Authorities. The timestamp is applied to the pdf in detached mode (i.e. as a separate .tsr file) If you need to integrate the timestamp

I love the decorator in Python!!!

2011-12-07 Thread 88888 Dihedral
I use the @ decorator to behave exactly like a c macro that does have fewer side effects. I am wondering is there other interesting methods to do the jobs in Python? A lot people complained that no macro in Python. Cheers to the rule of Python : If there's none then just go ahead and build

Re: Insert trusted timestamp to PDF

2011-12-07 Thread Hegedüs , Ervin
Hello, On Thu, Dec 08, 2011 at 04:28:01PM +1100, Alec Taylor wrote: > Just digitally sign the document using python-gnupg > > /problem-solved! using gnupg to sign a document != add a timestamp to a pdf. May be this doc helps to clear what's the different, and what I want: http://learn.adobe.co

Re: Insert trusted timestamp to PDF

2011-12-07 Thread Alec Taylor
Just digitally sign the document using python-gnupg /problem-solved! On Thu, Dec 8, 2011 at 4:09 PM, Hegedüs, wrote: > Hello Irmen, > > On Wed, Dec 07, 2011 at 08:59:11PM +0100, Irmen de Jong wrote: >> On 07-12-11 20:41, Hegedüs, Ervin wrote: >> >Hello Everyone, >> > >> >I'm looking for a tool,

Re: Insert trusted timestamp to PDF

2011-12-07 Thread Hegedüs , Ervin
Hello Irmen, On Wed, Dec 07, 2011 at 08:59:11PM +0100, Irmen de Jong wrote: > On 07-12-11 20:41, Hegedüs, Ervin wrote: > >Hello Everyone, > > > >I'm looking for a tool, which can add a trusted timestamp to an > >existing PDF file (and can sign - but currently only have to add > >TS). > > Note sur

Re: Losing com pointer

2011-12-07 Thread Mark Hammond
On 7/12/2011 7:22 PM, Matteo Boscolo wrote: Hi all, I need some help to a com problem.. I got this class: class foo(object): def setComObject(comObject): self.comO=comObject #This is a com object from a cad application def showForm(self) # use the self.comO to read some information from the ca

Re: Questions about LISP and Python.

2011-12-07 Thread Rick Johnson
On Dec 6, 9:52 pm, alex23 wrote: > (snip rambling nonsense) Alex, i hope you are being theatrical with all this. If not, i fear you may be putting too much stress on your heart. Please calm down. > The months in which you don't post are an absolute goddamn > _delight_ I am working on Python4000

Re: Questions about LISP and Python.

2011-12-07 Thread Rick Johnson
On Dec 6, 10:58 am, Ian Kelly wrote: (snip... beautiful retort) Ian you make some damn good points and i could not help but laugh hysterically at your dissection of Xah's tutorial. I don't 100% agree with everything Mr. Lee rants about, like for instance, documents needing to hyper link every po

Re: Dynamic variable creation from string

2011-12-07 Thread Chris Angelico
On Thu, Dec 8, 2011 at 11:03 AM, Steven D'Aprano wrote: >> It is really important that the scope of a,b,c is limited to the Sum >> function, they must not exisit outside it or inside any other nested >> functions. > > The second part is impossible, because that is not how Python works. > Nested fu

How to get Python make to detect /usr/local/ssl

2011-12-07 Thread B.A.S.
Any Python developers out there that help me? I would like to configure/make Python so it uses my local OpenSSL-1.0.0e install in /usr/local/ssl. I have tried uncommenting the promising section of ./Python 2.7.2/Modules/Setup.dist below without success. How to do it! Would like to upgrade SQLi

Re: Dynamic variable creation from string

2011-12-07 Thread Steven D'Aprano
On Wed, 07 Dec 2011 19:27:43 -0500, Terry Reedy wrote: > On 12/7/2011 7:03 PM, Steven D'Aprano wrote: >> On Wed, 07 Dec 2011 09:09:16 -0800, Massi wrote: >> >>> Is there a way to create three variables dynamically inside Sum in >>> order to re write the function like this? > > I should have menti

Re: Dynamic variable creation from string

2011-12-07 Thread Terry Reedy
On 12/7/2011 7:03 PM, Steven D'Aprano wrote: On Wed, 07 Dec 2011 09:09:16 -0800, Massi wrote: Is there a way to create three variables dynamically inside Sum in order to re write the function like this? I should have mentioned in my earlier response that 'variable' is a bit vague and mislead

Re: Dynamic variable creation from string

2011-12-07 Thread Steven D'Aprano
On Wed, 07 Dec 2011 09:09:16 -0800, Massi wrote: > Is there a way to create three variables dynamically inside Sum in order > to re write the function like this? > > def Sum(D) : > # Here some magic to create a,b,c from D > return a+b+c No magic is needed. a, b, c = D['a'], D['b'], D['

Re: Dynamic variable creation from string

2011-12-07 Thread Terry Reedy
On 12/7/2011 12:09 PM, Massi wrote: in my script I have a dictionary whose items are couples in the form (string, integer values), say D = {'a':1, 'b':2, 'c':3} This dictionary is passed to a function as a parameter, e.g. : def Sum(D) : return D['a']+D['b']+D['c'] Is there a way to crea

Re: Insert trusted timestamp to PDF

2011-12-07 Thread Matteo Boscolo
have a look at: http://www.boscolini.eu/Boscolini/index.php?option=com_content&view=article&id=64%3Anumbering-pdf-file-in-python&catid=38%3Aprogramming&Itemid=55&lang=en

A HOME OF TOLERANCE !!!!!!!!!!!!!

2011-12-07 Thread bv
A HOME OF TOLERANCE A Home Of Tolerance Media speculation since the horrific terrorist attacks on America has pointed the finger at Muslims and the Arab world, and that has meant ordinary citizens of the US and other Western countries becoming easy prey for anti-faith hooligans. Shame. Sadly, the

Re: Insert trusted timestamp to PDF

2011-12-07 Thread Irmen de Jong
On 07-12-11 20:41, Hegedüs, Ervin wrote: Hello Everyone, I'm looking for a tool, which can add a trusted timestamp to an existing PDF file (and can sign - but currently only have to add TS). Note sure what a 'trusted timestamp' is, but pdftk can manipulate pdf files. See http://www.pdflabs.co

Re: Multiprocessing: killing children when parent dies

2011-12-07 Thread Mihai Badoiu
I like 2) the most. I do have access to the child. The child is a process started with multiprocessing.Process(function). How do I _not_ set an SID? thanks, --mihai On Wed, Dec 7, 2011 at 2:50 PM, Dan Stromberg wrote: > On 12/7/11, Mihai Badoiu wrote: > > ok, so the code is something like

Re: Multiprocessing: killing children when parent dies

2011-12-07 Thread Dan Stromberg
On 12/7/11, Mihai Badoiu wrote: > ok, so the code is something like > #process A > p = Process(...) > p.daemon = 1 > p.start() # starts process B > ... > > If process A dies (say error, or ctrl-c), or finishes, then process B also > dies. But if process A is killed with the "kill" command

Insert trusted timestamp to PDF

2011-12-07 Thread Hegedüs , Ervin
Hello Everyone, I'm looking for a tool, which can add a trusted timestamp to an existing PDF file (and can sign - but currently only have to add TS). Could anybody help? Thanks: a. -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing: killing children when parent dies

2011-12-07 Thread Mihai Badoiu
ok, so the code is something like #process A p = Process(...) p.daemon = 1 p.start() # starts process B ... If process A dies (say error, or ctrl-c), or finishes, then process B also dies. But if process A is killed with the "kill" command, then process B soldiers on... Any idea on how t

Re: Dynamic variable creation from string

2011-12-07 Thread MRAB
On 07/12/2011 17:45, John Gordon wrote: In Massi writes: in my script I have a dictionary whose items are couples in the form (string, integer values), say D = {'a':1, 'b':2, 'c':3} This dictionary is passed to a function as a parameter, e.g. : def Sum(D) : return D['a']+D['b']

Re: Dynamic variable creation from string

2011-12-07 Thread Chris Angelico
On Thu, Dec 8, 2011 at 4:09 AM, Massi wrote: > def Sum(D) : ># Here some magic to create a,b,c from D >return a+b+c Welcome to TMTOWTDI land! We do magic here... several different ways. You _may_ be able to do this, which is roughly equivalent to the extract() function in PHP: locals().

Re: order independent hash?

2011-12-07 Thread 88888 Dihedral
On Wednesday, December 7, 2011 9:28:40 PM UTC+8, Hrvoje Niksic wrote: > Chris Angelico writes: > > > 2011/12/5 Hrvoje Niksic : > >> If a Python implementation tried to implement dict as a tree, > >> instances of classes that define only __eq__ and __hash__ would not > >> be correctly inserted in

Re: Dynamic variable creation from string

2011-12-07 Thread Waldek M.
On Wed, 7 Dec 2011 09:09:16 -0800 (PST), Massi wrote: > def Sum(D) : > return D['a']+D['b']+D['c'] > > Is there a way to create three variables dynamically inside Sum in > order to re write the function like this? > > def Sum(D) : > # Here some magic to create a,b,c from D > return a+

Re: Dynamic variable creation from string

2011-12-07 Thread John Gordon
In Massi writes: > in my script I have a dictionary whose items are couples in the form > (string, integer values), say > D = {'a':1, 'b':2, 'c':3} > This dictionary is passed to a function as a parameter, e.g. : > def Sum(D) : > return D['a']+D['b']+D['c'] > Is there a way to create th

Dynamic variable creation from string

2011-12-07 Thread Massi
Hi everyone, in my script I have a dictionary whose items are couples in the form (string, integer values), say D = {'a':1, 'b':2, 'c':3} This dictionary is passed to a function as a parameter, e.g. : def Sum(D) : return D['a']+D['b']+D['c'] Is there a way to create three variables dynamic

Re: order independent hash?

2011-12-07 Thread Hrvoje Niksic
Chris Angelico writes: > 2011/12/5 Hrvoje Niksic : >> If a Python implementation tried to implement dict as a tree, >> instances of classes that define only __eq__ and __hash__ would not >> be correctly inserted in such a dict. > > Couldn't you just make a tree of hash values? Okay, that's probab

Re: Questions about LISP and Python.

2011-12-07 Thread Neil Cerutti
On 2011-12-07, Terry Reedy wrote: > It does not pretend that surrounding statements with > parentheses turns them into expressions. > ;-) I like being in a sexpression. Aww YEH! -- (Neil Cerutti) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-07 Thread Karim
Le 07/12/2011 12:30, Skip Montanaro a écrit : Does anyone have a recipe for the subject build? I know Solaris is a minority platform these days, but surely someone has tackled this problem, haven't they? Thx, Skip ./configure make make install Karim -- http://mail.python.org/mailman/list

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-07 Thread Skip Montanaro
> Does anyone have a recipe for the subject build? I know Solaris is a minority platform these days, but surely someone has tackled this problem, haven't they? Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions about LISP and Python.

2011-12-07 Thread Terry Reedy
On 12/7/2011 5:14 AM, Andrea Crotti wrote: On 12/06/2011 04:36 AM, Xah Lee wrote: i don't like python, and i prefer emacs lisp. The primary reason is that python is not functional, especially with python 3. The python community is full of fanatics with their drivels. In that respect, it's not un

Re: Questions about LISP and Python.

2011-12-07 Thread Andrea Crotti
On 12/06/2011 04:36 AM, Xah Lee wrote: i don't like python, and i prefer emacs lisp. The primary reason is that python is not functional, especially with python 3. The python community is full of fanatics with their drivels. In that respect, it's not unlike Common Lisp community and Scheme lisp c

Re: Hints for writing bit-twiddling code in Python

2011-12-07 Thread Serhiy Storchaka
07.12.11 06:03, Steven D'Aprano написав(ла): long newSeed = (seed& 0xL) * 0x41A7L; while (newSeed>= 0x8000L) { newSeed = (newSeed& 0x7FFFL) + (newSeed>>> 31L); } seed = (newSeed == 0x7FFFL) ? 0 : (int)newSeed; seed = (seed & 0x) * 0x41A7 % 0x7FFF --

Losing com pointer

2011-12-07 Thread Matteo Boscolo
Hi all, I need some help to a com problem.. I got this class: class foo(object): def setComObject(comObject): self.comO=comObject #This is a com object from a cad application def showForm(self) # use the self.comO to read some information from the cad application

Re: Hints for writing bit-twiddling code in Python

2011-12-07 Thread Peter Otten
Steven D'Aprano wrote: > I have some bit-twiddling code written in Java which I am trying to port > to Python. I'm not getting the same results though, and I think the > problem is due to differences between Java's signed byte/int/long types, > and Python's unified long integer type. E.g. Java's >

Re: why is bytearray treated so inefficiently by pickle?

2011-12-07 Thread Irmen de Jong
On 6-12-2011 23:24, Terry Reedy wrote: > On Nov 30, Irmen de Jong opened a tracker issue with a patch improve > bytearray pickling. > http://bugs.python.org/issue13503 > > Yesterday, Dec 5, Antoine Pitrou applied a revised fix. > http://hg.python.org/cpython/rev/e2959a6a1440/ > The commit message