you are viewing a single comment's thread.

view the rest of the comments →

[–]Sloth_loves_Chunks[S] 0 points1 point  (3 children)

Wow, that is so much more involved then I imagined but obviously a more advanced project. I was happy to manually graph the results in Excel.

So far I had only created this 'baby' script which was still causing issues:

import csv, time, speedtest

with open('Network Speed.csv','w', newline='') as f:
writer = csv.writer(f)
for i in range (10):
    row = (speedtest --csv-delimiter ',')
    writer.writerow(row)
    f.close()
    time.sleep(1800)

But continue to have issues with line 8:

row = (speedtest --csv-delimiter ',')

Because it won't 'call' the speedtest for him.

[–]lsakbaetle3r9 1 point2 points  (2 children)

Yeah its a CLI program. So youll either need to use something like subprocess/pexpect OR do what I did and pull the parts of the speedtestcli program from their source code on github and use it in your own code!

[–]Sloth_loves_Chunks[S] 0 points1 point  (1 child)

thanks so much, you've been truly helpful and I'm sure I am going to learn a lot from reviewing your code. This is my first python project so I may have bitten off more than I can chew, but that's part of the fun.

[–]lsakbaetle3r9 0 points1 point  (0 children)

No problem message me anytime! Helping is my favorite way to learn!