User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13961
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Python Usage Guide

Tue Apr 17, 2018 11:33 am

gkreidl wrote:
Mon May 15, 2017 6:33 am
AshPowers wrote:I would like to compile my program into a binary executable as it will be part of a product and do not want the source code being so easily obtainable.

What is the best method of doing this?

Thanks!
Nuitka.
http://nuitka.net/
Not for the raspberry PI.

Besides the canonical python compiler is pypy, not this commercial offering.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Python Usage Guide

Tue Apr 17, 2018 3:00 pm

mahjongg wrote:
Tue Apr 17, 2018 11:33 am
gkreidl wrote:
Mon May 15, 2017 6:33 am
AshPowers wrote:I would like to compile my program into a binary executable as it will be part of a product and do not want the source code being so easily obtainable.

What is the best method of doing this?

Thanks!
Nuitka.
http://nuitka.net/
Not for the raspberry PI.

Besides the canonical python compiler is pypy, not this commercial offering.
About every word you wrote is wrong!

1. The Debian archive is processor independent and works very well on the RPi. omxplayerGUI, rtranscode (and it's web module) have all been compiled with nuitka for quite some time.

2. There is nothing "canonical" about pypy and it does not create binaries. It's a JIT compiler. It's fast, but often unusable because it may use too much memory (I've seen it using 6 times more memory compared to original Python or Nuitka).

3) Nuitka is not commercial but Open Source.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13961
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: STICKY: Python Usage Guide

Wed Apr 18, 2018 11:35 am

About every word you wrote is wrong!
Luckily there weren't many of them. :P

PyPy is "canonical" in IMHO as it was the first and for a long time only "python compiler" I had heard off. But I realize now that is was not intended for this purpose.

but yes, if noitka works, and is fee (as in speech), then why not.

jacobgoona
Posts: 17
Joined: Thu Oct 29, 2020 11:42 pm

Re: STICKY: Python Usage Guide

Fri Oct 30, 2020 12:03 am

So it’s my understanding that Thonny is a good tool for learning Python. Did I get it right? If so, is it also ok to use Thonny for real-life projects or it’s specifically just for learning. I’m really sorry if my questions sound super stupid, but I’m just a total newbie at this point, though I’m totally determined to wrap my head around it :)

hippy
Posts: 9900
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: STICKY: Python Usage Guide

Fri Oct 30, 2020 7:39 pm

You would have been better off starting a new thread rather than necroing an old one.

Thonny is a good tool for both learning Python and developing code. Once code has been developed and deployed to a Pi as a 'real project' that code will normally be started by 'cron' or via /etc/rc.local and Thonny isn't required to do that.

jacobgoona
Posts: 17
Joined: Thu Oct 29, 2020 11:42 pm

Re: STICKY: Python Usage Guide

Sat Oct 31, 2020 2:14 pm

hippy wrote:
Fri Oct 30, 2020 7:39 pm
You would have been better off starting a new thread rather than necroing an old one.

Thonny is a good tool for both learning Python and developing code. Once code has been developed and deployed to a Pi as a 'real project' that code will normally be started by 'cron' or via /etc/rc.local and Thonny isn't required to do that.
Good point about necroing. Thanks :)

Got it about Thonny and real-life projects. Much appreciated.

Loonhaunt
Posts: 63
Joined: Sat Nov 16, 2013 5:13 am

Re: STICKY: Python Usage Guide

Sat Oct 31, 2020 10:21 pm

Where is the best place to get syntax help with Python 3. I have not written code for about 6 years. Memory has failed me!

User avatar
B.Goode
Posts: 12051
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: STICKY: Python Usage Guide

Sat Oct 31, 2020 11:20 pm

Loonhaunt wrote:
Sat Oct 31, 2020 10:21 pm
Where is the best place to get syntax help with Python 3. I have not written code for about 6 years. Memory has failed me!


https://www.python.org/

User avatar
AlCap3003
Posts: 8
Joined: Sat Nov 07, 2020 12:59 pm

Re: STICKY: Python Usage Guide

Sat Nov 07, 2020 1:55 pm

hippy wrote:
Fri Oct 30, 2020 7:39 pm
You would have been better off starting a new thread rather than necroing an old one.

Thonny is a good tool for both learning Python and developing code. Once code has been developed and deployed to a Pi as a 'real project' that code will normally be started by 'cron' or via /etc/rc.local and Thonny isn't required to do that.
Thanks for answering it anyway. Just started with Python and I'm a little lost rn. I'm gonna give Thonny a try. :)

ThomasWeek
Posts: 4
Joined: Tue Dec 01, 2020 11:48 am
Location: Toronto

Re: STICKY: Python Usage Guide

Mon Dec 07, 2020 8:40 am

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

Return to “Python”