Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Inline::Python for windows 10

by swl (Chaplain)
on Oct 17, 2018 at 20:57 UTC ( #1224186=note: print w/replies, xml ) Need Help??


in reply to Re: Inline::Python for windows 10
in thread Inline::Python for windows 10

Is there a python equivalent of PAR::Packer? If so then you could embed your packed python exe with the packed perl exe. e.g., something like:

pp --addfile packed_python.exe -o yourtool.exe yourtool.pl

In your perl script you would need to find the packed python exe and call it, e.g.:

$python_exe = Path::Class::file ($ENV{PAR_TEMP}, 'inc', 'packed_python.exe');

Your perl script will need to check for $ENV{PAR_0} to control the use of a packed python exe, otherwise debugging can be a pain, but this can be factored into a sub and the general approach does work.

Addendum - unsurprisingly, there are tools to pack python exes. I have no idea if these work, but this link looks handy at first glance: https://medium.com/dreamcatcher-its-blog/making-an-stand-alone-executable-from-a-python-script-using-pyinstaller-d1df9170e263

Replies are listed 'Best First'.
Re^3: Inline::Python for windows 10
by Anonymous Monk on Oct 18, 2018 at 01:13 UTC
    at some point you need to ignore "packers" and just distribute a big'ol zip file

      That's certainly an option, and in some cases would be simpler. That said, most packers generate a zip file in any case. The fact that it is self-extracting means it can be run by double clicking, which is easier for many end-users.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1224186]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2019-04-23 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (117 votes). Check out past polls.

    Notices?