Create output ports for python tag

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 28/11/2011 at 05:21, xxxxxxxx wrote:

Hi everyone,

Can you please tell me if there's a way to automatically add/remove ports on Python tag being based on Input number?

something like that:

def main() :
    for i in range(Input1) : # < int, number of Outputs
        nnn = "Output" + str(i+1)
        globals()[nnn] = float()
        #code for adding n-number of Output ports

I want to have something similar but without manually adding the ports:

Many thanks!

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 28/11/2011 at 12:45, xxxxxxxx wrote:

Hi sergey,

changing the document structure from the execution methods of a tag/node or object is bad and will lead to crashs. What exactly are you trying to achieve?

Cheers, Sebastian

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 28/11/2011 at 23:17, xxxxxxxx wrote:

Hi Sebastian!

I was trying to make python tag that would calculate set of values for Range Mapper based on amount of Input and will create corresponding number of output ports.

For example with Input = 2 the tag shoud've return four Outputs:
(0, 100/Input - (20/Input), 100/Input + (20/Input), 100) which would give the Range Mapper ranges 0..60 and 40..100 for 2 user datas.
With Input = 3 the tag shoud've return six Outputs:
(0, 100/Input - (20/Input), 100/Input + (20/Input), 100/Input*2 - (20/Input), 100/Input*2 + (20/Input), 100) which would give the Range Mapper ranges 0..40 26,6..73.2 60..100

But as I understand, I can get the values and variables I want inside Python tag but ports should be added manually