Python Scripts with Indent Errors

denmoff
Contributor III

Anyone here use python for their scripting in JSS? I'm trying to move over to python for my scripting, but i'm running into formatting issues when i copy my scripts into the script window. Everything looks ok when i copy it in, but when the scripts run, i'm almost always getting "expected indent" errors. For the most part, editing the script in the script window and deleting the indent and then re-indenting fixes the issue. But it can be tedious to fix. I think when i copy it in, the tabs are turning into 8 space tabs instead of 4(even tho it looks like it's 4 space in the script window).

I'm on JSS v9.21. I'm copying my scripts from Sublime Text 2.

1 REPLY 1

denmoff
Contributor III

I think the solution to this is not to use the script window for copying scripts(or editing them). I imported a script thru Casper Admin and the formatting was correct.