Thanks dwblas, didn't know about partial.
I don't think k can be higher than 155 in this situation unless I am missing something?
User Profile
Collapse
-
It's olay, thanks got it sorted. Must have my dumb head on tonight.Just altered a lit bit of the code:
Code:def play_song(event): p = event.widget['text'] k=int(p)
Code:myname = Button(frame2,text=txt, font=TF, width=3) myname.bind('<Button-1>', play_song)
Leave a comment:
-
Reading which button is pressed
I am trying to write a python script to help some deaf people. They have a list of sign language songs which are in m4v format.
I have a raspberry pi and a monitor which I can give them.
My intention is to provide a gui with all the song numbers on buttons so they just click the mouse on one and the video plays then returns.
I know that I can launch omxplayer with the file as a parameter.
I am trying to develop the code... -
Thanks dwblas. I realized that when I did the workaround. Although the original Linux program was all in a nice gui this windows one is quite crude but I thought i would include the source code of my solution in case anyone actually finds it usefull.
Code:#!\c:\Python27/pythonw from Tkinter import * import tkFileDialog import tkMessageBox import os import time from ctypes import windll, byref, wintypes from
Leave a comment:
-
askopenfilename in windows and linux
Hi,
In linux I wrote a script which uses askopenfilename which I use to copy files from one place to another. Python 2.7.6
I copied the script to a windows 10 PC and, when I had sorted out various bits of syntax it runs under idle except for one thing. Python 2.7.9
Doing a print shows the folder it's coming from has the linux syntax:
E:/Test/filetocopy instead of E:\Test\filetoc opy and I think this is why it fails.
I...
No activity results to display
Show More
Leave a comment: