Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101362 > unrolled thread

extract script from executable made by pyinstaller?

Started byUlli Horlacher <framstag@rus.uni-stuttgart.de>
First post2016-01-08 07:44 +0000
Last post2016-01-08 19:12 +0000
Articles 4 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  extract script from executable made by pyinstaller? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-01-08 07:44 +0000
    Re: extract script from executable made by pyinstaller? Chris Angelico <rosuav@gmail.com> - 2016-01-08 19:36 +1100
    Re: extract script from executable made by pyinstaller? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-01-08 15:34 +0000
      Re: extract script from executable made by pyinstaller? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-01-08 19:12 +0000

#101362 — extract script from executable made by pyinstaller?

FromUlli Horlacher <framstag@rus.uni-stuttgart.de>
Date2016-01-08 07:44 +0000
Subjectextract script from executable made by pyinstaller?
Message-ID<n6npdp$50i$1@news2.informatik.uni-stuttgart.de>
Is it possible to extract (and view) the Python script from the Windows
executable which was made by pyinstller?



-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum IZUS/TIK         E-Mail: horlacher@tik.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-68565868
Allmandring 30a                Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/

[toc] | [next] | [standalone]


#101364

FromChris Angelico <rosuav@gmail.com>
Date2016-01-08 19:36 +1100
Message-ID<mailman.60.1452242174.2305.python-list@python.org>
In reply to#101362
On Fri, Jan 8, 2016 at 6:44 PM, Ulli Horlacher
<framstag@rus.uni-stuttgart.de> wrote:
> Is it possible to extract (and view) the Python script from the Windows
> executable which was made by pyinstller?

To some extent, yes. You might only get the .pyc files, rather than
the proper source code, but you should be able to get something that
will run on any system.

ChrisA

[toc] | [prev] | [next] | [standalone]


#101380

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2016-01-08 15:34 +0000
Message-ID<mailman.73.1452267316.2305.python-list@python.org>
In reply to#101362
On 8 January 2016 at 07:44, Ulli Horlacher
<framstag@rus.uni-stuttgart.de> wrote:
> Is it possible to extract (and view) the Python script from the Windows
> executable which was made by pyinstller?

I may be misremembering but I though that pyinstaller actually stores
the main script uncompressed so that it's just in the raw .exe. In
which case you just need to find the start and stop bytes of the
script. If there are other packages etc. then I'm not sure how to do
that but they are in some sense stored as a compressed archive inside
the .exe file.

--
Oscar

[toc] | [prev] | [next] | [standalone]


#101392

FromUlli Horlacher <framstag@rus.uni-stuttgart.de>
Date2016-01-08 19:12 +0000
Message-ID<n6p1mj$f9n$1@news2.informatik.uni-stuttgart.de>
In reply to#101380
Oscar Benjamin <oscar.j.benjamin@gmail.com> wrote:
> On 8 January 2016 at 07:44, Ulli Horlacher
> <framstag@rus.uni-stuttgart.de> wrote:
> > Is it possible to extract (and view) the Python script from the Windows
> > executable which was made by pyinstller?
> 
> I may be misremembering but I though that pyinstaller actually stores
> the main script uncompressed so that it's just in the raw .exe.

No. I tested it already with "strings".


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum IZUS/TIK         E-Mail: horlacher@tik.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-68565868
Allmandring 30a                Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web