Thu, Jan 2, 11:42 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: How to convert a text file to a .py?


Boni ( ) posted Sun, 11 March 2007 at 1:05 PM · edited Wed, 18 December 2024 at 3:03 PM

Greetings,
I'm new to using Python Script.  I was doing a tutorial in changing lighting in Poser to take light reflections in IBL lighting and it called for a python script posted at the web site ... I copied it to a .txt file ... but now when I try to access it in Python it gives me a "null character" error.  How do I convert this to Python?  Thank you.

Boni

Boni



"Be Hero to Yourself" -- Peter Tork


EnglishBob ( ) posted Sun, 11 March 2007 at 2:01 PM

Normally when you download a script from a forum, all you have to do is change the .TXT extension for .PY. It sounds as if the file has become corrupted somehow. Where did the file come from? If one of us can download it, we can probably see where the problem is. You could try this - open the .TXT file in Notepad or similar, then save it again. That should get rid of any dodgy characters, and you can rename the extension to .PY.


nruddock ( ) posted Sun, 11 March 2007 at 2:41 PM

For Windows, you either have to change the "Folder Options" so that you can see extensions, or use the rename command from a command prompt.


Boni ( ) posted Sun, 11 March 2007 at 5:10 PM

Thank you for your response.  Here is the page:
http://www.users.on.net/~pkinnane/IBL%20Tutorial/ImportLightsFromHDRShop.py

Any help would be greatly appreciated.
Thank you
Boni

Boni



"Be Hero to Yourself" -- Peter Tork


EnglishBob ( ) posted Sun, 11 March 2007 at 5:21 PM

Here's what I did: I followed the link, and the script came up in my browser as text. I did File > Save As and selected "all files" as the type - don't accept the default, which is usually text or HTML. The script ran for me, as far as asking for a file input anyway. I didn't have anything to give it, but I guess that proves my download was working.


Privacy Notice

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.