Jump to content

File action w/list of actions


dfay

Recommended Posts

I made a few fixes to your code but it's still not working for me either:

import json, os, subprocess, sys

cmd = ['./tag', '-r', '\*'] + json.loads(os.getenv('filesList'))
subprocess.call(cmd)

That fixed an error caused by a missing ] and puts all the arguments as separate list items, both of which I think are necessary, but it doesn't work....

 

Confirmed that it works on the command line.

 

@deanishe any ideas?

Edited by dfay
Link to comment
Share on other sites

@dfay Thanks for taking a crack at it!

 

@deanishe Thanks for the suggestion, too. It works!!

 

So, for others that might be interested, the following modification to @dfay's code does the trick:

import json, os, subprocess, sys
cmd = ['./tag', '-r', '*'] + json.loads(os.getenv('filesList'))
subprocess.call(cmd)

Thanks a ton, @dfay & @deanishe!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...