Skip to content

Instantly share code, notes, and snippets.

@Sulkar
Sulkar / non-blockingAppJar.py
Last active August 12, 2017 20:16
[python] multithread example to not freeze/not block AppJar when sleep function is called
#
# Multithread AppJar example
import threading, time
from appJar import gui
def btn_normal(btnName):
app.addLabel("l1", "Label 1")
#call sleep Function for Label 2 in main thread
sleepFunction(3)
@Sulkar
Sulkar / mergeFiles.py
Last active August 12, 2017 20:09
[python] merge files in folder
import shutil, os
# Function: merge files in current _dataDir folder!
def mergeFiles(_dataDir, _finalFileName):
if _dataDir == "":
print("Error no path available")
else:
# output Filename
outfilename = os.path.join(_dataDir, _finalFileName)