[Python] @Python - NameError: global name 'select' is not defined

Discussão em 'Python' iniciado por Stack, Junho 23, 2025.

  1. Stack

    Stack Membro Participativo

    I used import select before calling the function that has select.

    I used select as shown below:

    rl, wl, xl = select.select([stdout.channel], [], [], 0.0)


    Here stdout.channel is something I am reading from an SSH connection through paramiko.

    Stack Trace:

    File "C:\Code\Test.py", line 84, in Test

    rl, wl, xl = select.select([stdout.channel], [], [], 0.0)
    NameError: global name 'select' is not defined

    Continue reading...

Compartilhe esta Página