Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code required #54

Open
danie007 opened this issue Jul 11, 2022 · 2 comments
Open

Example code required #54

danie007 opened this issue Jul 11, 2022 · 2 comments

Comments

@danie007
Copy link

Hi,

It would be good to have some fully functional XMODEM example, for getting the file that is sent using Linux sz tool. (https://linux.die.net/man/1/sz)

My other questions are,

  1. Is it actively maintained?
  2. Does it support Python 3.10

Thanks in advance, let me know if I can be helpful in any sort.

@danie007
Copy link
Author

@jquast Could you help?

@jquast
Copy link
Collaborator

jquast commented Jun 10, 2023

@danie007 sorry for the delay,

  • I suppose you are wishing for an example using lrzsz package upfront in README file? We do have automatic tests in the repository for using lrzsz for next release, https://github.com/tehmaze/xmodem/blob/jq/prepare-next-release/test/functional/test_xmodem_using_lrzsz.py
    • It would be nice to complete the xmodem CLI to perform these features directly. there is old python -m xmodem code to send and recv files, but the implementation was not complete, I have left it as-is and removed the unreachable code, including the suggested idea of using PySerial and provide CLI for that.

      xmodem/xmodem/__init__.py

      Lines 719 to 730 in abb65d3

      parser.add_argument('-r', '--rate', default=9600, type=int,
      help='baud rate')
      parser.add_argument('-b', '--bytesize', default=serial.EIGHTBITS,
      help='serial port transfer byte size')
      parser.add_argument('-P', '--parity', default=serial.PARITY_NONE,
      help='serial port parity')
      parser.add_argument('-S', '--stopbits', default=serial.STOPBITS_ONE,
      help='serial port stop bits')
      parser.add_argument('-m', '--mode', default='xmodem',
      help='XMODEM mode (xmodem, xmodem1k)')
      parser.add_argument('-t', '--timeout', default=30, type=int,
      help='I/O timeout in seconds')
  • I think I am the only maintainer for now, I get busy, but I am trying to freshen this package and increase code coverage, several recent bugs resolved were in error handling that was missing coverage, so I've focused on that.
  • Yes, the next release is tested on python 3.10 (and 3.11..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants