{ "info": { "author": "Carlo Lobrano", "author_email": "c.lobrano@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta" ], "description": "Pynicom: A Minicom like shell in Python\n=======================================\n\nPynicom reproduces the behavior of Minicom, adding some utilities:\n\n* command history\n* autocompletion\n* inline help\n* pattern highlight (optional)\n\nAuto-completion and inline help are available using a _dictionary_\nfile. Each entry in the file has the format\n\n command-name # \n\n e.g.\n\n AT+FCLASS # Select Active Service Class\n AT+GCAP # Capabilities list\n AT+GMI # Manufacturer identification\n\nOf course all the commands written in the command-line are sent to the\nserial device even if they are not in the dictionary file.\n\n_dictionary_ file is saved as hidden file in your HOME folder and named _.pynicom-dictionary_and it is **empty** when Pynicom is first installed. Feel free to copy the example on Pycom's project page on [GitHub](https://github.com/clobrano/pynicom.git) in your own dictionary file.\n\n\nInstallation\n------------\n\n1. Install PyPI module manager\n\n sudo apt-get install python-pip\n\n2. Install dependencies: docopt, pyserial, readline (optional [raffaello](https://pypi.python.org/pypi/raffaello/) for pattern highlight)\n\n sudo pip \n\n\nUsage\n-----\n\nOn GNU/Linux, Pynicom need administrative privilegies to access the serial device. On Debian/Ubuntu and derivates this can be done running the following command:\n\n $ sudo pynicom\n\n\nFirst steps\n-----------\n\nAuto-completion is obtained with with a double tab\n\n A Minicom like shell in Python3\n author: Carlo Lobrano\n version: 0.1.0\n\n Usage:\n pynicom [-d|--debug] [--port=port --baud=rate --bytesize=bytesize --parity=parity --stopbits=stopbits --sw-flow-ctrl=xonxoff --hw-rts-cts=rtscts --hw-dsr-dtr=dsrdtr --timeout=timeout]\n\n\n (no-conn)\n AT at exit quit serial_info serial_read set_bytesize set_parity set_stopbits shell\n ATE ate help serial_close serial_open set_baudrate set_debug set_port set_timeout show_dictionary\n (no-conn)\n\n\na known limitation is that the extended commands (+,&,#,...) are auto-completed after typing at least the symbol\n\n (/dev/ttyACM0 @ 115200) at\n at ate\n (/dev/ttyACM0 @ 115200) at+\n CGDCONT CGI CGREG CREG FCLASS GCAP GMI GMM GMR GSN\n (/dev/ttyACM0 @ 115200) at+\n\n\nAs you could see, the prompt shows the current serial device used and the baud rate or \"no-conn\".\n\nTo use the **inline help**, issue the command: 'help command-name' or '?command-name'\n\n (no-conn) help serial_open\n\n Open the given serial device.\n\n Example:\n serial_open /dev/ttyUSB0 115200 8 N 1 False False False 1\n\n where the args are respectively: port, baudrate, bytesize, parity, stopbits, SW flow control, HW flow control RTS/CTS, HW flow control DSR/DTR, timeout. You do not need to give all the parameters, if you are fine with the default values, just give the serial device path.\n\n\nThe connection to the serial device can be established also with Pynicom arguments:\n\n $ sudo pynicom --port=/dev/ttyACM0 --baud=115200\n\n A Minicom like shell in Python\n author: Carlo Lobrano\n version: 0.1.0\n\n Usage:\n pynicom [-d|--debug] [--port=port --baud=rate --bytesize=bytesize --parity=parity --stopbits=stopbits --sw-flow-ctrl=xonxoff --hw-rts-cts=rtscts --hw-dsr-dtr=dsrdtr --timeout=timeout]\n\n\n (/dev/ttyACM0 @ 115200)\n\nTo see all input arguments type\n\n $ pynicom -h\n\nConnection parameters can be changed using the `set_` commands without closing and opening again the connection:\n\n (/dev/ttyACM0 @ 115200) set_\n set_baudrate set_bytesize set_debug set_parity set_port set_stopbits set_timeout\n\n\n`serial_info` shows the current connection's info\n\n (/dev/ttyACM0 @ 115200) serial_info\n Serial(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=1, xonxoff=False, rtscts=False, dsrdtr=False)\n\n\nthe special character '!' execute system's commands:\n\n (/dev/ttyACM0 @ 115200) !ls -la\n total 25\n drwxrwx--- 1 root vboxsf 0 lug 2 10:25 .\n drwxrwx--- 1 root vboxsf 4096 lug 2 10:25 ..\n -rwxrwx--- 1 root vboxsf 1439 lug 2 08:57 dictionary.txt\n -rwxrwx--- 1 root vboxsf 1 lug 2 08:57 errors.txt\n -rwxrwx--- 1 root vboxsf 0 lug 2 08:57 __init__.py\n -rwxrwx--- 1 root vboxsf 15417 lug 2 10:24 pynicom.py\n -rwxrwx--- 1 root vboxsf 390 lug 2 08:57 test.py\n -rwxrwx--- 1 root vboxsf 2115 lug 2 08:57 tests.py\n\n\nAll commands have 1 seconds timeout as default, but that can be changed with `set_timeout` command. If a command does not return, stop it with CTRL-B or CTRL-C\n\n\nHighlight patterns\n------------------\n\nThe [Raffaello](https://pypi.python.org/pypi/raffaello/) module allows Pynicom to highlight the text ouput. You can choose a pattern to be highlighted in a given color (the available colors depending on the Shell)\n\n (/dev/ttyUSB0 @ 9600) highlight GNRMC=>green\n\nthis can be useful when reading NMEA sentences for example (with `serial_read`)\n\nuse `show_highlight` to see the current highlighted patterns and `remove_highlight` to remove a pattern.\n\n (/dev/ttyUSB0 @ 9600) show_highlight\n {'GNRMC': green}\n (/dev/ttyUSB0 @ 9600) remove_highlight GNRMC\n (/dev/ttyUSB0 @ 9600) show_highlight\n {}\n\n\nNMEA sentences\n--------------\n\nNmea sentences can be sent to the serial device using the `nmea` command. Pycom will automatically add the initial '$' symbol, the checksum and the final appendix (), so that a possible usage of this API is the following:\n\n(/dev/ttyUSB0 @ 9600) nmea PMTK430\n nmea > \"$PMTK430*35\"\n $GLGSV,2,1,06,84,81,030,43,74,78,042,46,85,44,215,48,73,35,128,36*62\n $GLGSV,2,2,06,75,31,326,44,83,25,033,44*68\n $GNRMC,115725.000,A,3913.6604,N,00904.1282,E,0.00,51.50,060715,,,D*4C\n $GNVTG,51.50,T,,M,0.00,N,0.01,K,D*16\n $PMTK530,0*28\n\n\nafter sending the nmea message, pynicom will automaticalli issue `serial_read` command. You will stop reading using CTRL-C.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/clobrano/pynicom.git", "keywords": "serial,minicom", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pynicom", "package_url": "https://pypi.org/project/pynicom/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pynicom/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/clobrano/pynicom.git" }, "release_url": "https://pypi.org/project/pynicom/0.3.5/", "requires_dist": null, "requires_python": null, "summary": "A Minicom like shell in Python", "version": "0.3.5" }, "last_serial": 2440144, "releases": { "0.3.3": [], "0.3.4": [ { "comment_text": "", "digests": { "md5": "9398bb69d44c71234ae1e569ccd46410", "sha256": "ea0d9f04489bd1b71bfe1fbda87b5e927f068809884bad150c8797ffa95a6943" }, "downloads": -1, "filename": "pynicom-0.3.4.tar.gz", "has_sig": false, "md5_digest": "9398bb69d44c71234ae1e569ccd46410", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9154, "upload_time": "2016-11-02T15:16:27", "url": "https://files.pythonhosted.org/packages/eb/b8/2c738e6c6356cfa1a357baaba904366c8cda66786d197b8c1ebd23d05a15/pynicom-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "2715513c5f38408c0750094dc989c48b", "sha256": "9e6fbe74d42462d17ec7ce4ff86eecdaf16149f16d4c7bf603bd88ff1b6a48cc" }, "downloads": -1, "filename": "pynicom-0.3.5.tar.gz", "has_sig": false, "md5_digest": "2715513c5f38408c0750094dc989c48b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9221, "upload_time": "2016-11-03T14:18:09", "url": "https://files.pythonhosted.org/packages/18/fe/e6baf5035211b6968e2321160fa5db0f0046d4c71444a12551d6c16bce72/pynicom-0.3.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2715513c5f38408c0750094dc989c48b", "sha256": "9e6fbe74d42462d17ec7ce4ff86eecdaf16149f16d4c7bf603bd88ff1b6a48cc" }, "downloads": -1, "filename": "pynicom-0.3.5.tar.gz", "has_sig": false, "md5_digest": "2715513c5f38408c0750094dc989c48b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9221, "upload_time": "2016-11-03T14:18:09", "url": "https://files.pythonhosted.org/packages/18/fe/e6baf5035211b6968e2321160fa5db0f0046d4c71444a12551d6c16bce72/pynicom-0.3.5.tar.gz" } ] }