Apparently I still don't have Eclipse/Pydev configured quite right.
When I try to execute selected code that includes a function, it won't
register the function.

I have this code in a module:
def process_all_textures():
    print ('Process all textures.')
process_all_textures()
print type(process_all_textures)

def junk():
    print ('junk')
junk()
print type(junk)

If I run the code in PyDev (Run As Python Run, Ctrl+F11), it executes
correctly.

If I hilite any of the text and send to Maya, it executes correctly,
(after the def has been registered).

However, when I hilite the first 4 lines of text and execute those
lines only in PyDev (Crtl+Alt+Enter - which is Interactive Console), I
get this error:
  File "<console>", line 3
    process_all_textures()
                       ^
SyntaxError: invalid syntax
print type(process_all_textures)
<type 'function'>

On a couple of attempts, selecting and executing the first 4 lines has
executed correctly in the Eclipse Console.  Also, Ctrl+Alt+Enter with
no text selected executes the whole module correctly.

Anyone have insight?
Thanks.

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to