Post Reply 
Python, separate file handling
04-23-2021, 07:43 PM
Post: #2
RE: Python, separate file handling
(04-23-2021 11:20 AM)Dirk.nl Wrote:  Hello,

When I first started discovering Python I thought that every file <more, files, new> could contain a separate program which could be started separately after selecting it, however this is to divide the total program into, clear, blocks.
I have also discovered that the files are handled in the order indicated by <more, files> from the top to down.

Are my “discoveries” correct?
How can I change the order of the individual files so that the entire program is handled in (my) correct order?
Does this mean that a copy of the Python app must be made for every program?

Actually, I prefer HPPL over Python, also because of the fantastic <input> command.
For me, the Python app is nice to learn more about Python.
Cyrille, thanks for the new update.

Being new to this Python stuff, I'm puzzled by this myself. What works however is what Tim described in Beta Notes, a snipped from there.

For example:
Code:
#PYTHON name
import sys
print(str(1+2)+sys.argv[0])
#end
Export ppl(a)
Begin
  PYTHON(name, a);
End;

ppl(5) will print "35"

This way your Python program exists in the PPL environment and can be called by its assigned name (ppl in this case).

Günter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Python, separate file handling - Dirk.nl - 04-23-2021, 11:20 AM
RE: Python, separate file handling - Guenter Schink - 04-23-2021 07:43 PM



User(s) browsing this thread: 1 Guest(s)