-
Notifications
You must be signed in to change notification settings - Fork 105
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
base: master
Are you sure you want to change the base?
Conversation
speedcomplainer.py
Outdated
# 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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. |
@jbouse - I think you're probably right on the requirements. I will try to update the file this evening. |
@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. |
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)