Skip to content

Commit c1f6d15

Browse files
Merge pull request geekcomputers#131 from shreydan/master
Updated readme and tweeter.py
2 parents bc85e73 + 19a83c0 commit c1f6d15

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ In the scripts the comments etc are lined up correctly when they are viewed in [
4343

4444
- `testlines.py` - This very simple script open a file and prints out 100 lines of whatever is set for the line variable.
4545

46+
- `tweeter.py` - This script allows you to tweet text or a picture from the terminal.
47+
4648
- `serial_scanner.py` contains a method called ListAvailablePorts which returns a list with the names of the serial ports that are in use in our computer, this method works only on Linux and Windows (can be extended for mac osx). If no port is found, an empty list is returned.
4749

4850
- `get_youtube_view.py` - This is very simple python script to get more views for your youtube videos.Some times I use for repeating my favorite songs by this scripts.

tweeter.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ def tweetthis(type):
1313
print "Enter your tweet "+user.name
1414
tweet = raw_input()
1515
api.update_status(tweet)
16-
print "\n\nDONE!!"
1716
elif type == "pic":
1817
print "Enter pic path "+user.name
1918
pic = os.path.abspath(raw_input())
2019
print "Enter status "+user.name
2120
title = raw_input()
2221
api.update_with_media(pic, status=title)
23-
print "\n\nDONE!!"
22+
23+
print "\n\nDONE!!"
2424

2525
def initialize():
2626
global api, auth, user
@@ -37,11 +37,10 @@ def initialize():
3737

3838
def main():
3939
doit = int(raw_input("\n1. text\n2. picture\n"))
40+
initialize()
4041
if doit == 1:
41-
initialize()
4242
tweetthis("text")
4343
elif doit == 2:
44-
initialize()
4544
tweetthis("pic")
4645
else:
4746
print "OK, Let's try again!"

0 commit comments

Comments
 (0)