Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
The Boolean type was added in Python 2.3. You didn't say which version of Poser you have, but it must be one of the older ones, such as Poser 6, that use old Python interpreters.
I don't know which Poser got Python 2.3 in it, but it was probably Poser 7???
Meanwhile, it's easy to fix. Use the code fragment shown here:
http://tomayko.com/writings/TrueFalseInOldPython
Note: It helps us answer better if, when you post a question, you always say which version of Poser you're dealing with and which OS.
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)
That'd be it - I'm using Poser 6 on Win7, so an early Python. The code you linked to fixes it, thanks.
I'd assumed I was using Python 2.6 since I've got it installed separately (E:/Python26). Hadn't realised that Poser was using a different Python (just spotted it at E:/e frontier/Poser 6/Runtime/Python)
And I originally had "Poser6:" at the start of the subject line, but forgot it when I retyped after the power cut - apologies for the oversight.
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
Quote - I'd assumed I was using Python 2.6 since I've got it installed separately (E:/Python26). Hadn't realised that Poser was using a different Python (just spotted it at E:/e frontier/Poser 6/Runtime/Python)
Because Poser has native modules embedded in the EXE, it must use it's own version of Python not any other that you might have installed. In fact Poser's Python is completely invisible to and (usually) unaffected by other Python installs.
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 a very rusty C programmer, and I've just completed my first ever Python script (cheering and applause all round).
I decided to tidy the script up a bit (hisses of indrawn breath and mumblings of "if it ain't broke don't fix it!"), and I've run into some really basic issues that highlight my very limited grasp of the subtleties of Python...
Luckily we had a power cut while I was originally typing this, and in the meantime I found the answer to one of my stupid questions.
But luckily I still have another stupid question in reserve:
I thought that True and False were built-in? (http://docs.python.org/library/intro.html and then hit 'next', then 'bool()').
So why do I get NameError: name 'False' is not defined when I try to use False?
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).