>
> My question is does anyone know how to send Python code instead of Mel…
>
>
> commandPort -name ":8999" -python

gives you a single line python server. Since it's single line, it's fairly
useless.

What we do: if you have control over the application that's sending the
code, you can conspire to send the Mel command:

python "(your python code)"

You'll have to quote your new-lines (\n), tabs (\t) and \ characters (\\).

Obviously this doesn't work if you are just using telnet.

Otherwise, you can exploit the fact that you have Python already running in
Maya to write any kind of server there you like —(for example, an XMLRPC
server, see: http://openendedgroup.com/field/wiki/MayaIntegration )

Marc.

>
>
>
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Judah Baron
> *Sent:* Monday, February 01, 2010 8:41 PM
> *To:* [email protected]
> *Subject:* Re: [Maya-Python] commandPort
>
>
>
> You could create your own socket, rather than using the command port. It's
> more complex, but it leaves you with a lot more options.
>
> On Sun, Jan 31, 2010 at 11:14 PM, Shaun Friedberg <[email protected]>
> wrote:
>
> Hello,
> Currently when opening a command port to send code to Maya I am using
> socket
> and sending mel.
> Does anyone know of a way to use Python instead?
>
> Thanks.
>
>
>
> --
> http://groups.google.com/group/python_inside_maya
>
>
>
> --
> http://groups.google.com/group/python_inside_maya
>
> --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to