machine control script ( parameterless method? )

S

simon place

I'm thinking of rewriting some vb code in python, its a
machine control
program currently using a simple script to define an action
sequence.

but if i directly use python for the action sequence ( the
most flexible approach.) means each action ( method ) having
brackets, which is a bit redundant and confusing to the
user, since i'm separating the parameters all actions are
calls to parameterless methods,

so the question is, is there any way to call a method when a
name is referenced ( like __repr__ in interactive mode.)

why do i separate the parameters?
well a parameter can be changed often, can occur in several
actions and is unlikely to cause major problems if wrongly
entered, whilst the actions have more serious consequences
if wrongly arranged , so they are differently accessed. This
arrangement seems to me to be quite common, like a washing
machine, dial to select a predefined sequence and then
buttons or dials to tailor it to more refined requirements.


thanks in advance.
 
B

Bluexcell

Assuming your machine program is not hard wired..then the user is using some
form of GUI or other interface to alter the parameters for control, why not use
a Tkinter GUI to create the program I/O interface.. the checks and safeguards
for for incorrect entry are hidden and the user is more inclined to enter the
right data in the right place?
 
S

simon place

Bluexcell said:
Assuming your machine program is not hard wired..then the user is using some
form of GUI or other interface to alter the parameters for control, why not use
a Tkinter GUI to create the program I/O interface.. the checks and safeguards
for for incorrect entry are hidden and the user is more inclined to enter the
right data in the right place?

i was thinking of using a text control for the user to edit an action script,
( thsts why im thinking of python.) v.v.little code, v.flexible ( i don't have
to worry about malicious user) that's why the question is actually only about
getting rid of the brackets.
 
F

F. Petitjean

[snip]
that's why the question is actually only about
getting rid of the brackets.
If the action is a property, simply writing someobject.someobject can
trigger a get method whithout the brackets.

Regards.
 
S

simon place

F. Petitjean said:
[snip]
that's why the question is actually only about
getting rid of the brackets.

If the action is a property, simply writing someobject.someobject can
trigger a get method whithout the brackets.

Regards.

thanks this is lot better, i might be able to except a dot but if anyone has
an idea about getting rid of this too?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top