|
Platform : Windows Issues.
This page describes Windows specific issues.
Running ElementsProcess.py
-
Running ElementsProcess.py
Under Windows, opening the ElementsProcess.py script in the Python IDLE and then using the "Edit:Run Script" command results in unexpected behaviours. The sys.path variable is set to the location of IDLE, not the script which is running. This breaks the elegant method of building the siteSrc and siteDest. You'll need to type the full path to the siteSrc and siteDest, escaping backslashes with a second backslash.
For example, if the path to your Elements source directory is C:\MyDocuments\MySite\ElementsSrc01
the ElementsProcess.py should define siteSrc like this:
siteSrc = "C:\\MyDocuments\\MySite\\ElementsSrc01"
Your ElementsProcess script would look like so:
import Elements
siteSrc = "C:\\MyDocuments\\MySite\\htmlSrc01"
siteDest = "C:\\MyDocuments\\MySite\\htmlOutput"
process = ''
display = ''
Elements.process (siteSrc, siteDest, process, display)
Also, when using the "Edit:Run Script" command, the Python output window closes immediately after finishing the script, so you have no time to read Elements messages. You might choose to edit the script in the IDLE or elsewhere, then close the script, and double click it in the Windows Explorer (not the Internet Explorer browser!). Double clicking the ElementsProcess.py script in the Windows Explorer will run the script with the expected behaviours—allowing you to use the convenient sys.path variable and show output messages.
top
|