I've got a bit of perl code that I've been asked to translate to python. For the most part it's not been too challenging, but I'm stuck on this last bit:
Code:
my $bashcode=<<'__bash__';
. /opt/qip/etc/qiprc;
. /opt/sybase/sybase.sh
perl -mdata::dumper -e 'print dumper \%ENV';
__bash__
my $var1;
eval qx(bash -c "$bashcode");
So, I'm pretty sure this is setting up an environment in which to run a new bash and later backtick some calls to a sybase db (?) like:
Code:
`qip-search -n $new_shortname -u qipman -p qipman`
Any advice on how to do all this in python?
Thanks in advance