Coin-operated kiosk written in python -- need some help...

Jon Monteleone uomart at ihug.co.nz
Thu Aug 18 17:15:31 EDT 2005


Thanks Fred,
The OS I am using is linux distro fedora core 4 (RH, version 10 I think).  The first
question I have is exactly as you mention in 1.  I need to have the gui running from
machine bootup to shutdown.  I wrote a bash daemon init script to turn my program into a
daemon, but it doesnt seem to work.  I used the standard bash daemon init script that
exists in /usr/local/docs as a template.  The script doesnt work correctly, so that is my
first problem.  But, assuming I get the script spawning my program as a daemon, the
question becomes...will my Tkinter gui show up on the gnome presession screen (login
screen) or do I need to add special code in .xinitrc or some other file to make it
display?  Your 2nd suggestion is already done.  My program detects the coin drop in a
separate thread.  I do not have any problems running the program once I am logged into the
Internet account.

So, currently my specific questions are:
1) How do I make my gui display at the login screen (we can assume I get the program
spawning as a daemon)
2) How do I get a push of the start button on my gui to login the user to the Internet
account

Cheers -Jon
----- Original Message ----- 
From: "Sells, Fred" <fred at adventistcare.org>
To: "Jon Monteleone" <uomart at ihug.co.nz>; <python-list at python.org>
Sent: Friday, August 19, 2005 5:01 AM
Subject: RE: Coin-operated kiosk written in python -- need some help...


I've done a similar app, but it keeps a gui up awaiting a timeclock punch.
You need to tackle this in phases:
1. what os and get the gui to start at bootup.
2. start a separate thread that reads/blocks on the coin.

you need more specific questions to get better help

-----Original Message-----
From: Jon Monteleone [mailto:uomart at ihug.co.nz]
Sent: Thursday, August 18, 2005 11:15 AM
To: python-list at python.org
Subject: Coin-operated kiosk written in python -- need some help...


Greetings,
I posted a few days back and didnt get much of a response, so I figured I
would post again
with more detail. I am running gnome under fedora core 4.

I want a kid to be able to drop a quarter into a coin slot and get 15
minutes of time on
an account that has "restricted" Internet access via the firefox web
browser.  We are
experimenting with different ways to allow kids to safely surf the web
during school hours
while recovering some of the cost for bandwidth.  I have written a python
program that
detects the coin drop and adds 15 minutes to a gui written in tkinter. The
gui contains 2
buttons and the usage time.  I need a way for my gui to display from machine
bootup until
shutdown and through multiple logins and logouts of the web browsing
account.  I am
familiar with kiosk setups but I dont know how to code my python program to
display its
gui at the login screen and continue running through multiple sessions of
users logging
into and out of the internet acct.

I thought making my kiosk program a daemon would work, but I cant get the
gui to display
at the login screen and then there is the problem of having the press of a
button on my
gui enter username and password information.

Basically, I envision the following sequence of events...
1) Machine is turned on and boots up
2) My kiosk is started (maybe as a daemon)
3) The daemon uses Tkinter to display its gui with the buttons and time
4) User drops coins and time on gui is incremented
5) User presses the start button
6) My program logs the user into the Internet account
7) Secure firefox is started
8) My program starts counting down the time on the gui
9) When the time reaches 0, the user is logged out
    When the user presses stop on my gui, they are logged out
     The user can drop more coins at any time during the session to prolong
the session
10) Timer resets to 0 awaiting the next customer to drop coins

Any help on how to display my gui and log into an account using python would
be much
appreciated.
Cheers -Jon

-- 
http://mail.python.org/mailman/listinfo/python-list


---------------------------------------------------------------------------
The information contained in this message may be privileged and / or
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by replying to this message and deleting the material from any
computer.
---------------------------------------------------------------------------




More information about the Python-list mailing list