Re: open a file in python

2009-07-29 Thread Piet van Oostrum
> jayshree (j) wrote: >>> The Exact Problem is how to use the key containing by .pem file for >>> 'encryption' . can i print the contents of the .pem file I have already answered this question in a previous thread. It is not very helpful if you repeat asking the same or similar questions in

Re: open a file in python

2009-07-29 Thread jayshree
On Jul 27, 2:55 pm, "Diez B. Roggisch" wrote: > jayshree wrote: > > On Jul 27, 1:09 pm, Kushal Kumaran > > wrote: > >> On Mon, Jul 27, 2009 at 12:58 PM, jayshree > >> wrote: > >> > pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() > > >> > Please tell me how to open a file placed in any

Re: open a file in python

2009-07-27 Thread Piet van Oostrum
> jayshree (j) wrote: >j> pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() By the way, a PEM file is a text file, no reason to open it in binary mode. Just replace the 'rb' with 'r' or leave it out. -- Piet van Oostrum URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Privat

Re: open a file in python

2009-07-27 Thread Diez B. Roggisch
jayshree wrote: > On Jul 27, 1:09 pm, Kushal Kumaran > wrote: >> On Mon, Jul 27, 2009 at 12:58 PM, jayshree >> wrote: >> > pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() >> >> > Please tell me how to open a file placed in any directory or in same >> > directory. >> >> > After opening

Re: open a file in python

2009-07-27 Thread jayshree
On Jul 27, 1:09 pm, Kushal Kumaran wrote: > On Mon, Jul 27, 2009 at 12:58 PM, jayshree wrote: > > pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() > > > Please tell me how to open a file placed in any directory or in same > > directory. > > > After opening this file i want to use the co

Re: open a file in python

2009-07-27 Thread Kushal Kumaran
On Mon, Jul 27, 2009 at 12:58 PM, jayshree wrote: > pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() > > Please tell me how to open a file placed in any directory or in same > directory. > > After opening this file i want to use the contain (public key ) for > encryption > Does the code

open a file in python

2009-07-27 Thread jayshree
pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() Please tell me how to open a file placed in any directory or in same directory. After opening this file i want to use the contain (public key ) for encryption thanks -- http://mail.python.org/mailman/listinfo/python-list