Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
You don't edit pyc files. They are binary - they are the result of compiling a py file.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)
PY files:-
The simplest would be Notepad on a PC or TextEdit on a Mac. Whatever you use be sure that it does not save the file with any unwanted formatting such as font or paragraph tags.
Python comes with its own editor called IDLE. This is the one that I use. In my stand alone Python installation it is located at C:Python26Libidlelibidle.pyw
Poser 9 and Poser Pro 2012 both include a version of Python with IDLE in it. Try starting it by double clicking the file "idle.bat"
Other than that a Google search for script editors will bring up a substantial number of links.
Hope that helps.
is there a way to turn a .pyc back into a .py?
Quote - PY files:-
The simplest would be Notepad on a PC or TextEdit on a Mac. Whatever you use be sure that it does not save the file with any unwanted formatting such as font or paragraph tags.
Python comes with its own editor called IDLE. This is the one that I use. In my stand alone Python installation it is located at C:Python26Libidlelibidle.pyw
Poser 9 and Poser Pro 2012 both include a version of Python with IDLE in it. Try starting it by double clicking the file "idle.bat"
Other than that a Google search for script editors will bring up a substantial number of links.
Hope that helps.
idle.bat just asks me to find a suitable program to open it. i've been trying to figure out how to turn an overlay file into a python script, and can't find anything on it anywhere. so now i'm trying to reverse engineer a script that applies an overlay so i can figure out how it works.
Scripts are often distributed as pyc specifically because the author doesn't want you to see how it works.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)
Turning a compiled version (.pyc) into an uncompiled one (.py) is called reverse-engineering, which is generally frowned upon. Compiling python scripts - as I understanding it - is more about copyright protection than anything else.
Out of respect to the developer, I'd be leaving them alone. If finding out how they work isn't sufficiently explained in the documentation, you might want to contact the developer for more details.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
Well I really don't need to reverse engineer it literally- there are lots of people making overlays, and I would assume there are tutorials and text about it somewhere. I just need to figure out how it works.
This would be akin to asking how to spawn random instances of a movie clip on my flash boards after seeing a game with that feature. Nobody has a copyright on how that is done, and I'm not going to be using someone else's work.
Would you guys recommend picking THIS up? Specifically i'm interested in overlays, but i wouldn't turn my nose up to learning some other stuff as well. My only concern would be it says Poser 8 and I'm using 2012.
Thanks again for the tips!
Poser 9/Poser Pro 2012 added a couple of extra Python methods, I believe I outlined them in a forum post, other than that all Poser 8 methods are still relevant to the latest version.
Poser 9/Poser 2012 uses a later version of Python but the same thing applies. The manual is over 400 pages long, navigation is very clear thanks to the tree format of the index, a large number of examples (in .py format) are included. It is written in English not geek-speak :)
I have posted a script that applies an overlay to a selected material.
You have the poser python methods manual as a pdf file that comes with Poser.
You need Phils guide or the python documentation for the coding like if-then, for a in b, and so on.
Thats at www.python.org. I think you want version 2.7.
The detail of how to run a script from a pose file was answered recently by Philc as a reply to me .
http://www.renderosity.com/mod/forumpro/showthread.php?thread_id=2856324
For materials, there IS another option. No, it's not an end-user solution (i.e., .py file) but Matmatic has taught me an enormous amount about how materials behave in Poser. Well, actually, the credit belongs to Bagginsbill, the author / developer of Matmatic.
Matmatic is a scripting utility written for Poser, using Python code to create sophisticated materials for the material room. Easily.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
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.
What program do you need to edit .py or .pyc files? I tried a text editor but a lot of times it comes out gibberish.
is there a utility associated with editing and writing python?