Forum Moderators: Lobo3433, Staff Forum Coordinators: Anim8dtoon
Poser Python Scripting F.A.Q (Last Updated: 2026 Apr 22 10:09 am)
Is the APPDATA concept not Windows specific?
Using Python, os.gentenv("HOME") should you return the current users home directory.
Scripts running in Poser are part of the Poser-App. No need to keep some orphans which are dependent on Poser after Poser is deinstalled. On the other side: If I move Posers data area, I want to move script dependant data too.
Data areas under Poser-Pythons script path are completely safe and secure under all operating systems.
Perhaps "the Mac equivalent of APPDATA" was the wrong phraseology. In Windows, APPDATA appears to be the place where applications are supposed to save user-specific configuration files, etc. Sothe question'sreally where do Mac applications usually put their user-specific configuration files, etc ?
Regarding file location - the spanner in the works is that the specific datafile in question here is for both* Poser and DAZ Studio.
As I understand things now, because both PoserPython scripts and DAZ Scripts will need to be able to write to the file, it cannot go anywhere that the OS considers to be part of either the Poser or DAZ Studio installation, because the other program would be forbidden from writing to it.
Therefore in Windows a "%APPDATA%/Roaming/3DCheapskate_Pose_DAZ_SmartPlus" folder containing my "SmartPlusData.txt" file seems the best solution at present.
So now I'm really looking for the most sensible place to put my ":3DCheapskate_Pose_DAZ_SmartPlus:SmartPlusData.txt" file on a Mac.
*yes, I really do need (want?) to use exactly the same single file for both Poser and DAZ Studio.
Edit: forgot to add a crosslink to the original thread - How do you avoid UAC problems writing to poser.AppLocation() subfolders ?
The 3Dcheapskate (also available in DAZ and HiveWire3D flavours) 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.
In a unixoid OS the users home directory is where apps store files. Where path-/filenames starting with a dot (".") in "home" are special and such pathnames are often used as "application pathes". All other pathes may need a special user to create/modify files.
By the way: os.getenv("USER") and os.getenv("HOME") seems to deliver nothing with Poser-Python (at least in my installation).
adp001 posted at 1:33PM Thu, 30 April 2020 - #4387630
...
By the way:
os.getenv("USER")andos.getenv("HOME")seems to deliver nothing with Poser-Python (at least in my installation).
I assume you're talking Windows there ?
The 3Dcheapskate (also available in DAZ and HiveWire3D flavours) 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.
The place where Poser puts its preferences in macOS (returned by poser.PrefsLocation() ) returns "/Users/[USERNAME]/Library/Application Support/Poser Pro/11". As you can see from the "Application Support" folder name, this is entirely equivalent to the Windows concept of AppData.
Again, I say. "Just use poser.PrefsLocation()!" If you don't like it being associated with Poser, because you want it for application data sharing, though if Poser weren't one of the apps you're sharing data between, that would be the sole reason I could imagine for not putting it there, as I suggested in the other thread, put your subfolder within the parent of the parent of poser.PrefsLocation(), or ~/Library/Application Support/Somewhere Nobody Will Ever Look But Can Always Write To. ;-)
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
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.
Environment variables - what's the Mac equivalent of APPDATA ?
The 3Dcheapskate (also available in DAZ and HiveWire3D flavours) 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.