1

I'm trying to use python to automate some admin scripts. For example:

wget --output-document=- https://www.monetdb.org/downloads/MonetDB-GPG-KEY | sudo apt-key add -

I tried:

subprocess.call

But it has an error with the '|' arg

user3071284
  • 6,955
  • 6
  • 43
  • 57
user3003873
  • 543
  • 1
  • 4
  • 21
  • 1
    related: [How do I use subprocess.Popen to connect multiple processes by pipes?](http://stackoverflow.com/q/295459/4279) – jfs Nov 23 '15 at 15:05
  • @J.F.Sebastian's link is great and it would be reasonable to dup this question. But as a matter of form, you really need to show us _how_ you used `subprocess.call`. The stackoverflow surveilance system is down so we are not able to look over your shoulder right now. – tdelaney Nov 23 '15 at 15:13
  • You may have problems with the `sudo` password. If you need to pass in a password [Using sudo with Python script](http://stackoverflow.com/questions/13045593/using-sudo-with-python-script) may help. – tdelaney Nov 23 '15 at 15:20
  • Solved issue by related topic. Thanks! – user3003873 Nov 23 '15 at 15:52

0 Answers0