Check Status If Raspberry Pi Is Connected to Any Wifi Network (Not Internet Necessarily) Using Python

Python Entry Line Will Not Get Keyboard Input - Types in Terminal Instead

Without seeing how your program is working you don't really need to create a toplevel window to ask for admin access. You can use tkinters simpledialog askstring function to ask for a password and then use iconify() to minimize the window.

Take a look at this example.

from tkinter import *
from tkinter import simpledialog
# from Tkinter import * # for python 2.x
# import tkSimpleDialog as simpledialog # for python 2.x

root = Tk()
root.attributes("-fullscreen", True)# fullscreen without the standard window buttons

def check_admin_password():
# use askstring here to verify password.
pass_attempt = simpledialog.askstring("Verifying access",
"Please enter Admin password")
if pass_attempt == "password":
root.iconify() # used whatever your instance of Tk() is here in place of root.

admin_minimize_button = Button(root, text = "Minimize window", command = check_admin_password)
admin_minimize_button.pack()

root.mainloop()

Sending values from one python script to another from different computer

I would suggest you google the python socket module: https://docs.python.org/2/library/socket.html

I used it t send values from a server to my android device, so I guess it should work with two rasbberries .
There is a good youtube tutorial about socket servers:
https://www.youtube.com/watch?v=LJTaPaFGmM4



Related Topics



Leave a reply



Submit