Forum Discussion

jpnjordan's avatar
jpnjordan
Occasional Contributor
8 years ago
Solved

Python - Code Completion

Hi,

 

I'm starting a new project &, whilst my previous project was VBScript, I thought I'd try setting the scripting language as Python.

 

I am having a problem with code completion (Ctrl+Space), though. If I reference another script (that exists in the same project), I can't access the variables/methods via code completion. Nothing pops up, which can get slightly infuriating, especially as VBScript handled it well.

 

VBScript

 

'USEUNIT test

Sub abc()
test.                      'brings up methods & variables. Ctrl + Space does the same job.
End Sub

Python

import test

def abc():
    test.              #does nothing. Ctrl + Space doesn't show any options either.

Am I doing something wrong? Is there a setting I haven't enabled? Any help would be appreciated.

 

 

 

Edit: I should point out that code completions does work with the application (identifying objects, methods etc). My issue is specific to imported scripts.

 

  • Ha - turned out to be an issue with my scripts. In case anyone else encounters this issue: Check your referenced script for any errors...thoroughly...

     

    :smileylol:

2 Replies

  • jpnjordan's avatar
    jpnjordan
    Occasional Contributor

    Ha - turned out to be an issue with my scripts. In case anyone else encounters this issue: Check your referenced script for any errors...thoroughly...

     

    :smileylol:

  • Strange, it works fine for me. I never had to change any settings that I know of. Are you using the latest version of TestComplete?