math4782
math4782

Reputation: 45

How do python scripts work?

I just learned how to read and send emails using python and I read that you can create a python script that can read someone's twitter or facebook and send you an email whenever a specific person posts something on twitter or facebook, but how does this work?

What is the difference between a script and just a regular program? I don't think that if someone is doing something like this that they would need to have their computer on at all times and have the python program running in the background, or is that what is happening?

Upvotes: 1

Views: 250

Answers (1)

Thomas Kowalski
Thomas Kowalski

Reputation: 2184

A python script is a kind of program.

To make what you're talking about, you'd need to either have some kind of notification when someone tweets or something to check constantly for new content.

Either way, the computer will have to be on at all times (for that, you could use a Raspberry Pi for example, so you don't take that much power). (EDIT : you can of course also have a server doing that for you, but it's still a computer running at all times.)

You'll need to get your hand onto the Twitter API documentation. There is probably a python wrapper.

(EDIT:Tweepy - Would be the aforementioned python wrapper)

Upvotes: 5

Related Questions