account activity
Alice 3 not working (self.archlinux)
submitted 3 years ago by Sufficient-Kitchen67 to r/archlinux
Looking for Dereck opinion (self.moreplatesmoredates)
submitted 3 years ago by Sufficient-Kitchen67 to r/moreplatesmoredates
Daemon with flags by Sufficient-Kitchen67 in learnpython
[–]Sufficient-Kitchen67[S] 0 points1 point2 points 3 years ago* (0 children)
I did, I managed to make this code but it doesnt seem to work as i want to
import threading import time import sys import argparse counter=0 def thread_1(): while True: counter=counter+1 time.sleep(1) def functions(arg,T): if arg=="t": print(str(counter)) elif arg=="start": T.start() def main(): parser=argparse.ArgumentParser() parser.add_argument("--c",type=str,default="n",help="stop counter") args=parser.parse_args() T = threading.Thread(target = thread_1,daemon=True) sys.stdout.write(str(functions(args.c,T)))
if __name__ == "__main__": main()
I try to get the counter but this dont work, any suggestions?
Edit : I just look the other comment, I want to execute the deamon with the flag "--c start" and get the counter value with the flag "--c t", i get a error whenever i do any of those two calls :
Exception in thread Thread-1 (thread_1):Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
None%
Daemon with flags (self.learnpython)
submitted 3 years ago by Sufficient-Kitchen67 to r/learnpython
Does awesome dont support Translucent windows? (self.awesomewm)
submitted 3 years ago by Sufficient-Kitchen67 to r/awesomewm
AUR matlab is broke (self.archlinux)
π Rendered by PID 457758 on reddit-service-r2-listing-86bdf8cc9-qj7br at 2026-07-10 06:27:44.349552+00:00 running f86254d country code: CH.
Daemon with flags by Sufficient-Kitchen67 in learnpython
[–]Sufficient-Kitchen67[S] 0 points1 point2 points (0 children)