This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PySimpleGUI as sg | |
import os.path | |
# --------------------------------- Define Layout --------------------------------- | |
# First the window layout...2 columns | |
left_col = [ | |
[ | |
sg.Text("Folder"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
class MainPanel(wx.Panel): | |
def __init__(self, parent): | |
super().__init__(parent) | |
self.cb_value = 'One' | |
self.combo_contents = ['One', 'Two', 'Three'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kivy | |
import random | |
from kivy.app import App | |
from kivy.uix.button import Button | |
from kivy.uix.boxlayout import BoxLayout | |
red = [1,0,0,1] | |
green = [0,1,0,1] | |
blue = [0,0,1,1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
from ObjectListView import ObjectListView, ColumnDefn | |
import time | |
class TimeObj: | |
def __init__(self, start, end): | |
self.start = time.strftime('%H:%M:%S', | |
time.gmtime(start)) | |
self.end = time.strftime('%H:%M:%S', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
class MyTree(wx.TreeCtrl): | |
def __init__(self, parent, id, pos, size, style): | |
wx.TreeCtrl.__init__(self, parent, id, pos, size, style) | |
class TreePanel(wx.Panel): | |
def __init__(self, parent): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
class FrameOne(wx.Frame): | |
def __init__(self): | |
wx.Frame.__init__(self, None, title='Frame 1') | |
self.Bind(wx.EVT_CLOSE, self.on_close) | |
def on_close(self, event): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
app = wx.App(False) | |
frame = wx.Frame(None, wx.ID_ANY, "Hello World") | |
icon = wx.Icon("py.ico") | |
frame.SetIcon(icon) | |
frame.Show() | |
app.MainLoop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
def copy_files_from_file(file_path): | |
with open(file_path) as f: | |
for line in f: | |
dirname, filename = os.path.dirname(line), os.path.basename(line) | |
proj_dir = os.path.join(dirname, 'ProjectData') | |
if os.path.exists(proj_dir): | |
shutil.move(match, os.path.join(proj_dir, filename)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
def move_file_type_v2(path, ftype, excludes): | |
matches = glob.glob('{}/**/*{}'.format(path, ftype), recursive=True) | |
for match in matches: | |
dirname, filename = os.path.dirname(match), os.path.basename(match) | |
if dirname not in excludes: | |
proj_dir = os.path.join(dirname, 'ProjectData') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
class WizardPage(wx.Panel): | |
"""""" | |
def __init__(self, parent, title=None): | |
"""Constructor""" | |
wx.Panel.__init__(self, parent) |