Forum Discussion

zgibanez's avatar
zgibanez
Occasional Contributor
2 years ago

Calling

I have two script units in Python. I want to import functions from one to another.

I am following the steps mentioned in this page.

I made this simple test, but I am always getting `NameError: name * is not defined.

 

What am I doing wrong?

  • Here's another example, without using Unit1.ReturnTwo()

     

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Here's another example, without using Unit1.ReturnTwo()

     

     

  • zgibanez's avatar
    zgibanez
    Occasional Contributor

    Thank you for the reply. This works, but I wonder why the syntax "import X from *" doesn't work since I have seen it in other TestComplete projects