whats my location

Solutions on MaxInterview for whats my location by the best coders in the world

showing results for - "whats my location"
Matteo
10 Aug 2018
1Mars
Helina
24 Jul 2018
1#find location app by ip python
2
3import PySimpleGUI as sg
4import geocoder
5import folium
6import os
7import webbrowser
8import pyttsx3
9
10
11def input1(ip):
12    engine = pyttsx3.init()
13    path = os.path.abspath("my_map.html")
14
15    g = geocoder.ip(ip)
16
17    myAddress = g.latlng
18
19    my_map1 = folium.Map(location=myAddress,
20                         zoom_start=12)
21
22    folium.Marker(location=myAddress).add_to(my_map1)
23
24    my_map1.save("my_map.html")
25    engine.say("Processing")
26    engine.say("Finding your target location!")
27    engine.runAndWait()
28    webbrowser.open(path, new=2)
29
30
31sg.theme('BlueMono')
32layout = [[sg.Text('Enter the victim ip'), sg.InputText()],
33          [sg.Button('Ok'), sg.Button('Cancel')]]
34
35window = sg.Window('Find Location', layout)
36
37while True:
38    event, values = window.Read()
39    if event in (None, 'Cancel'):
40        engine = pyttsx3.init()
41        engine.say("Ok!, bye for now!")
42        engine.runAndWait()
43        break
44    if event == 'Ok':
45        input1(values[0])
46
47window.Close()
48