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

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

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:

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1224186]
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
Find Nodes?
    Voting Booth?
    I am most likely to install a new module from CPAN if:

    Results (117 votes). Check out past polls.