open a file in python
Kushal Kumaran
kushal.kumaran+python at gmail.com
Mon Jul 27 04:09:26 EDT 2009
On Mon, Jul 27, 2009 at 12:58 PM, jayshree<jayshree06comp at gmail.com> 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 you've put into your message not read that file? If you
get an exception, copy-paste in the traceback message you get into
your mail.
--
kushal
More information about the Python-list
mailing list