• Python: A Little Trick For Every Need

    From c186282@3:633/10 to All on Sunday, January 18, 2026 23:10:31
    How do you restart a Python script from WITHIN the
    script ? Try :

    os.execv(sys.executable, ['python3'] + [sys.argv[0]])

    The syntax has to be exact.

    This kills the running script and restarts it, all
    neat and clean. My use was a script that did a lot
    of video and network stuff - sometimes perhaps a
    bit unclean. Every so often something, esp the
    networking, may start to get balky. Keep track
    of fails, and, if enough ....

    Next little thing ... have rather large numbers
    of lines inside 'try/except's. But WHERE was the
    exact cause of the exception. Actually had to
    search around a bit to find something that would
    report both the error AND the line number :

    exc_type, exc_obj, exc_tb = sys.exc_info()

    The 'tb' reports the exact line number ... kind of
    like what you'd see if running the script from
    a terminal without 'try' protection. 'obj' is a
    fairly plaintext note of the exact error like
    'divison by zero'. These things can be put into
    a log file. So, you can have your 'try' protection
    AND see exactly what/where the screw-up was.

    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    But not as fast as 'C'.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From The Natural Philosopher@3:633/10 to All on Monday, January 19, 2026 11:00:43
    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    --
    ?Some people like to travel by train because it combines the slowness of
    a car with the cramped public exposure of ?an airplane.?

    Dennis Miller



    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Monday, January 19, 2026 17:33:01
    On 1/19/26 06:00, The Natural Philosopher wrote:
    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I do a little FORTRAN from time to time.

    LOVE Pascal, use it often.

    BASIC ... there are several flavors for Linux.
    Once it became 'structurable' it really wasn't
    all that bad.

    'C' remains very very good ... but CAN be kind
    of clunky, depending on your needs. If a lot
    of work with strings is required, well ....


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Steve Hayes@3:633/10 to All on Tuesday, January 20, 2026 05:04:04
    On Mon, 19 Jan 2026 11:00:43 +0000, The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I've played with Python, BASIC and Pascal.

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.




    --
    Steve Hayes from Tshwane, South Africa
    Web: http://www.khanya.org.za/stevesig.htm
    Blog: http://khanya.wordpress.com
    E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Tuesday, January 20, 2026 03:11:20
    On Tue, 20 Jan 2026 05:04:04 +0200, Steve Hayes wrote:

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    Of course it can produce stand-alone programs.

    <https://jupyter.org/> -- written in Python, didn?t you know? <https://www.python-httpx.org/> -- written in Python. <https://salsa.debian.org/debian/apt-listchanges/> -- written in Python.

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Monday, January 19, 2026 22:59:01
    On 1/19/26 22:04, Steve Hayes wrote:
    On Mon, 19 Jan 2026 11:00:43 +0000, The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I've played with Python, BASIC and Pascal.

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    'Interpreted' can be very FLEXIBLE - and easier
    to debug.

    And Python has been, and will further be, improved
    to increase speed. With current CPUs it's now 'fast
    enough' for a vast number of purposes already. It
    is also 'understandable enough' - while 'C' tends
    to be cryptic to most.

    Oh, there are compilers ... DO use the op to include
    all the libraries though, otherwise it won't be portable.

    I *used* BASIC for relatively large apps, DO use Pascal
    rather frequently. Python is great for a lot of things,
    or as a quick way to work out protos to eventually be
    translated to 'C' or Pascal.

    There aren't many computer langs I'm keen to diss. Most
    had, and can still have, their place in the Great Scheme.
    I just downloaded a COBOL IDE ... gonna mess with that
    some more. It IS very capable, just, well, 'wordy'.
    Still always install a FORTH system too, though I have
    not done any FORTH in a couple of decades. But ....

    Some solutions just have a 'perfect feel' ... and that's
    never always in the same lang.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Monday, January 19, 2026 23:21:24
    On 1/19/26 22:11, Lawrence D?Oliveiro wrote:
    On Tue, 20 Jan 2026 05:04:04 +0200, Steve Hayes wrote:

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    Of course it can produce stand-alone programs.

    <https://jupyter.org/> -- written in Python, didn?t you know? <https://www.python-httpx.org/> -- written in Python. <https://salsa.debian.org/debian/apt-listchanges/> -- written in Python.

    Yep, several approaches. Compilers and sort-of 'auto-run'
    applications too (oft seen in Linux apps now).

    The biggest prob with Python is the vast scope of
    sub-VERSIONS. If you're gonna use a compiler you
    kinda HAVE to include all the libs in YOUR current
    system or it won't work widely.

    Anyway, these days I most always proto in Python, get
    the bugs/logic ironed out. Then if needed I re-write
    in 'C' or Pascal.

    Or, once in a while, in FORTRAN - just to annoy :-)

    Anyway, 'cython' or 'Nutika' are adequate compilers.
    However Python IS just 'C' in disguise ... one line,
    one word, can run a lot of hidden 'C' code. The
    'interpreted' aspect isn't THAT important anymore.
    "Ease" IS still important.

    Most of my post-retirement stuff uses OpenCV and 'PIL'
    stuff. STILL haven't gotten OpenCV to work reliably
    in 'C' alas ... always some little issue. Works very
    easily in Python though ....


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Richard Kettlewell@3:633/10 to All on Tuesday, January 20, 2026 08:42:08
    Steve Hayes <hayesstw@telkomsa.net> writes:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I've played with Python, BASIC and Pascal.

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    That?s debatable, but either way, most people don?t care about that
    enough to impact language choice.

    --
    https://www.greenend.org.uk/rjk/

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Nuno Silva@3:633/10 to All on Tuesday, January 20, 2026 10:16:35
    On 2026-01-20, Steve Hayes wrote:

    On Mon, 19 Jan 2026 11:00:43 +0000, The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I've played with Python, BASIC and Pascal.

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    It can be compiled, just like some Java and Lisps will also offer
    compilation.

    As for stand-alone programs, what *is* a stand-alone program? Even if statically-linked, do you consider e.g. a C program stand-alone if it
    requires a hosted implementation to run on?

    --
    Nuno Silva

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Steve Hayes@3:633/10 to All on Tuesday, January 20, 2026 12:17:59
    On Tue, 20 Jan 2026 08:42:08 +0000, Richard Kettlewell <invalid@invalid.invalid> wrote:

    Steve Hayes <hayesstw@telkomsa.net> writes:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I've played with Python, BASIC and Pascal.

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    That?s debatable, but either way, most people don?t care about that
    enough to impact language choice.

    So do all versions of Linux come with a built-in Python interpreter?


    --
    Steve Hayes from Tshwane, South Africa
    Web: http://www.khanya.org.za/stevesig.htm
    Blog: http://khanya.wordpress.com
    E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From The Natural Philosopher@3:633/10 to All on Tuesday, January 20, 2026 12:05:53
    On 19/01/2026 22:33, c186282 wrote:
    'C' remains very very good ... but CAN be kind
    ˙ of clunky, depending on your needs. If a lot
    ˙ of work with strings is required, well ....

    I love strings in C.

    I spent so long programming with them....


    --
    "The great thing about Glasgow is that if there's a nuclear attack it'll
    look exactly the same afterwards."

    Billy Connolly


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From John Bokma@3:633/10 to All on Tuesday, January 20, 2026 14:25:24
    On 20/01/2026 04:11, Lawrence D?Oliveiro wrote:
    On Tue, 20 Jan 2026 05:04:04 +0200, Steve Hayes wrote:

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    Of course it can produce stand-alone programs.

    <https://jupyter.org/> -- written in Python, didn?t you know? <https://www.python-httpx.org/> -- written in Python. <https://salsa.debian.org/debian/apt-listchanges/> -- written in Python.

    And Dropbox and BitTorrent.

    --
    Static tumblelog generator: https://github.com/john-bokma/tumblelog/
    Available as Python or Perl. Example tumblelog: https://plurrrr.com/

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From candycanearter07@3:633/10 to All on Tuesday, January 20, 2026 14:30:04
    Lawrence D?Oliveiro <ldo@nz.invalid> wrote at 03:11 this Tuesday (GMT):
    On Tue, 20 Jan 2026 05:04:04 +0200, Steve Hayes wrote:

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    Of course it can produce stand-alone programs.

    <https://jupyter.org/> -- written in Python, didn?t you know? ><https://www.python-httpx.org/> -- written in Python. ><https://salsa.debian.org/debian/apt-listchanges/> -- written in Python.


    There's also yt-dlp thats written in pure python.
    --
    user <candycane> is generated from /dev/urandom

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Richard Kettlewell@3:633/10 to All on Tuesday, January 20, 2026 17:13:44
    Steve Hayes <hayesstw@telkomsa.net> writes:
    Richard Kettlewell <invalid@invalid.invalid> wrote:

    Steve Hayes <hayesstw@telkomsa.net> writes:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I've played with Python, BASIC and Pascal.

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    That?s debatable, but either way, most people don?t care about that
    enough to impact language choice.

    So do all versions of Linux come with a built-in Python interpreter?

    I?ve no idea, but it doesn?t matter.

    --
    https://www.greenend.org.uk/rjk/

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From John Ames@3:633/10 to All on Tuesday, January 20, 2026 10:18:34
    On Tue, 20 Jan 2026 12:17:59 +0200
    Steve Hayes <hayesstw@telkomsa.net> wrote:

    So do all versions of Linux come with a built-in Python interpreter?

    I mean, nothing but the kernel is truly "built-in," but it's right in
    the repository in every major distro and underlies a large number of
    fairly core-ish utilities (e.g. Synaptic,) so...more or less, yes?
    Highly unlikely that you'd find a modern Linux environment outside of
    (maybe) the embedded space where you *couldn't* run Python programs, if
    it came to it.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Charlie Gibbs@3:633/10 to All on Tuesday, January 20, 2026 19:01:28
    On 2026-01-20, Richard Kettlewell <invalid@invalid.invalid> wrote:

    Steve Hayes <hayesstw@telkomsa.net> writes:

    So do all versions of Linux come with a built-in Python interpreter?

    I?ve no idea, but it doesn?t matter.

    I blew the dust off a bit of Python code I threw together a while ago
    to get the feel of the language. It turned out that I no longer had
    a Python interpreter. So I re-installed one.

    Short answer to the question: No.
    Slightly longer answer: Who cares, it's in the repository.

    --
    /~\ Charlie Gibbs | Growth for the sake of
    \ / <cgibbs@kltpzyxm.invalid> | growth is the ideology
    X I'm really at ac.dekanfrus | of the cancer cell.
    / \ if you read it the right way. | -- Edward Abbey

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Charlie Gibbs@3:633/10 to All on Tuesday, January 20, 2026 19:01:28
    On 2026-01-20, The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 19/01/2026 22:33, c186282 wrote:

    'C' remains very very good ... but CAN be kind
    ˙ of clunky, depending on your needs. If a lot
    ˙ of work with strings is required, well ....

    I love strings in C.

    I spent so long programming with them....

    ...that I've built my own personal library full of functions
    that do all sorts of nifty things with strings.

    --
    /~\ Charlie Gibbs | Growth for the sake of
    \ / <cgibbs@kltpzyxm.invalid> | growth is the ideology
    X I'm really at ac.dekanfrus | of the cancer cell.
    / \ if you read it the right way. | -- Edward Abbey

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Tuesday, January 20, 2026 20:16:52
    On Tue, 20 Jan 2026 12:17:59 +0200, Steve Hayes wrote:

    So do all versions of Linux come with a built-in Python interpreter?

    There is this thing called a ?package manager?, which automatically
    pulls in any necessary dependencies (that aren?t already present) when
    you try to install something. So if an executable is written in
    Python, you don?t even have to know that. It gets invoked in the same
    way as any other executable.

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From The Natural Philosopher@3:633/10 to All on Tuesday, January 20, 2026 20:42:40
    On 20/01/2026 19:01, Charlie Gibbs wrote:
    On 2026-01-20, The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 19/01/2026 22:33, c186282 wrote:

    'C' remains very very good ... but CAN be kind
    ˙ of clunky, depending on your needs. If a lot
    ˙ of work with strings is required, well ....

    I love strings in C.

    I spent so long programming with them....

    ...that I've built my own personal library full of functions
    that do all sorts of nifty things with strings.

    Almost. I just know how to approach using them . The c library has all
    you need at the basic level


    --
    All political activity makes complete sense once the proposition that
    all government is basically a self-legalising protection racket, is
    fully understood.



    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Tuesday, January 20, 2026 17:58:46
    On 1/20/26 05:16, Nuno Silva wrote:
    On 2026-01-20, Steve Hayes wrote:

    On Mon, 19 Jan 2026 11:00:43 +0000, The Natural Philosopher
    <tnp@invalid.invalid> wrote:

    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I've played with Python, BASIC and Pascal.

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    It can be compiled, just like some Java and Lisps will also offer compilation.

    As for stand-alone programs, what *is* a stand-alone program? Even if statically-linked, do you consider e.g. a C program stand-alone if it requires a hosted implementation to run on?

    Exactly ... the 'C' program typically makes use of
    a lot of OS calls. I wouldn't say it's "interpreted"
    but its also not purely self-standing.

    'C' for microcontrollers - think Arduino and others -
    IS more 'pure' as there's no OS. However you then
    have to import libs that do what Linux or Winders
    OS routines would have done.

    Anyway, pure speed is often NOT the prime reason for
    picking one programming lang over another these days.
    CPUs/mem are SO quick now ... so 'ease' or 'seems
    best fit for my particular need' can become THE criteria.

    A few years back I wrote a pre-threaded server in 'C',
    good for high volume connections. Never used it for that
    but recycled it into a client/server setup that sent
    status info about other servers every 15 minutes on
    demand. The 'C' version was overkill, but cheap overkill
    since I already had the code. Maybe 5k transferred every
    15 minutes - big whup. Out-of-spec info, send e-mail.
    Send a 'gimme' cmd quickly to all the boxes, then
    take in the replies as fast as they'd come.

    Experimentally I also wrote a cheapo version using
    Python. It was much shorter, much easier to understand
    and still vastly faster than needed.

    Anyway, we often invent words, terms, then those
    become camps, then 'religions', then sects. If
    an 'interpreted' lang is getting it done fine then
    there's no reason to burn it at the stake. If a
    compiled lang is required then use that. Polytheism
    is perfectly good in Computerland.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Tuesday, January 20, 2026 18:02:55
    On 1/20/26 05:17, Steve Hayes wrote:
    On Tue, 20 Jan 2026 08:42:08 +0000, Richard Kettlewell <invalid@invalid.invalid> wrote:

    Steve Hayes <hayesstw@telkomsa.net> writes:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 19/01/2026 04:10, c186282 wrote:
    I know some here HATE Python ... but it really IS
    almost infinitely useful these days. The look and
    feel is sort of BASIC, sort of FORTRAN, sort of Pascal++.
    It Just Works.

    I've not used any of those languages in decades, either.

    I've played with Python, BASIC and Pascal.

    The thing I don't understand about Python is why it is so popular when
    it is an interpreted rather than a compiled language, so it can't
    produce stand-alone programs.

    That?s debatable, but either way, most people don?t care about that
    enough to impact language choice.

    So do all versions of Linux come with a built-in Python interpreter?


    All I've seen ... at least a decade+ now. Used to be P2,
    now P3.

    I think Winders Vista I started seeing Python scripts
    in amongst the system stuff, mostly for config uses.
    So, inbuilt Python in operating systems goes back at
    least THAT far.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Tuesday, January 20, 2026 18:05:41
    On 1/20/26 07:05, The Natural Philosopher wrote:
    On 19/01/2026 22:33, c186282 wrote:
    'C' remains very very good ... but CAN be kind
    ˙˙ of clunky, depending on your needs. If a lot
    ˙˙ of work with strings is required, well ....

    I love strings in C.

    Whips & chains too ? :-)

    I spent so long programming with them....

    Oh, you CAN ... but its a hell of a lot
    easier in Pascal or Python.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Tuesday, January 20, 2026 18:22:31
    On 1/20/26 15:42, The Natural Philosopher wrote:
    On 20/01/2026 19:01, Charlie Gibbs wrote:
    On 2026-01-20, The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 19/01/2026 22:33, c186282 wrote:

    'C' remains very very good ... but CAN be kind
    ˙ ˙ of clunky, depending on your needs. If a lot
    ˙ ˙ of work with strings is required, well ....

    I love strings in C.

    I spent so long programming with them....

    ...that I've built my own personal library full of functions
    that do all sorts of nifty things with strings.

    Almost. I just know how to approach using them . The c library has all
    you need at the basic level

    I, you too apparently, got into this stuff way back.
    The selection of programming languages expanded rapidly
    and everyone was SURE they had the Better Way. Meanwhile
    I did FORTRAN, some COBOL, Pascal and 'C' when they came
    along, even BASIC and masm stuff. I became a coding
    polytheist. Hey, even have Python scripts that evoke
    little 'C' apps and suck up the results.

    Some apps just have a certain 'feel' ... and that tells
    me "this would be better in 'C'" or "this would be better
    for Pascal" or "this would work more easily in Python"
    and so forth.

    Yes, you can right the length of Route 66 on a mule, but
    it's much better in a pop-top Cadillac.

    I too have my little lib of handy 'C' string stuff, some
    of the ideas borrowed from PICK-OS (a lot of my junk
    uses multi-valued records, mostly because I *like* them).
    However if the app is going to be very 'stringy' I'll
    go with Pascal or Python instead.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Tuesday, January 20, 2026 18:27:40
    On 1/20/26 16:33, rbowman wrote:
    On Tue, 20 Jan 2026 12:17:59 +0200, Steve Hayes wrote:

    So do all versions of Linux come with a built-in Python interpreter?

    'All' is a dangerous qualifier but any version I've installed did. They
    may be different versions. Linux Mint is 3.12.3, Ubuntu 25.10 is 3.13.7,
    and Fedora and Arch are both 3.14.2. You can have multiple versions installed and manage them with uv but those are the defaults.

    The sub-version issue IS a pain sometimes, and a
    potential killer if using a Python compiler. Always
    include all the Python libs if compiling. Fatter
    executable, but it WILL execute most anywhere.

    Anyway, I didn't even fool with Python until v3
    started to solidify. Had interest, but why learn
    an outgoing version ? Why learn 'B' when you can
    learn 'C' ?


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From The Natural Philosopher@3:633/10 to All on Wednesday, January 21, 2026 04:14:34
    On 20/01/2026 22:58, c186282 wrote:
    Exactly ... the 'C' program typically makes use of
    ˙ a lot of OS calls. I wouldn't say it's "interpreted"
    ˙ but its also not purely self-standing.

    Only for I/O. like any language must.



    --
    The theory of Communism may be summed up in one sentence: Abolish all
    private property.

    Karl Marx



    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Steve Hayes@3:633/10 to All on Wednesday, January 21, 2026 07:55:30
    On Tue, 20 Jan 2026 20:16:52 -0000 (UTC), Lawrence D˜Oliveiro
    <ldo@nz.invalid> wrote:

    On Tue, 20 Jan 2026 12:17:59 +0200, Steve Hayes wrote:

    So do all versions of Linux come with a built-in Python interpreter?

    There is this thing called a ?package manager?, which automatically
    pulls in any necessary dependencies (that aren?t already present) when
    you try to install something. So if an executable is written in
    Python, you don?t even have to know that. It gets invoked in the same
    way as any other executable.

    Thank you. That's what I wanted to know.

    So if I write some Python code in, say, Windows, I can just run it
    under Linux without having to install anything?




    --
    Steve Hayes from Tshwane, South Africa
    Web: http://www.khanya.org.za/stevesig.htm
    Blog: http://khanya.wordpress.com
    E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Wednesday, January 21, 2026 08:25:55
    On Wed, 21 Jan 2026 07:55:30 +0200, Steve Hayes wrote:

    On Tue, 20 Jan 2026 20:16:52 -0000 (UTC), Lawrence D?Oliveiro wrote:

    On Tue, 20 Jan 2026 12:17:59 +0200, Steve Hayes wrote:

    So do all versions of Linux come with a built-in Python
    interpreter?

    There is this thing called a ?package manager?, which automatically
    pulls in any necessary dependencies (that aren?t already present)
    when you try to install something. So if an executable is written
    in Python, you don?t even have to know that. It gets invoked in the
    same way as any other executable.

    Thank you. That's what I wanted to know.

    So if I write some Python code in, say, Windows, I can just run it
    under Linux without having to install anything?

    If you have the right packaging tools available under Windows, I don?t
    see why not.

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Wednesday, January 21, 2026 22:47:07
    On 1/21/26 00:55, Steve Hayes wrote:
    On Tue, 20 Jan 2026 20:16:52 -0000 (UTC), Lawrence D˜Oliveiro <ldo@nz.invalid> wrote:

    On Tue, 20 Jan 2026 12:17:59 +0200, Steve Hayes wrote:

    So do all versions of Linux come with a built-in Python interpreter?

    There is this thing called a ?package manager?, which automatically
    pulls in any necessary dependencies (that aren?t already present) when
    you try to install something. So if an executable is written in
    Python, you don?t even have to know that. It gets invoked in the same
    way as any other executable.

    Thank you. That's what I wanted to know.

    So if I write some Python code in, say, Windows, I can just run it
    under Linux without having to install anything?

    HaHaHaHaHaHaHa .... :-)

    If it's "simple" then it MIGHT work. In Linux especially
    though you often need to make sure the 'import' libs are
    actually loaded in. OS differences also mean little bits
    may work rather differently between systems.

    Mostly, something writ for Winders will work in Linux
    without TOO much problem - but don't expect NO problems.
    Lin and Win are 'different universes' to a degree.

    I sometimes promote Lazarus/FPC ... that IS designed to
    work both Win and Lin. Often the main gotcha is stupid
    stuff like font names/sizes for the GUI.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Wednesday, January 21, 2026 22:49:47
    On 1/21/26 01:50, rbowman wrote:
    On Tue, 20 Jan 2026 18:02:55 -0500, c186282 wrote:

    All I've seen ... at least a decade+ now. Used to be P2,
    now P3.

    For a while python2 and python3 would be installed. It was extended a
    couple of times but the sunset was in 2020. If you still have python2
    you're on your own.

    Both worked ... P3 syntax is just a little different
    but the main diff is in the underlying interpreter
    engine - P3 is better/faster. There's TALK of a P4,
    but the syntax isn't expected to change, only more
    optimization of the interpreter.


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From John Ames@3:633/10 to All on Thursday, January 22, 2026 08:42:38
    On Wed, 21 Jan 2026 22:47:07 -0500
    c186282 <c186282@nnada.net> wrote:

    Mostly, something writ for Winders will work in Linux without TOO
    much problem - but don't expect NO problems. Lin and Win are
    'different universes' to a degree.

    I sometimes promote Lazarus/FPC ... that IS designed to work both Win
    and Lin. Often the main gotcha is stupid stuff like font names/sizes
    for the GUI.

    Don't forget "case mismatch between resource filenames on disk vs. in
    the source" - see indie game developers tripping over that one all the
    time. (Why so many of them hard-code filenames in the source & can't be bothered to package their resources into an archive is another matter.)


    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)