Passing List Values as Parameters

list = ['12345','23456']

I have a script "test.py",I need to pass the values in a given list above as parameters to this script with "pick" as option, can anyone provide input on how this can be done?

Final goal is to run the script like the following:

 test.py pick 12345 23445

Answers


Use subprocess

import subprocess

lst = ['12345','23456']
cmd = ['test.py', 'pick']
cmd.extend(lst)
subprocess.call(cmd)

Try this code. This will invoke the script test.py with args pick 12345 23456


Need Your Help

how to fade / highlight respective div on link click in jquery

jquery css

I have following what I have tried so far fiddle http://jsfiddle.net/BLPgX/ I want to fade div instead of adding class and removing class.Also if user copy link like

WebRequest - Prevent redirection

c# redirect httpwebrequest httpwebresponse http-status-code-302

I am using a WebRequest to read an HTML site. The server seems to be redirecting my request.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.