insanum / sncli

Simplenote CLI
MIT License
396 stars 34 forks source link

work on python 2.x #36

Closed jtoy closed 5 years ago

jtoy commented 7 years ago

its great it works on python 3, can we get it to be compatible with python 2.7.x as the majority of *nix users are still on it?

samuelallan72 commented 7 years ago

This is going to be difficult due to all the internal operations with strings and bytes - see issue #23 for the major discussion around various crashes involving unicode characters. This was when I originally ported it to python3 to help fix those problems once and for all. (yay python3 strings!)

Also, while python2 might be the default in many *nix still, it's generally simple to install python3 alongside, so I don't see this as a problem. Interested to hear @insanum's opinion on this.

Either way, I don't currently have the time or willingness to go through the python2 strings nightmare again. Feel free to submit a pull request! :)

insanum commented 7 years ago

I personally would not spend any time porting back. FWIW, every single one of my *nix systems has both python2 and python3 installed. It's a lost cause IMO.

EgrettaGarzetta commented 7 years ago

Sorry, not at all sure if this is the right place to ask this, but I was very pleased to see a cli build of simplenote, and then disappointed because although I have python 2 & 3 on my linux boxes I cannot get it to run.

I guess from the tone of the discussion above that I'm making some elementary mistake, but I'd really appreciate getting to the bottom of this if anybody could help me out or just point me somewhere to find help.

When I try to run it the top of the traceback message looks like this:

pi@pi3:~ $ sncli
Traceback (most recent call last):
  File "/usr/local/bin/sncli", line 9, in <module>
    load_entry_point('sncli==0.1.4', 'console_scripts', 'sncli')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)

Thanks if you read this.

EgrettaGarzetta commented 7 years ago

Hang on, I think I'm getting there. I must have done 'pip install sncli' (before using pip3) because after doing 'pip uninstall sncli' and 'pip3 uninstall sncli' followed by a reinstall with pip3 I have succeeded in running the program. So thanks - I'm looking forward to making good use of this.

samuelallan72 commented 7 years ago

@EgrettaGarzetta glad to hear you could get it working. 😃 If you have any more issues in future, please create a new issue rather than replying to an old issue to keep everything on topic, and if you post a traceback, you'll need to include the entire output, not just the top. 😉

EgrettaGarzetta commented 7 years ago

Thanks Samuel, I'll bear those points in mind and get it right next time.

On Thu, Mar 9, 2017 at 10:49 PM, Samuel Walladge notifications@github.com wrote:

@EgrettaGarzetta https://github.com/EgrettaGarzetta glad to hear you could get it working. 😃 If you have any more issues in future, please create a new issue rather than replying to an old issue to keep everything on topic, and if you post a traceback, you'll need to include the entire output, not just the top. 😉

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/insanum/sncli/issues/36#issuecomment-285509037, or mute the thread https://github.com/notifications/unsubscribe-auth/AZF_g5raq0C1Pipa2LxBttTzB977dtV_ks5rkIIPgaJpZM4MFU4U .