Coder Social home page Coder Social logo

rstemmer / sterm Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 554 KB

๐Ÿ”ง 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

Shell 0.91% Python 87.04% Roff 12.06%
serial-communication serial-terminal terminal uart rs232 monitoring tty python python3 pyserial

sterm's Introduction

Hi ๐Ÿ‘‹


Research Gate: Ralf Stemmer Research Gate: Ralf Stemmer

sterm's People

Contributors

rstemmer avatar sg- avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

sg- gizmo1904

sterm's Issues

Double enter after input in unbuffered mode

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
./ ../
~$
~$

Single character transmission to communicate with remote shells

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.

Configuration file support

sterm should be configurable via config files.
There should be three levels of setting up sterm:

  • Level 1: Global configuration for a user ~/.config/sterm
  • Level 2: Local configuration for a project ./.sterm
  • Level 3: on demand configuration via command line arguments (Already possible)

Level 3 has the highest priority, level 1 the lowest.

Installation experiance

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:
p1
p2
p3
p4
I tried to run those files on the command line but didn't have any luck.

2.) So I tried cloning the gitHUB repository.
p5

3.) I tried, as instructed, "pip install ." and got errors
p6
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
p7
$ bash pkg-make.sh
p8
$ bash install.sh, $ sudo bash install.sh
p9

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).
p10

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:
p11

7.) Back to pip ideas... This is how it looks when default ubuntu pip is called:
p12

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:
p13
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:
p14

11.) It was only after navigating to the directory pip3 had installed, that I finally got a positive result:
p15

12.) So, I hooked up a PIC18 microcontroller with a FlashForth operating system and made a connection:
p16

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

Generate HTML documentation using sphinx

The documentation of sterms code should be made easily accessible.
So it should be online available as HTML files.

There are two options:

  1. GitHub-Docs
  2. ReadTheDocs

Providing a python module for using sterm features in other tools

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.

  • UART Class for serial I/O
  • Terminal Class for terminal I/O setup
  • Improve the command line interface to get the best out of the new cleaner code
  • Clean documentation for the classes and how to use them

Update screenshot

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 :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.