Create discussions of your choice and make them look just right with easy text editing options. When writing longer discussions without images, use our flexible text editing tools to bring your posts to life. Make it easy for people to understand what you have to say by adding bullet points to your text so all your main points are clearly visible. Want to highlight important words in your text? Use bold or Italics to make them stand out. Want to add links? It’s easy just select any text and add a hyperlink.
6 giu 2018
Hello, I've started using a technique for long operations in python and I'd like to know if it seems reasonable in a TD context, or if there are better or more standard ways of doing things.For this application, I have to communicate with three HTTP APIs (including sending files) and use a number of command line programs (a slew of small utilities to control a Fastec camera, and ffmpeg to assemble the camera's output frames into an h264 video file). My general approach so far has been to kick off work in a threading.Thread, then use a Timer CHOP to poll for a result. I use a threading.Lock for memory safety.For the HTTP stuff, this seems to work fine. The use case is pretty simple -- make a sequence of requests in python, and at the end, make sure things turn out OK. I'm using the requests module and write "synchronous" code that then wrapped in a thread.I'm doing something similar with the command-line tools, but I use the subprocess module. The ffmpeg code should be very similar to the http/requests code. The camera controls are a bit more complex, so I'm using a queue.Queue (which is conveniently synchronized) to pass command and response objects. A Timer CHOP calls a poll method that pops things off the queue and reacts accordingly. Please help. I didn't find the right solution from the Internet. References:- https://www.derivative.ca/forum/viewtopic.php?t=11395&p=44185 IT Security animated Video Thanks