Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

15
Can I call a Powershell Command Line from within a Python Script?
Post Body

I'm having some memory issues with running a repetitive script within a data processing program that I'm using. I run it from a Powershell command line with the following sort of syntax:

Program.exe -batch -macro D:\Path\Scripts\Script.py

Is it possible for me to have a python 2.7 script that will call this for me and pass a specific string to Powershell in Windows 10?

I figure being able to do this will let me run the program for 1 set of data, close the program to relinquish the memory that should be released when closing a project within the program, then iterate to my next data set and reopen the program fresh.

Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
53,210
Link Karma
4,053
Comment Karma
49,157
Profile updated: 1 day ago
Posts updated: 3 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago