2023-12-23 07:18:30 +01:00
|
|
|
import subprocess
|
2023-12-26 16:32:11 +01:00
|
|
|
import os
|
2023-12-23 07:18:30 +01:00
|
|
|
|
|
|
|
def write(text):
|
2023-12-26 16:32:11 +01:00
|
|
|
# set path
|
|
|
|
env = os.environ.copy()
|
|
|
|
env["PATH"] = env["PATH"] + ":/app/bin"
|
|
|
|
process = subprocess.Popen(["/bin/sh", "-c", "wl-copy"], stdin=subprocess.PIPE, env=env)
|
2023-12-23 07:18:30 +01:00
|
|
|
process.communicate(text.encode('utf-8'))
|