How to call a Perl script from Python, piping input to it?

前端 未结 6 600
南方客
南方客 2021-01-01 01:21

I\'m hacking some support for DomainKeys and DKIM into an open source email marketing program, which uses a python script to send the actual emails via SMTP. I decided to go

6条回答
  •  迷失自我
    2021-01-01 02:00

    I tried also to do that only configure how to make it work as

    pipe = subprocess.Popen(
                ['someperlfile.perl', 'param(s)'],
                stdin=subprocess.PIPE
            )
    response = pipe.communicate()[0]
    

    I wish this will assist u to make it work.

提交回复
热议问题