Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
I've no current interest in Poser 12 scripts, and have not tested the following. But there is an official autofixer called 2to3, apparently for automated Python 2 to 3 code translation.Also two others that rely on 2to3. Poser 12 scripters can comment here on if these are useful or not for Poser. Futurize calls in 2to3, and uses it to attempt automatic conversion of Python 2 to Python 3. Python-Modernize also calls in 2to3.
The print and strings commands are different, and the way iterated lists are done. Calling modules now uses lower-case only (e.g. Tkinter = tkinter. And you can't mix intent tabs and spaces in Python 3 scripts.
I guess one of the best ways to learn would be to look at some well-commented Poser 12 / Python 3 scripts, and learn from those. Perhaps we need a fully commented 'Poser 12 demo' script, showing exactly what has changed and how?
Learn the Secrets of Poser 11 and Line-art Filters.
Typing 2to3 python into a search-engine gets you there.
Learn the Secrets of Poser 11 and Line-art Filters.
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Please tell us how to modify existing Poser scripts intended for Poser 11 and before, so that they will run correctly under Poser 12.