~dushyant37/+junk/Archiver

« back to all changes in this revision

Viewing changes to Archiver/temp.py

  • Committer: Dushyant Bansal
  • Date: 2011-10-06 13:28:44 UTC
  • Revision ID: dushyant37@gmail.com-20111006132844-m2c0co7mnh0vcrfw
Making it easy to install using setup.py install

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import subprocess
2
 
 
3
 
command = 'cat > a'
4
 
msg = """\
5
 
From: "Dushyant" <db1@lists.example.org>
6
 
To: test14@lists.example.com
7
 
Subject: Re: new5  archived message
8
 
Message-ID: <12460>
9
 
In-Reply-To: <12459>
10
 
Hi. this is the first message.
11
 
"""
12
 
proc = subprocess.Popen(command, stdout= subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE,
13
 
            shell=True)
14
 
tmp = 'shipt it\nor ill kil you\n'
15
 
stdout, stderr = proc.communicate(tmp)
16
 
print stdout
17
 
print stderr
 
 
b'\\ No newline at end of file'