Closed hemulin closed 6 years ago
The Python seashells client is currently only designed to be a CLI program, not a library, but it sounds like you need something more like a library.
Perhaps you want to directly integrate Seashells into your program? E.g. you can write code that opens a socket connection to the Seashells server, waits to receive a URL, does something with it (e.g. sending over a messaging app), and then gives you a log()
function that e.g. prints the output and also sends it over the socket to the Seashells server.
Hi and thank you for this great project.
After running for a while with
I decided to add a better monitoring functionality. When I pass a
--monitor
flag, I want the script to launch a seashells instance (and send me the link to the webpage over some messaging app - done already) and then launch the script itself. So far I wasn't able to make it happen...Given that the seashells is a locking process (
while True: ...
), I've tried with threading. So, on one thread, acquiring a lock before writing (printing script logs and tqdm progressbar), and releasing after write. And on another thread, from a slightly modified seashellsmain(console_lock)
, acquire the lock, read the stdin, release the lock and sleep for a second. This doesn't work.Can you please suggest how can I accomplish this?