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

Raspberry Pi Enhancements #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

bradleyhurley
Copy link

Added requirements.txt to avoid confusion (twitter vs python-twitter module) and ease of deployment.
Updated ReadMe.md to include pip install requirements.txt
Replaced string replace with regex
When running speedtest-cli from the Raspberry Pi my output was Mbits/s vs the expect Mbit/s
removed hard coded path to speedtest-cli (this allows use with virtualenvs and other distributions)

# run a speed test
result = os.popen("/usr/local/bin/speedtest-cli --simple").read()
# Find speedtest-cli and run test
cli_path = subprocess.check_output('which speedtest-cli', shell=True)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you not add .rstrip() to the end of L112 and then not need to do the .replace('\n','') on L113?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbouse, I made the update.

@jbouse
Copy link

jbouse commented Aug 17, 2016

Personally I like the enhancements and am looking to merge it into my fork. Curious about the requirements you added as I only had to add 3 into my version that I'm using to deploy on my Raspberry Pi units. I also set mine as minimum versions rather than static versions for pip to install.

@bradleyhurley
Copy link
Author

@jbouse - I think you're probably right on the requirements. I will try to update the file this evening.

@jbouse
Copy link

jbouse commented Aug 18, 2016

@bradleyhurley The other issue I found with your speedcomplainer.py (and it's likely in @james-atkinson version and I just fixed it) is that the file is in CRLF (Windows) not LF (*NIX) format so when I tried to merge your code into mine it generates a big diff because of all the ^M characters.

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

Successfully merging this pull request may close these issues.

2 participants