Re: [Tutor] Help with python-gnupg

2011-03-12 Thread Becky Mcquilling
Thanks, everyone: Your suggestions worked. I will make sure to include full information next time. Becky On Sat, Mar 12, 2011 at 12:14 AM, Steven D'Aprano wrote: > Becky Mcquilling wrote: > >> If anyone is familiar with python-gnupg, I am having some difficulty with >> the syntax. I've tried

Re: [Tutor] Help with python-gnupg

2011-03-12 Thread Steven D'Aprano
Becky Mcquilling wrote: If anyone is familiar with python-gnupg, I am having some difficulty with the syntax. I've tried the following: When dealing with third party packages, unless it is an extremely well-known package like numpy or nltk, it is usually a good idea to link to the project's

Re: [Tutor] Help with python-gnupg

2011-03-11 Thread David Hutto
On Sat, Mar 12, 2011 at 2:07 AM, David Hutto wrote: > As a matter of fact, looking at them with know *no* knowledge of the > module, it says it's a typeerror, and that it expects string or > buffer, but gets file. If this is the same error in both instances, > then it's that output needs to be a

Re: [Tutor] Help with python-gnupg

2011-03-11 Thread David Hutto
As a matter of fact, looking at them with know knowledge of the module, it says it's a typeerror, and that it expects string or buffer, but gets file. If this is the same error in both instances, then it's that output needs to be a string or buffer, so just string either the datae variable, or the

Re: [Tutor] Help with python-gnupg

2011-03-11 Thread David Hutto
On Sat, Mar 12, 2011 at 1:39 AM, Becky Mcquilling wrote: > If anyone is familiar with python-gnupg, I am having some difficulty with > the syntax.  I've tried the following: > f = open('c:/test/filename.txt', 'r') > datae = gpg.encrypt_file(f.read(), 'ladym...@gmail.com', > output=open('c:/gpg_tes

Re: [Tutor] Help with python-gnupg

2011-03-11 Thread David Hutto
Show the entire code, and error for both usages. The usages and a single error message for them both may be enough for someone not to try them out, and who can help you, if they knew more about the problem. Not everyone here will be an expert, but we do read direct code vs direct error, if we've b

[Tutor] Help with python-gnupg

2011-03-11 Thread Becky Mcquilling
If anyone is familiar with python-gnupg, I am having some difficulty with the syntax. I've tried the following: f = open('c:/test/filename.txt', 'r') datae = gpg.encrypt_file(f.read(), 'ladym...@gmail.com', output=open('c:/gpg_test/data.gpg2', 'w')) or file_to_encrypt = open('c:/gpg_test/data.gp