Yes, this is a bug, logged as #17918. Give it a support bump if you'd like.

One workaround is to quote the integer argument with a leading or trailing space:

/vg/apps/Nuke/Nuke6.3v6/Nuke6.3 -t "/home/VGMTL/hleveille/Desktop/arg_test.py" hello world "5 "

-Nathan


-----Original Message----- From: Hugo Léveillé
Sent: Wednesday, April 25, 2012 10:52 AM
To: PYTHON (nuke) discussion
Subject: [Nuke-python] nuke -t argv problem

Is this a bug ? You cannot end an argument list with an int when using
nuke -t ?

ex:

make a .py file that looks like this:

======
import sys
import nuke
print sys.argv
print len(sys.argv)
=======

Then execute the file with the nuke -t interpreter

/vg/apps/Nuke/Nuke6.3v6/Nuke6.3 -t
"/home/VGMTL/hleveille/Desktop/arg_test.py" hello world
['/home/VGMTL/hleveille/Desktop/arg_test.py', 'hello', 'world']
3

This is fine and working as expected
======================================
Now try this:

/vg/apps/Nuke/Nuke6.3v6/Nuke6.3 -t
"/home/VGMTL/hleveille/Desktop/arg_test.py" hello world 5
['/home/VGMTL/hleveille/Desktop/arg_test.py', 'hello', 'world']
3

The 5 at the end is ignored.


======================
/vg/apps/Nuke/Nuke6.3v6/Nuke6.3 -t
"/home/VGMTL/hleveille/Desktop/arg_test.py" hello world 1 bar
['/home/VGMTL/hleveille/Desktop/arg_test.py', 'hello', 'world', '1',
'bar']
5

Its working again since its no longer a int at the end

Is it a bug or indented by design ?


--
 Hugo Léveillé
 TD Compositing, Vision Globale
 [email protected]

_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to