The commands & lambdas (bindings) generate handy placeholder functions...so you can hammer away & click buttons and see "something happen" when the first code is run. However, the lines are all blurred together, making it somewhat confusing as to which goes with what, or just losing your place.
def sbTchan1_cmd(*args):
print('hot_auger_support.sbTchan1_cmd')
for arg in args:
print ('another arg:', arg)
sys.stdout.flush()
adding a few spaces by default makes it MUCH easier to read as you click/poke all of the graphics...indent the args a few spaces print (' another arg:', arg)
also adding a \n beginning of the first print also helps, though not as much as the indenting.
print('\nhot_auger_support.sbTchan1_cmd')
First, you might want to use the Code post helper above (The formatting option in the bar above that is just after the "H" for heading)...
defmain(*args):
'''Main entry point for the application.'''globalrootroot=tk.Tk()root.protocol('WM_DELETE_WINDOW' , root.destroy)
# Createsatoplevelwidget.
global_top1, _w1_top1=root_w1=test1.Toplevel1(_top1)root.mainloop()
Second, I appreciate your determination on trying to get your point across, but I'm unsure exactly what you are trying to say.
Is there a question there somewhere?
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-05-18
Yeah, it was aggravating trying to post...also could find no way to go back and edit a post.
Ok look at the photo above...see it is nice and NEAT...I edited all of the page placeholder codes to include a \n for the first print and spaces in the arg print lines...GIVES NICE AND NEAT...this should be what page generates..(add \n to first print and spaces to the arg print) ...instead Page generates this "mess" result, hard to see/understand the buttons working:
hot_auger_support.tempress
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="122" y="1<img alt=" "="" src="https://">05">
hot_auger_support.tempress
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="129" y="61">
pwrbar arg: 2
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="117" y="94">
scroll touch: 8
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="66" y="37">
pwrbar arg: 2
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="88" y="69">
scroll touch: 8
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="256" y="98">
scroll touch: 1</buttonpress></buttonpress></buttonpress></buttonpress></buttonpress></buttonpress>
I understand now. I'm not sure how much can be done, but I did talk to Don about it this morning.
I'm planning on seeing if I can come up with a formatting statement to help that along. If I do, I'll post it here for you as well as sending it to Don to see if he can incorporate it.
Just for my knowledge, what version of Python are you using? All of the "good" formatting commands really require Python 3.7+.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. Looking at the capture.jpg image, I think what I have done might match what you are looking for. Just not in the current release.
I threw together a demo and here is the output (in my IDE)
test2_support.py
test2_support.on_rdobtn
another arg: 1
test2_support.on_rdobtn
another arg: 2
test2_support.on_rdobtn
another arg: 3
test2_support.on_rdobtn
another arg: 4
test2_support.on_chkbtn
another arg: 1
test2_support.on_chkbtn
another arg: 2
test2_support.on_chkbtn
another arg: 3
test2_support.on_chkbtn
another arg: 4
test2_support.on_btnExit
Hopefully that's basically what you are looking for. Now, here is the code I used in the two callback functions...
As you can see, it's just a simple workaround change to the code that PAGE provides of modifying the print statement from a "normal" print to one that starts with an embedded Tab character (the "\t" portion right after the opening single quote. Is that what you were looking for?
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-05-19
As you can see, it's just a simple workaround change to the code that PAGE provides of modifying the print statement from a "normal" print to one that starts with an embedded Tab character (the "\t" portion right after the opening single quote. Is that what you were looking for?
Exactly!! I know how to do it, I want PAGE to do it...why should I edit 50 or 60 sample callbacks, when page can generate the improved spacing itself. I suggest also putting the \n leading the first print statement (right after def) , since not all callbacks print any args and those single line ones will clump together. These improvements increase the readability a lot (at least until you revamp the callbacks for actual use).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The commands & lambdas (bindings) generate handy placeholder functions...so you can hammer away & click buttons and see "something happen" when the first code is run. However, the lines are all blurred together, making it somewhat confusing as to which goes with what, or just losing your place.
def sbTchan1_cmd(*args):
print('hot_auger_support.sbTchan1_cmd')
for arg in args:
print ('another arg:', arg)
sys.stdout.flush()
adding a few spaces by default makes it MUCH easier to read as you click/poke all of the graphics...indent the args a few spaces
print (' another arg:', arg)
also adding a \n beginning of the first print also helps, though not as much as the indenting.
print('\nhot_auger_support.sbTchan1_cmd')
from this
hot_auger_support.tempress
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="122" y="105">
hot_auger_support.tempress
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="129" y="61">
pwrbar arg: 2
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="117" y="94">
scroll touch: 8
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="66" y="37">
pwrbar arg: 2
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="88" y="69">
scroll touch: 8
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="256" y="98">
scroll touch: 1</buttonpress></buttonpress></buttonpress></buttonpress></buttonpress></buttonpress>
TO THIS
hot_auger_support.tempress
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="75" y="40">
pwrbar arg: 2</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="73" y="90">
scroll touch: 8</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="296" y="114">
scroll touch: 1</buttonpress>
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="96" y="49">
pwrbar arg: 2</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="72" y="87">
scroll touch: 8</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="253" y="94">
scroll touch: 1</buttonpress>
Whoops!! actually with the indents it looks like this
hot_auger_support.tempress
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="75" y="40">
pwrbar arg: 2</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="73" y="90">
scroll touch: 8</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="296" y="114">
scroll touch: 1</buttonpress>
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="96" y="49">
pwrbar arg: 2</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="72" y="87">
scroll touch: 8</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="253" y="94">
scroll touch: 1</buttonpress>
Interesting....the posting loses the spaces !!!! Try again
hot_auger_support.tempress
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="75" y="40">
pwrbar arg: 2</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="73" y="90">
scroll touch: 8</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="296" y="114">
scroll touch: 1</buttonpress>
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="96" y="49">
pwrbar arg: 2</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="72" y="87">
scroll touch: 8</buttonpress>
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="253" y="94">
scroll touch: 1</buttonpress>
ARRRRRRG...for some reason the posting forces left justify...so I'll use dots to get the idea across
hot_auger_support.tempress
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="75" y="40">
. pwrbar arg: 2</buttonpress>
hot_auger_support.scrolltemp
. scroll touch: <buttonpress event="" num="1" x="73" y="90">
. scroll touch: 8</buttonpress>
hot_auger_support.scrolltemp
. scroll touch: <buttonpress event="" num="1" x="296" y="114">
. scroll touch: 1</buttonpress>
hot_auger_support.pwrbar
. pwrbar arg: <buttonpress event="" num="1" x="96" y="49">
. pwrbar arg: 2</buttonpress>
hot_auger_support.scrolltemp
. scroll touch: <buttonpress event="" num="1" x="72" y="87">
. scroll touch: 8</buttonpress>
hot_auger_support.scrolltemp
. scroll touch: <buttonpress event="" num="1" x="253" y="94">
. scroll touch: 1</buttonpress>
Interesting I tried DOT SPACE SPACE SPACE SPACE TEXT & post removed all the spaces!!! I hope the idea is clear! I just gave up and attached a photo!!!
First, you might want to use the Code post helper above (The formatting option in the bar above that is just after the "H" for heading)...
Second, I appreciate your determination on trying to get your point across, but I'm unsure exactly what you are trying to say.
Is there a question there somewhere?
Greg
Yeah, it was aggravating trying to post...also could find no way to go back and edit a post.
Ok look at the photo above...see it is nice and NEAT...I edited all of the page placeholder codes to include a \n for the first print and spaces in the arg print lines...GIVES NICE AND NEAT...this should be what page generates..(add \n to first print and spaces to the arg print) ...instead Page generates this "mess" result, hard to see/understand the buttons working:
hot_auger_support.tempress
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="122" y="1<img alt=" "="" src="https://">05">
hot_auger_support.tempress
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="129" y="61">
pwrbar arg: 2
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="117" y="94">
scroll touch: 8
hot_auger_support.pwrbar
pwrbar arg: <buttonpress event="" num="1" x="66" y="37">
pwrbar arg: 2
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="88" y="69">
scroll touch: 8
hot_auger_support.scrolltemp
scroll touch: <buttonpress event="" num="1" x="256" y="98">
scroll touch: 1</buttonpress></buttonpress></buttonpress></buttonpress></buttonpress></buttonpress>
I understand now. I'm not sure how much can be done, but I did talk to Don about it this morning.
I'm planning on seeing if I can come up with a formatting statement to help that along. If I do, I'll post it here for you as well as sending it to Don to see if he can incorporate it.
Just for my knowledge, what version of Python are you using? All of the "good" formatting commands really require Python 3.7+.
Greg
Ok. Looking at the capture.jpg image, I think what I have done might match what you are looking for. Just not in the current release.
I threw together a demo and here is the output (in my IDE)
Hopefully that's basically what you are looking for. Now, here is the code I used in the two callback functions...
As you can see, it's just a simple workaround change to the code that PAGE provides of modifying the print statement from a "normal" print to one that starts with an embedded Tab character (the "\t" portion right after the opening single quote. Is that what you were looking for?
Greg
As you can see, it's just a simple workaround change to the code that PAGE provides of modifying the print statement from a "normal" print to one that starts with an embedded Tab character (the "\t" portion right after the opening single quote. Is that what you were looking for?
Exactly!! I know how to do it, I want PAGE to do it...why should I edit 50 or 60 sample callbacks, when page can generate the improved spacing itself. I suggest also putting the \n leading the first print statement (right after def) , since not all callbacks print any args and those single line ones will clump together. These improvements increase the readability a lot (at least until you revamp the callbacks for actual use).
Your "request" will be passed on to Don.
Greg