Skip to content

Commit

Permalink
Merge pull request #2 from rpanderson/example_sys_attributes
Browse files Browse the repository at this point in the history
Display sys attributes in window and/or terminal of example app
  • Loading branch information
chrisjbillington authored May 11, 2020
2 parents 6bd7ad5 + 7453655 commit cf1f9e3
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions example/oink/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@
import tkinter
import desktop_app

desktop_app.set_process_appid('oink')
desktop_app.set_process_appid("oink")


def main():
root = tkinter.Tk(className=sys.argv[0])
root.geometry("300x300")
root.geometry("500x300")
w = tkinter.Label(root, text="Oink!")
w.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER)
w.place(relx=0.5, rely=0.3, anchor=tkinter.CENTER)
sys_info = (
f"sys.prefix: {sys.prefix}\n"
f"sys.exec_prefix: {sys.exec_prefix}\n"
f"sys.executable: {sys.executable}"
)
s = tkinter.Label(root, text=sys_info, justify=tkinter.LEFT)
s.place(relx=0.05, rely=0.5, anchor=tkinter.W)
print(sys_info)
root.mainloop()

if __name__ == '__main__':
main()

if __name__ == "__main__":
main()

0 comments on commit cf1f9e3

Please sign in to comment.