- Posts: 19899
- Thank you received: 4655
Method and function
- andypugh
- Offline
- Moderator
-
Less
More
4 years 8 months ago #234154
by andypugh
Replied by andypugh on topic Method and function
The examples I looked at all had
whereas you have
In the former case you can just use execute(....) but in the latter case it needs to be interpreter.execute
Basically "import" imports the namespace and the commands that it contains, whereas "from X import *" imports all the commands into the current namespace.
Code:
from interpreter import *
Code:
import interpreter
In the former case you can just use execute(....) but in the latter case it needs to be interpreter.execute
Basically "import" imports the namespace and the commands that it contains, whereas "from X import *" imports all the commands into the current namespace.
Please Log in or Create an account to join the conversation.
- smplc
- Offline
- Elite Member
-
Less
More
- Posts: 224
- Thank you received: 1
4 years 8 months ago #234168
by smplc
Replied by smplc on topic Method and function
from filename import * is retrievable from call.ngc as pictured foregoing. Such a way importloop.py is a library.
g71_8.py the from interpreter import * causes an error upon opening Axis and Lathe. Presently import interpreter isn't causing an error. Then supposedly the interpreter class is only retrievable. The interpreter class is the entire file.
g71_8.py the from interpreter import * causes an error upon opening Axis and Lathe. Presently import interpreter isn't causing an error. Then supposedly the interpreter class is only retrievable. The interpreter class is the entire file.
Please Log in or Create an account to join the conversation.
- smplc
- Offline
- Elite Member
-
Less
More
- Posts: 224
- Thank you received: 1
4 years 8 months ago #234170
by smplc
Replied by smplc on topic Method and function
LinuxCNC_Documentation.pdf and page 329 includes argspec parameter. It appears some uppercase parameters with argspec error too.
Please Log in or Create an account to join the conversation.
- smplc
- Offline
- Elite Member
-
Less
More
- Posts: 224
- Thank you received: 1
4 years 8 months ago #234176
by smplc
Replied by smplc on topic Method and function
g71_8.py the from interpreter import * no error now upon opening Axis and Lathe. interpretor was misspelled that caused error.
Please Log in or Create an account to join the conversation.
- smplc
- Offline
- Elite Member
-
Less
More
- Posts: 224
- Thank you received: 1
4 years 8 months ago #234348
by smplc
Replied by smplc on topic Method and function
Interpreter and NML references
canon.hh
emc_interface.py
emc_nml.hh
canon.hh
emc_interface.py
emc_nml.hh
Please Log in or Create an account to join the conversation.
Time to create page: 0.451 seconds