-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVisualQuote.py
More file actions
34 lines (24 loc) · 784 Bytes
/
VisualQuote.py
File metadata and controls
34 lines (24 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from QuoteHandle import Quotes
from WallpaperCreator import Creator
from QuoteConnection import Connection
import time
import random
class Main:
def __init__(self):
self.__connected = False
# self.__connections = Connection()
self.__author = ["Albert Einstein",
"Douglas Adams"]
def __call__(self):
self.__connected = Connection.TryConnection
q = Quotes()
q.Author = self.ChooseAuthor(self.__author)
c = Creator(q.Quote)
c.SaveWallpaper()
def ChooseAuthor(self, author):
if isinstance(author, list) or isinstance(author, tuple):
return random.choice(author)
return author
if __name__ == "__main__":
m = Main()
m()