Skip to content

Commit 0fd54f7

Browse files
committed
cross-platform resource paths
1 parent 7f83888 commit 0fd54f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

periscope/gui.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/usr/bin/env python
1+
import os
2+
23
import ttk
34
import Tkinter
45

@@ -89,7 +90,8 @@ def welcome_page(self, root):
8990
title = ttk.Label(page, text='Periscope', font='bold 28', anchor='s').pack(ipady=10)
9091
subtitle = ttk.Label(page, text='Tor Censorship Detector', font='24',
9192
foreground='grey').pack()
92-
logo = Tkinter.PhotoImage(file='resources/logo.gif')
93+
photo_file = os.path.join(os.path.dirname(__file__), "resources","logo.gif")
94+
logo = Tkinter.PhotoImage(file=photo_file)
9395
image = Tkinter.Label(page, image=logo, anchor='s')
9496
image.pack(padx=20, ipady=20)
9597
image.image = logo

0 commit comments

Comments
 (0)