I've used Pythoncard to create my gui. Here it is in heavily condensed form:
import os
import sys
import os.path
import Tkinter
import wx
import subprocess
import subprocess as sp
from subprocess import Popen
from tkFileDialog import askopenfilenames
from tkFileDialog import askdirectory
import tkMessageBox
from Tkinter import *
from pathman import path
from PythonCard import dialog, model
from PythonCard.components import button, statictext, radiogroup
class VidToad(model.Background):
def choosein(self, event):
dlg = wx.DirDialog(self, "Choose Source folder...:", r'D:\\', style=wx.DD_DEFAULT_STYLE | wx.DD_DIR_MUST_EXIST)
if dlg.ShowModal() == wx.ID_OK:
global indirname
indirname=os.path.normpath(dlg.GetPath())
dlg.Destroy()
def on_radiogroup_select( self, event ) :
global Formatname
Formatname=self.components.radiogroup.stringSelection
def on_Button1_mouseClick(self, event):
if Formatname=="stretch":
self.index_push()
self.think()
My question is how can I make Button1 disabled once it has been clicked and another process (self.index_push(()has begun. Everything I've tried has given me attribute or similar errors. I still haven't quite got Python!
Thanks in advance!