rstemmer / sterm Goto Github PK
View Code? Open in Web Editor NEW๐ง sterm is a minimal serial terminal that focus on being easy to use and not sucking. - This client just works.
License: GNU General Public License v3.0
๐ง sterm is a minimal serial terminal that focus on being easy to use and not sucking. - This client just works.
License: GNU General Public License v3.0
When connected to a linux system using the unbuffered (-u
) mode, after each command line a second enter gets processed by the remote shell:
Example output after calling the ls
command:
~$ ls
./ ../
~$
~$
Accessing a Linux shell via sterm is a bit ugly because I first have to enter a line of characters, and then I can send them all together.
When using vim or other interactive tools this becomes a problem.
I need a command line parameter to make sterm sending each key entered directly, and not buffer a whole line until enter got pressed.
sterm should be configurable via config files.
There should be three levels of setting up sterm:
Level 3 has the highest priority, level 1 the lowest.
When entering a "โload" followed by a path, then the addressed file should be read and transmitted to the connected device.
This can be used for batch-processing of commands or for uploading data or code to a remote device.
When calling sterm -u $TTY
a \n
only leads to new line, but not going to the begin of line.
The tool should be tolerant against \n/\r situations!
Hello Ralf,
I'm just here to mention how I found your project and my progress. I'm no more than a simple electronics hobbyist, and a total amateur with python. This is the second time I have used PIP, but here's how it has gone...
I found your sterm project while searching for other examples of python 3 serial terminals on pypi.org.
This was the first mention of your project that I found:
https://pypi.org/project/sterm/
This is the history of my foolishness while trying to get this working (spoiler- I did get it working):
1.) Download the files directly from pypi.org. This resulted in:
I tried to run those files on the command line but didn't have any luck.
2.) So I tried cloning the gitHUB repository.
3.) I tried, as instructed, "pip install ." and got errors
The lower half of the image was some foolish dude trying to modify a few of the errors to see if it was a simple issue, but that didn't feel right.
4.) If nothing else the dude is a persistent idiot. He tried quite a few more foolish ideas...
$ sudo pip install sterm
$ bash pkg-make.sh
$ bash install.sh, $ sudo bash install.sh
5.) Checking pyserial dependency with pip and python 3 version, (still not connecting the idea that the default pip version might not be the py3 version).
6.) I did a, "$ locate sterm" search (no pic) and noticed a file called sterm.1 in "/usr/local/share/man/man1" so I tried to run it:
7.) Back to pip ideas... This is how it looks when default ubuntu pip is called:
8.) No pictures of the "Ahha!" moment, but after using the pip help page and taking note of the -verbose option I realized pip was only calling python 2.7 and this was giving me errors while trying to install sterm. This lead me to install:
$ sudo apt-get install python3-pip
...but I still had to play around before discovering it requires the command "pip3." After a bit more experimentation I managed to use "pip3 install sterm" for installation. This made a new version of the download, this time in the .local python 3.7 directory. Still I didn't get it to work. I may be admitting I'm the village idiot, but it never occurred to me to try executing the cli.py script. I tried the install.sh, "make sh" stuff, and tried to run the terminal.py as a python script with both standard and py3.
I thought I had tried the cli.py at some point, but I searched bash history and the first occurrence was much later than the other things I tried. Maybe the cli.py script would have run from the start but I can't say at this point.
9.) After discovering "pip3" I still couldn't get sterm to install via pip3. I verified that I have pyserial, but it still didn't work. I checked the pip3 --help options and took note of the optional -check argument. I tried this:
So "$ pip3 sterm check" was an "Ahha" moment. It showed I needed to get the testresources package. After installation, pip3 check showed everything was good.
10.) So now I had sterm installed (3 times, once correctly). The question of how to call the program still alluded me:
11.) It was only after navigating to the directory pip3 had installed, that I finally got a positive result:
12.) So, I hooked up a PIC18 microcontroller with a FlashForth operating system and made a connection:
Around 1/3rd of the way through this ordeal, long before I figured out the solution, I started writing this message. It looked like I was the first user to star and watch this project. That is kinda sad really. I downloaded 3 examples of Python-3 terminals including this one yesterday evening. I was looking through the code from each, and clearly this project had outstanding comments and appears to be intended for someone to understand and modify. So this is the first of the three projects I tried to get working. I say it's "sad" that I am the first, because you've put a whole lot of effort into this and more people should appreciate that. Thanks. I'm not trying to complain about anything here. I'm simply showing the raw experience of an end user despite any foolish embarrassment I feel by admitting my struggles. After seeing that I am probably the first stranger to come along and take notice of your project I decided to put together the pictures and send them despite the fact I solved the issue already. Now I can finally try to look deeper into the code... and port my mods to this or the other way around.
Thanks for sharing your project.
-Jake
The documentation of sterms code should be made easily accessible.
So it should be online available as HTML files.
There are two options:
Providing a python module that can be simply used by other tools is useful.
I have several tools where I have copies of some of sterms code.
This of cause implies that the interfaces of some functions must be improved.
There is no documentation of the code yet. Not even good comments.
sterm should be more easy to install by just using pip
There is an error in the man page between the --escape and --baudrate parameter
The screenshot is very old. There are some minor differences to the current version of sterm. For example that it is called sterm, not sterm4.py :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.