Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73677 > unrolled thread
| Started by | CM <cmpython@gmail.com> |
|---|---|
| First post | 2014-06-27 16:25 -0700 |
| Last post | 2014-06-27 20:40 -0700 |
| Articles | 6 on this page of 26 — 10 participants |
Back to article view | Back to comp.lang.python
What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 16:25 -0700
Re: What can Nuitka do? Paul Sokolovsky <pmiscml@gmail.com> - 2014-06-28 02:44 +0300
Re: What can Nuitka do? Rustom Mody <rustompmody@gmail.com> - 2014-06-27 19:10 -0700
Re: What can Nuitka do? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-28 03:09 +0000
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 20:44 -0700
Re: What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-27 22:14 -0600
Re: What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-28 15:00 +1000
Re: What can Nuitka do? "Gisle Vanem" <gvanem@yahoo.no> - 2014-06-28 12:39 +0200
Re: What can Nuitka do? Roy Smith <roy@panix.com> - 2014-06-28 11:35 -0400
Re: What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-29 01:16 +1000
Re: [OT] What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-30 07:10 -0600
Re: [OT] What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-30 23:36 +1000
Re: [OT] What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-30 22:17 -0600
Re: [OT] What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-30 22:26 -0600
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 20:06 -0700
Re: What can Nuitka do? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-28 03:17 +0000
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 20:57 -0700
Re: What can Nuitka do? Rustom Mody <rustompmody@gmail.com> - 2014-06-27 21:11 -0700
Re: What can Nuitka do? Stefan Behnel <stefan_ml@behnel.de> - 2014-06-28 06:23 +0200
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 21:45 -0700
Re: What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-28 15:02 +1000
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 22:40 -0700
Re: What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-28 16:16 +1000
Fwd: What can Nuitka do? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-06-28 09:45 +0200
Re: What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-27 21:28 -0600
Re: What can Nuitka do? Rustom Mody <rustompmody@gmail.com> - 2014-06-27 20:40 -0700
Page 2 of 2 — ← Prev page 1 [2]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-06-28 15:02 +1000 |
| Message-ID | <mailman.11304.1403931780.18130.python-list@python.org> |
| In reply to | #73696 |
On Sat, Jun 28, 2014 at 2:45 PM, CM <cmpython@gmail.com> wrote: > On Saturday, June 28, 2014 12:23:03 AM UTC-4, > Stefan Behnel wrote: > >> There should be a folder Python27/Scripts that >> contains the executable programs that Python packages >> install. > > Thank you, yes, it's there. But there are two > files: nuitka (I don't see an extension and > don't know the file type) and nuitka.bat. I > added C:/Python27/Scripts/nuitka to the Windows > path but it still doesn't recognize the name. Just add Scripts to path (not Scripts/nuitka), and it should run nuitka.bat. I would guess that the one without an extension is a Unix shell script of some sort; have a look at it, see if it's a text file that begins "#!/bin/sh" or similar. Most likely the file sizes of nuitka and nuitka.bat will be similar - of the order of hundreds of bytes, even, as they're probably just invoking Python. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | CM <cmpython@gmail.com> |
|---|---|
| Date | 2014-06-27 22:40 -0700 |
| Message-ID | <e160910e-6acb-4a02-bfad-c3531c1f288e@googlegroups.com> |
| In reply to | #73698 |
> Just add Scripts to path (not Scripts/nuitka),
> and it should run nuitka.bat. I would guess that
> the one without an extension is a Unix shell script
> of some sort; have a look at it, see if it's a text
> file that begins "#!/bin/sh" or similar. Most likely
> the file sizes of nuitka and nuitka.bat will be
> similar - of the order of hundreds of bytes, even,
> as they're probably just invoking Python.
I tried that, and it still gives me the same message.
This is the Windows path, right? In it, among other
paths, I have:
C:\Python27\Scripts\
(or without the last "\" also, though it should
not matter, right?)
The nuitka file starts with
#!C:\Python27_32\python.exe
and is a Python script. It says in a docstring,
""""
This is the main program of Nuitka, it
checks the options and then translates
one or more modules to a C++ source code
using Python C/API in a build directory
compiles it to either an executable or an
extension module that can contain other
modules. """
I'm confused as to why it's not just a .py
file. The nuitka.bat, aside from some
remarks, is this:
@echo off
setlocal
"%~dp0..\python" "%~dp0nuitka" %*
endlocal
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-06-28 16:16 +1000 |
| Message-ID | <mailman.11305.1403936204.18130.python-list@python.org> |
| In reply to | #73699 |
On Sat, Jun 28, 2014 at 3:40 PM, CM <cmpython@gmail.com> wrote: > The nuitka file starts with > > #!C:\Python27_32\python.exe > > and is a Python script. It says in a docstring, > > """" > This is the main program of Nuitka, it > checks the options and then translates > one or more modules to a C++ source code > using Python C/API in a build directory > compiles it to either an executable or an > extension module that can contain other > modules. """ > > I'm confused as to why it's not just a .py > file. On a Unix system, you'd execute that with the name "nuitka". Although it seems to have had your Windows Python executable's path patched in, which presumably would be replaced with /usr/bin/python or something on Unix. > The nuitka.bat, aside from some > remarks, is this: > > @echo off > setlocal > > "%~dp0..\python" "%~dp0nuitka" %* > > endlocal And that's just calling on Python. I'm not familiar with the %~dp0 notation, but I'd say it's taking %0 (the name of the batch file) and taking just the drive and path from it. This should work, once you have your Windows path pointing to this directory. The one thing I'm seeing here is that your PATH has C:\Python27\Scripts\ but your script says C:\Python27_32\python.exe - what is the actual directory name for your Python directory? Did you rename it? It could be that something unrelated is causing problems. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Chris “Kwpolska” Warrick <kwpolska@gmail.com> |
|---|---|
| Date | 2014-06-28 09:45 +0200 |
| Message-ID | <mailman.11306.1403941549.18130.python-list@python.org> |
| In reply to | #73699 |
On Sat, Jun 28, 2014 at 7:40 AM, CM <cmpython@gmail.com> wrote:
> I'm confused as to why it's not just a .py file.
On Linux, the `nuitka` script would be run. Things in $PATH tend not
to have an extension, and you don’t need one to run Python. (you
can’t import files that don’t end in .py, though)
> The nuitka.bat, aside from some remarks, is this:
>
> @echo off
> setlocal
>
> "%~dp0..\python" "%~dp0nuitka" %*
>
> endlocal
>
This is a very fancy way of running Nuitka in the local python
interpreter, with all the arguments. For example, this:
C:\Python27\Scripts\nuitka.bat foo bar
will make the script run:
C:\Python27\python C:\Python27\Scripts\nuitka foo bar
This is to make Windows users’ life easier, to provide them
executables that work just as `nuitka` (and not `nuitka.py`).
However, a more modern method than the one used here is setuptools
entrypoints, which produces a nicer .exe file.
--
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
[toc] | [prev] | [next] | [standalone]
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Date | 2014-06-27 21:28 -0600 |
| Message-ID | <mailman.11300.1403926104.18130.python-list@python.org> |
| In reply to | #73685 |
On 06/27/2014 09:06 PM, CM wrote: > On Friday, June 27, 2014 7:44:39 PM UTC-4, Paul Sokolovsky wrote: >> Yes, you can. So, please try that, and report >> how that went. We're eager to know how that would >> go very much. But unlike you, we don't have need >> to transform wxPython GUI application in Python into >> an executable. So, you are in the best position to >> answer your question. > > I downloaded and installed Nuitka 0.5.2 for Windows, > but it seems like the entirety of the instructions > for what I want to do, as shown on the Docs web page, > is this: > > nuitka --recurse-all program.py > > I would need more help than that to try this. I've > never even used MinGW, for example. I presume you can learn the same way many of us learn. But reading up on it and trying things out. I bet there's even a MinGW list. Really it's standard command-line stuff. Learn how to use a unix command line and you'll be able to grasp it all rather easily I think. Good luck.
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2014-06-27 20:40 -0700 |
| Message-ID | <b4ef9d09-e450-4954-a9eb-0f5d03fd7c43@googlegroups.com> |
| In reply to | #73689 |
On Saturday, June 28, 2014 8:58:04 AM UTC+5:30, Michael Torrie wrote: > On 06/27/2014 09:06 PM, CM wrote: > > On Friday, June 27, 2014 7:44:39 PM UTC-4, Paul Sokolovsky wrote: > >> Yes, you can. So, please try that, and report > >> how that went. We're eager to know how that would > >> go very much. But unlike you, we don't have need > >> to transform wxPython GUI application in Python into > >> an executable. So, you are in the best position to > >> answer your question. > > I downloaded and installed Nuitka 0.5.2 for Windows, > > but it seems like the entirety of the instructions > > for what I want to do, as shown on the Docs web page, > > is this: > > nuitka --recurse-all program.py > > I would need more help than that to try this. I've > > never even used MinGW, for example. > I presume you can learn the same way many of us learn. But reading up on > it and trying things out. I bet there's even a MinGW list. Really it's > standard command-line stuff. Learn how to use a unix command line and > you'll be able to grasp it all rather easily I think. Good luck. Have you tried it? I tried it a few months back... it turned out that its not one (turnkey) solution but a whole setup in which dozens (hundreds?) of programs need to be selected (like in synaptic) almost like setting a full-scale linux box from scratch. Then after that there is the wrestling with library paths... In the end I found setting up ming in linux with apt and trying out the results in wine was less taxing. [Of course I freely admit that linux is generally less taxing (to ME) than windows]
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.python
csiph-web