Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "subprocess"
-
Was working on a Django thing (server-side, so no dynamicness as far as I'm aware?) under a contractor at my company.
Needed a popup to display results of a subprocess, so I asked "We're going to need to AJAX it, right?" and give brief justification. Guy says no - pretty much "Django 10/10 supports this, let me Google". Proceeds to send me a link to a python package that enables using popups as a way of inputting values for form fields. I see as much on the couple of images for the package demo/introduction, so I'm kind of just like "It doesn't look like it's what we need though..." But the guy says to trust him, and implement it.
A day later, after scrutinizing the demo code, and trying to figure out how to implement the package, I go back to him and say "I really really really don't think this is going to work" and give the same justification from the day before. He opens the demo code himself and follows the long trail of confusing methods and stuff.
After an hour of my sitting there watching him read the code and disappearing for 10 minute periods a few times, he comes to the conclusion "Okay you need to understand the code to implement it. But go ahead and use AJAX"
This is abridged and a few other super annoying things have been cut out, but I TRUSTED HIM.
I. TRUSTED. HIM.3 -
Needed to convert a collection of .avi videos to .mp4. Online converters only allow 1-2 videos at a time, with slow uploads, so no option.
Can't find a program that quickly fulfills my needs. Interesting ... 🤔
Look for python and a quick and dirty solution, ffmpeg and subprocess it shall be then.
Install ffmpeg, run subprocess with ffmpeg, put it inside a for loop, iterate over all videos with their respective number. Done.
3 lines of code, saved some time.
It's great to be a developer (sometimes).😏16 -
Learning the subprocess module in python, because os is deprecated. its a shame because i had just learned os6
-
++ if you've ever had to type something along these lines:
def main(args):
do = some
stuff = here
if __name__ == '__main__':
main()
trying to figure out the best way to write a driver script for a processing pipeline and the choices have boiled down to;
a) define "new" main functions where necessary
b) learn subprocess module
c) write a bash script to do it instead
still not sure what I'm going with... -
Today I spent a long hour working out how to assign a lead to a queue in apex (salesforce).
You can't just assign it, you need go make a setup entry in the database first to mark the group as a queue.
But wait, you can't actually do that in the same context as making the group, so you have to make a subprocess, and mark it as a queue in that.
None of this is documented.
Screw you, SalesForce.2