25 threads found!
Thread | Author | Replies | Views | Last Reply |
---|---|---|---|---|
tromnek | 10 | 154 | ||
tromnek | 4 | 72 | ||
tromnek | 2 | 44 | ||
tromnek | 9 | 137 | ||
tromnek | 8 | 192 | ||
tromnek | 0 | 19 |
(none)
|
|
tromnek | 0 | 68 |
(none)
|
|
tromnek | 4 | 149 | ||
tromnek | 2 | 81 | ||
tromnek | 3 | 87 |
164 comments found!
Yes that looks like the best way to go. Should be pretty straight forward.
I'm looking to use wxPython for everything in Poser. It seems to play nicely with Poser.
Thread: Experience with communication between different instances of Python anyone? | Forum: Poser Python Scripting
The server needs to check the socket for a connection periodically. You should check frequently enough so that an incoming connection to the server doesn't timeout.
It's not that hard to 'not block' the rest of the system. I used tkinter's .mainloop() to 'not block' and scheduled periodic checking of the socket with tkinter's .after(time2scheduleCall, function2call)
However, like I said, Tkinter messes up things in Poser. I over came that by hijacking Tkinter. But Like I said, you need to hijack before any other Tkinter starts up.
Using threads would probably be better I think there are some wxPython functions that could also be used.
Thread: Experience with communication between different instances of Python anyone? | Forum: Poser Python Scripting
The Tkinter works but it is non-re-entrant. So you can't run two tkinter programs at the same time.
I think Poser 11's library is tkinter based because it hangs until you exit PRPCd.
I have code in PRPCd to handle multiple tkinter instances, but you need to run PRPCd before any other tkinter program. I think Poser 11's library is tkinter and thus it runs first and things to work well.
I was thinking to rewrite my prpcd to use wxPython which works much better. But it's a lot of work to rewrite everything. Don't know when I'll get the time.
Thread: Experience with communication between different instances of Python anyone? | Forum: Poser Python Scripting
What poser version are you running?
Yes I had that simple socket code lock me up also.
The PRPCd I wrote a long time ago still works. It could be modified for your use.
Thread: Experience with communication between different instances of Python anyone? | Forum: Poser Python Scripting
I took a look at the Marvelous Designer. That looks like an incredible product. I showed my 13 year old son who has an interest in fashion design and he was blown away by the tutorial videos.
Let me know how you make out. I'm just getting back into Poser and python programming. I should be up to speed in a couple months so let me know if you have questions or need help.
--tromnek
Thread: Experience with communication between different instances of Python anyone? | Forum: Poser Python Scripting
Also, ADP has a UDP server to run in Poser. ADP writes some very very good clean code. http://www.poserprofis.de/python/scripts.xml He has a server and client. I haven't looked at them so I can't tell you much. It should be pretty straight forward. A lot less code than the PRPCd stuff.
I did try his work around for running more than one python script at the same time ( PPmaster.py ). Very neat idea. It didn't work for me in Poser 11, but I haven't really tried to debug it.
Thread: Experience with communication between different instances of Python anyone? | Forum: Poser Python Scripting
I wrote some stuff about 12 years ago. (http://prpc.sourceforge.net/prpc.html) It's probably overkill for what you want to do.
I just picked up poser again after a 10 year hiatus. And it seems that the newest version of Poser has some limitations on running more than one python script at the same time. This can cause difficulties because the socket python code needs to be running all the time to communicate. Also, my PRPCd script uses Tkinter as a GUI. There seems to be a conflict between it and the Poser 11 library. I may rewrite the PRPCd to use wxPython. But I'm not sure.
Thread: Copies, deep copies, malloc, and RAM consumption | Forum: Poser Python Scripting
If all the references to objects are not deleted then you won't see it in the garbage because there are still outstanding references.
You might test this by laboriously assigning all references to None and then deleting them, this might get it under control.
This is also very important when using dictionaries in python, where it is the prime source of memory leaks.
I also notice that poser's python is rather greedy about not freeing memory. However, I've never had it get really out of hand.
It hurts me a little because I'm a very lazy programmer and don't always clean up my garbage.
Thread: Begging Tromnek: pls pls please do Poser7-friendly PRPCD | Forum: Poser Python Scripting
bummer.
I'll have to start working on saving prpcd's state along with the state of configured client modules.
Then when prpcd starts up, it could;
reload it's state
run the requested operation (file load or save)
save it's state
then exit
but, I don't think I'll get to this very soon.
I want to release a public 1.35.02 version.
Is there anything crucial I should add to the beta (1.35.01i) that I posted at sourceforge?
Thread: Begging Tromnek: pls pls please do Poser7-friendly PRPCD | Forum: Poser Python Scripting
Thread: Begging Tromnek: pls pls please do Poser7-friendly PRPCD | Forum: Poser Python Scripting
Something that we would need to be careful about with the above proposal is that no other python script using Tk is running when you startup PRPCd in it's ''run as needed' mode.
I think I prefer running PRPCd all the time (like we've been doing).
It provides system crash protection for running multiple Tk python scripts, IF it is started before any other scripts.
But mainly I want to run it all the time because;
I use alot of client modules (posefilter and conformto in particular), so I like having PRPCd running all the time with my client modules configured.
Now in Poser 7, to run python scripts, I'm keeping an 'windows explorer' session on my task bar which points to my pythonscripts folder. This way I can easily launch them remotely whenever I need one. I'm leaving 'with confirmation' enabled so I get a chance to confirm execution of the script.
I'm thinking that I might try and figure out a way to duplicate Pose 7's python script menus in some other alternative system. Maybe some win32ui calls to search the menu handles?
Any return thoughts on this?
Thread: Begging Tromnek: pls pls please do Poser7-friendly PRPCD | Forum: Poser Python Scripting
Oh yes. I completely forgot about that.
In PRPCd you need to enable 'Remote python script execution'.
Then you can send python scripts to PRPCd and it will execute them.
It will prompt you for confirmation if the 'with confirmation' box is checked.
Thank you Dizzi for adding that to AL.
P3dO also has a 'Run Python Script' option in the 'Tools' menu.
But you need to enable it first.
You need to enable this in Tools->Options->PlugIns->PoserPython
activate the 'Extended' checkbox, click 'Ok' then restart P3dO.
Then P3dO will have the 'Run Python Script' option avaliable in the 'Tools' menu.
You can also use 'Windows Explorer' if you installed 'snd2sock'.exe to create the 'Send To' right-click context menu.
Thread: Begging Tromnek: pls pls please do Poser7-friendly PRPCD | Forum: Poser Python Scripting
Kalypso. Yes, Dizzi's forum is the best place to debug Advanced Library problems.
The PRPCd problem with running other scripts is not particular to PRPCd.
It seems that if any script is running Poser 7 disables menus for running scripts until the first script exits.
Since PRPCd runs all the time, this is a major issue for prpc. However, you can run other scripts using PRPCd's 'Run python script button'. This button was mainly setup to run client scripts, so it isn't very versatile, but it will run other scripts just fine.
We need to find out why e-frontier decided to disable their script menus (ie. what problems they encountered). Then see if we can solve their problem so that they are willing to leave the script menus enabled.
Until then, use PRPCd's 'Run python script' button. If we can't work out something with e-fronteir, then we'll try and come up another solution or hack.
btw.
I'll be away in the country on vacation until after the new year. So I won't be working on this until then.
Thread: Begging Tromnek: pls pls please do Poser7-friendly PRPCD | Forum: Poser Python Scripting
Really sorry I missed this post (don't know how).
What isn't working?
I haven't done extensive testing, but the only thing we've found so far is that you can't run
other scripts while PRPCd (or any other script for that matter) is running.
Was this the problem?
You can run other scripts using PRPCd's 'Run python script' button.
Thread: Looking for an actor selector... | Forum: Poser Python Scripting
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.
Thread: Experience with communication between different instances of Python anyone? | Forum: Poser Python Scripting