Re: Using Python xmlrpclib to build XMLRPC clients for a server with variable RPC names

2011-10-09 Thread JPC
That was the information I was missing many thanks.

For the reference sake, a look through the source code indicates this
solution; prior to your message I just didn't understand it that well.

-- 
/jpc


On Sun, 2011-10-09 at 11:00 -0700, Chris Rebert wrote:
> On Sun, Oct 9, 2011 at 6:30 AM, John P. Crackett
>  wrote:
> > I need to write prototype XMLRPC clients using xmlrpclib for a server
> > that has variable RPC names and I'd like to use Python as the
> > prototyping tool.  I've searched but can't find any relevant advice
> > online.  Any pointers would be gratefully received; details follow.
> >
> > The server in question constructs method names dynamically using the
> > names of objects created by the client.
> 
> > As an added complication, object names need to be concatenated using "-"
> > as a separator to form compound RPC names.  Following on from the
> > example above, this could lead to:
> >
> > api = xmlrpclib.ServerProxy(serverURL)
> >
> > api. createObjects("foo", "far")
> >
> > api.foo-bar.callOne()
> >
> > Where I don't know, again, what "foo" and "bar" will actually be in
> > advance.  "foo-bar" is obviously not a valid Python method name and this
> > is preventing me from hard-coding just to get a prototype going.
> 
> Try using getattr():
> getattr(api, "foo-bar").callOne()
> 
> For reference, getattr() satisfies the following identity:
> x.y === getattr(x, "y")
> except that getattr() does not itself enforce/require that its second
> argument be a valid Python identifier.
> 
> Cheers,
> Chris
> --
> http://rebertia.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Cannot install python properly - python310.dll not found - no pip

2024-06-03 Thread Jay Cadet | Studio JPC via Python-list
Hi. I'm attempting to install and use stable diffusion. However, while 
installing python 3.10.6, I'm getting the error that the python 310.dll is not 
found. I've made sure the PATH option is enabled, but it makes no difference. 
I've also removed and reinstalled python multiple times.

Even though I get that error, the python still installs, but when I open the 
webui-user.bat file in the stable diffusion folder, it opens up the command 
center and says that there's no module named pip.

Please advise on how to fix this problem.

Thank you,

Jay Cadet

Architectural 3D Artist / Photographer
studio JPC
[p] 516.567.1996  | [w] studiojpc.com<http://studiojpc.com>  | [ig] @studiojpc
-- 
https://mail.python.org/mailman/listinfo/python-list