Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)
Yes , its not that hard , use compile to create a .pyc file.
I have done a couple of things but people who sell utilities done in python would do it as a matter of course. I use a script to contain the compile command . Check the python manuals for the version you use.
compile( string, filename, kind[, flags[, dont_inherit]])
Python files distributed in PYC form (the compiled file) are binary.
My matmatic scripts were distributed this way and nobody has ever seen the code.
There are always people on this forum telling stuff they don't know about. When you hear somebody say Python scripts are only in source code form, they are wrong.
I can also encrypt Python and hide it in anything. I have demonstrated this before. I can hide them in JPEG files and run them without you even being aware that you have a script as part of a package.
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)
x-post again - 2nd time in a week that mark is faster than me!
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)
Thanks very much for the informations BagginsBill. So basically one could compile python scripts (I suppose also with python shell commands) and Poser would accept those .pyc's same as .py's
Interesting !
visit my
blog: www.alessandromastronardi.com
My
Rendo Store
I'd like also to ask which python compiler is most recommended for Poser: I'm using IDLE (python version 3.1.2) and it doesn't accept the "import poser" call, thus aborting compile operations.
Thanks
visit my
blog: www.alessandromastronardi.com
My
Rendo Store
That's right, the compiler is integrated in Poser.
I run the following commands
import py_compile
py_compile.compile('helloworld.py')
And it worked just fine. Thank you very much
visit my
blog: www.alessandromastronardi.com
My
Rendo Store
Well , there ya go . Was it the answer you thought in your first post ?
@bagginsbill, you were thinking deep thoughts, my head is basically empty, so much faster :lol:
Poser documentation on python is really bad. If you get the documentation for Python itself you will see how powerful it can be , and why compiled scripts need to be from reliable sources. I have often wondered how far a malicious script would get.
How far? It can steal your hard drive contents entirely. It can watch every keystroke you make. It can see every web page you visit. It can copy every password you type. It can get into your bank account. It can max out your credit cards.
That s how far a script could get.
People should only download content from reputable sources. And don't expect a virus detector or malware detector to understand a Poser python script. I can copy and wipe your hard drive a million ways and none of the professional malware programs would ever know.
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)
Quote - Well , there ya go . Was it the answer you thought in your first post ?
Yes, thanks
visit my
blog: www.alessandromastronardi.com
My
Rendo Store
Quote -
You may find this Python for Poser of interest.
I would have killed for it when I started writing Python scripts :)
Yes I got that, very useful indeed !
visit my
blog: www.alessandromastronardi.com
My
Rendo Store
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.
I'm afraid I already know the answer, but I'll ask anyway.
I would like to know if there is any way to encrypt or create python binary scripts for Poser, so that a commercial plugin wouldn't show the source code.
What Daz does is very good, it gives the possibility to wether release plugins in text or binary.
Thanks
visit my blog: www.alessandromastronardi.com
My Rendo Store