[Tutor] Guidance needed for script

A.T.Hofkamp a.t.hofkamp at tue.nl
Mon May 11 08:35:39 CEST 2009


rony dsouza wrote:
> Hi Al,
> 
> My name is Rony, I am new to python.

Welcome to the list.

> Need your help and guidance for developing a python script with the below details:
> 
> Using GnuPG to encrypt a file(s) on linux.  Essentially two modes of operation would be ideal:
> 
> 1.       Running something like “./encrypt.py inputfilename.txt” which will output a file called “inputfilename.txt.pgp”.
> 
> 2.       The ability to pipe input into “encrypt.py<http://encrypt.py/>” and have it write out in encrypted format.  Something like “echo thisistestdata | ./encrypt.py > encrypted.pgp”.

Sounds like a nice first project.
Grab yourself a Python 2.5 or 2.6, read a tutorial on Python, then start 
trying to accomplish your project.

When you get stuck, post a question about that specific problem, and we will 
try to guide you back on track so you can finish your project.


To interface with the GnuPG program, the subprocess module seems like a good 
starting point to me.


Albert



More information about the Tutor mailing list