How to run a PowerShell script

Launch Windows PowerShell, and wait a moment for the PS command prompt to appear Navigate to the directory where the script lives PS> cd C:\my_path\yada_yada\ (enter) Execute the script: PS> .\run_import_script.ps1 (enter) What am I missing?? Or: you can run the PowerShell script from cmd.exe like this: according to this blog post here Or you … Read more

How can I sandbox Python in pure Python?

This is really non-trivial. There are two ways to sandbox Python. One is to create a restricted environment (i.e., very few globals etc.) and exec your code inside this environment. This is what Messa is suggesting. It’s nice but there are lots of ways to break out of the sandbox and create trouble. There was … Read more

How do I split a string on a delimiter in Bash?

You can set the internal field separator (IFS) variable, and then let it parse into an array. When this happens in a command, then the assignment to IFS only takes place to that single command’s environment (to read ). It then parses the input according to the IFS variable value into an array, which we … Read more