Skip to content

Instantly share code, notes, and snippets.

@bahostetterlewis
Last active December 16, 2015 16:49
Show Gist options
  • Save bahostetterlewis/5465883 to your computer and use it in GitHub Desktop.
Save bahostetterlewis/5465883 to your computer and use it in GitHub Desktop.
My internet sucks and randomly cuts out. This lets me know when I'm connected again. simple and sweet so I don't have to ever type ping again.
import winsound
from subprocess import call, DEVNULL
print('Begin Ping Alert')
while call(["ping", "google.com"], stdout=DEVNULL, stderr=DEVNULL) != 0:
print('No net yet :(')
print('Web Back!!!')
winsound.PlaySound(r"C:\Windows\Media\tada.wav", winsound.SND_FILENAME)
print('End Ping Alert')
input('Press enter to exit...')
@cloudmaker97
Copy link

Oh :D
Can you tell me where i can learning Python? :D
What do i need? ._.

Greets from Germany :D

@bahostetterlewis
Copy link
Author

I am self taught but I have heard that this is a good resource.
http://learnpythonthehardway.org/
If you are already a programmer I would suggest checking out raymond hettinger's videos and david beazley's videos on youtube.

Greets from USA :)

@cloudmaker97
Copy link

Thanks, is it similarly to .NET languages?

@bahostetterlewis
Copy link
Author

It has similarities to all programming languages but it is also very much its own language.

@jabbalaci
Copy link

See http://stackoverflow.com/tags/python/info too. At the bottom you find a nice collection of learning materials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment