File Exchange
Try Origin for Free
The Origin Forum
Home
|
Profile
|
Register
|
Active Topics
|
Members
|
Search
|
FAQ
|
Send File to Tech support
All Forums
Origin Forum for Programming
Forum for Python
How to check if user has Origin 2021 or later?
Note:
Only the poster of this message, and the Moderator can edit the message.
Screensize:
640 x 480
800 x 600
1024 x 768
1280 x 1024
UserName:
Password:
Anti-Spam Code:
Format Mode:
Basic
Help
Prompt
Format:
Font
Andale Mono
Arial
Arial Black
Book Antiqua
Century Gothic
Comic Sans MS
Courier New
Georgia
Impact
Lucida Console
Script MT Bold
Stencil
Tahoma
Times New Roman
Trebuchet MS
Verdana
Size
1
2
3
4
5
6
Color
Black
Red
Yellow
Pink
Green
Orange
Purple
Blue
Beige
Brown
Teal
Navy
Maroon
LimeGreen
Forum:
Forum for Python
Subject:
Message:
* HTML is OFF
*
Forum Code
is ON
Smilies
Origin Ver. and Service Release: 2022b Operating System: Windows 11 I have developed a Python program that automates Origin to perform some tasks, which I have distributed to many users. However, some users have older versions of Origin, which lack Python compatibility. When they try to use the program it does not succeed. I want to display a meaningful error message when this happens. However I do not have an older version of Origin to test my code on. Therefore I wanted to ask the Origin team, please would you advise me if there is a way to check the user's Origin version via Python? For instance, if I run the below code, is an exception raised? [code] # Import OriginPro library import originpro as op # Start Origin instance def origin_shutdown_exception_hook(exctype, value, traceback): '''Ensures Origin gets shut down if an uncaught exception''' op.exit() sys.__excepthook__(exctype, value, traceback) if op and op.oext: sys.excepthook = origin_shutdown_exception_hook # Attach to running Origin project, if one is open op.attach()[/code]
Check here to subscribe to this topic.
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000