OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Interactive, GUI friendly, Python wrapper programmer for bash scripts to communicate with vxm controller

  • Thread starter Thread starter Roxystone
  • Start date Start date
R

Roxystone

Guest
So it’s a controller I have to program that moves a carriage & occasionally should also give me feedback info about the carriage position when given the appropriate command..

Just using bash it’s really simple, the controller takes commands easily with “echo” + “> dev” and then all I have to do is open a second terminal window and put it in input mode with the “< cat” command and when appropriate it will receive and display certain info. Like for instance if I type “echo Y > dev…” the “Y” command returns the position of the carriage cat terminal

And now I’m trying to make a gui user friendly program in python and I pretty much have the command part down. I’m just not sure how to simulate opening the second terminal and having it in cat mode so i can receive and store the position feedback information when appropriate

So far my code is using tkinter and subprocess. It uses the gui message boxes to have the user select the controller settings. Stores that info in appropriate variables. Then includes those variables in the bash script to program the controller as desired. And runs when the user clicks execute button. So far these initial settings & commands don’t actually return any output they just program the controller. I get stuck once I want to start using other commands that should return output. Displaying or storing the output in a text file is fine.
<p>So it’s a controller I have to program that moves a carriage & occasionally should also give me feedback info about the carriage position when given the appropriate command..</p>
<p>Just using bash it’s really simple, the controller takes commands easily with “echo” + “> dev” and then all I have to do is open a second terminal window and put it in input mode with the “< cat” command and when appropriate it will receive and display certain info. Like for instance if I type “echo Y > dev…” the “Y” command returns the position of the carriage cat terminal</p>
<p>And now I’m trying to make a gui user friendly program in python and I pretty much have the command part down. I’m just not sure how to simulate opening the second terminal and having it in cat mode so i can receive and store the position feedback information when appropriate</p>
<p>So far my code is using tkinter and subprocess. It uses the gui message boxes to have the user select the controller settings. Stores that info in appropriate variables. Then includes those variables in the bash script to program the controller as desired. And runs when the user clicks execute button. So far these initial settings & commands don’t actually return any output they just program the controller. I get stuck once I want to start using other commands that should return output. Displaying or storing the output in a text file is fine.</p>
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top