Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The embedded Python in Origin could be either version 3.3.5 or version 2.7.8 and it can be switched by asystem variable @PYV. When @PYV = 3 (Default), the embedded Python is 3.3.5, while if @PYV = 2, it is 2.7.8. To set value for a system variable, click Tools:System Variables to open the Set System Variablesdialog.

 

Jira LegacyserverJIRA (originlab.jira.com)columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolutionserverIdde9745f4-6a46-3986-b6b4-6ec476a4c732keyLinked jira: ORG-10840

Sample Files Can Be Found in Product:  \Samples\Python\

JIRASummaryDetails
ORG-9039

Integrate Python into Origin as a scripting language.

Code Block
titleLabTalk Script1
run.Python(%(str$), #); // # = 32(or 33) for setting path, 16 for suppress dump output, 2 for file, 1 for expression, 0 for statement

Or

Code Block
titleLabTalk Script2
run -py %(str$);  // Run Python script
run -pye %(str$); // Evaluate Python Expression
run -pyf %(str$); // Run Python file

ORG-10903

ORG-11444

Access Origin Objects from Python.

Samples under Origin exe\Samples\Python\ folder.

Code Block
titleLabTalk Script1Python Script Example1
import OriginPyOrigin
pages = OriginPyOrigin.pagesPages()
for page in pages:
	print(page.GetName())
ORG-11739Supported Version: Python 2.7 and 3.3
By default we support Python 3.3, to switch the Python version to Python 2.7, please run the script below in Script Window
Code Block
@pyv=2; //set to use python 2.7, while @pyv=3 to use python 3.3
ORG-10779Execution mode in Script Window to run Python scriptsImage Removed Access Origin in Python by PyOrigin module Image Added