-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
74 lines (59 loc) · 1.84 KB
/
main.py
File metadata and controls
74 lines (59 loc) · 1.84 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#BobaMe
#App began development in 5/22/2019
import kivy
import requests
import sys
import webbrowser
from pprint import pprint
import json
import random
import os
from kivy.base import runTouchApp
from func_app import locate , search_again
from kivy.uix.floatlayout import FloatLayout
import urllib3
from time import sleep
from kivy.core.clipboard import Clipboard
from kivy.app import App
from kivy.uix.label import Label
from kivy.lang import Builder
from kivy.properties import ObjectProperty
from kivy.core.window import Window
from kivy.properties import StringProperty
from kivy.uix.image import AsyncImage
from kivy.uix.screenmanager import ScreenManager , Screen
from kivy.uix.widget import Widget
from kivy.properties import NumericProperty
from kivy.uix.textinput import TextInput
urllib3.disable_warnings()
class OpenScreen(Screen):
user_location = ObjectProperty(0)
def build(self):
user_location = TextInput(multiline = False)
self.user_location = user_location
class MainScreen(Screen):
bobashop = ObjectProperty(0)
bobalocation = ObjectProperty(0)
bobaphone = ObjectProperty(0)
bobareview = ObjectProperty(0)
bobaimage = ObjectProperty("")
current = ""
def on_enter(self):
user_city = self.manager.get_screen("OpenScreen").user_location.text
locate(self, user_city)
def addSearch(self):
user_city = self.manager.get_screen("OpenScreen").user_location.text
search_again(self , user_city)
def directions(self):
url = 'https://www.google.com/maps/place/'
location = self.bobalocation.text
webbrowser.open((url)+(location))
class WindowManager(ScreenManager):
pass
kv = Builder.load_file("bobame.kv")
sm = WindowManager()
class BobaMeApp(App):
def build(self):
return kv
if __name__ == "__main__":
BobaMeApp().run()