MCPcopy Index your code
hub / github.com/geekcomputers/Python / main

Function main

tweeter.py:56–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55
56def main():
57 try:
58 doit = int(input("\n1. Text\n2. Picture\nChoose option (1/2): "))
59 api, user = initialize_api()
60
61 if doit == 1:
62 tweet_text(api, user)
63 elif doit == 2:
64 tweet_picture(api, user)
65 else:
66 print("Invalid option. Please choose 1 or 2.")
67 except ValueError:
68 print("Invalid input. Please enter a valid number.")
69
70
71if __name__ == "__main__":

Callers 1

tweeter.pyFile · 0.70

Calls 3

initialize_apiFunction · 0.85
tweet_textFunction · 0.85
tweet_pictureFunction · 0.85

Tested by

no test coverage detected