PDA

View Full Version : Autocompletion for LW SDK in Python?



egearbox
12-02-2012, 12:01 PM
Has anybody, in any IDE, managed to get autocompletion working for the LW SDK in Python?

Styler
12-04-2012, 06:51 AM
http://forums.newtek.com/showthread.php?131990-LWPy-amp-WingIDE

egearbox
12-10-2012, 08:20 PM
It's been a week, so I'm guessing that WingIDE is the only one... I've been corresponding with the PyCharm folks at Jetbrains, but we have not had any luck getting code completion working in Pycharm...

Styler
12-14-2012, 08:27 AM
Good news =). I got autocompletion in PyCharm

109869

Just unpack and copy files into 'Python\Lib\site-packages'. This won't give you opportunities to debug code, but for autocomplete works correctly.

109870

sami
12-14-2012, 09:19 AM
Thank you for sharing. At the moment I'm not doing python dev, but plan to compare it to Lscript & the SDK and see if there's a benefit. I use a modified Lscript notepad++ auto-completer. To me integrated debugging done properly would be a godsend, but just isn't there for me in it's current state so I'm happy to do it manually with my dump and log files. But then again I'm not sure at all about Python, I briefly tried the Lscript to Python converter and it was such a mess (didn't run) that it would be easier to rewrite in Python than debug. I'll have to revisit python sometime and your auto-complete that you shared will likely help.

Styler
12-14-2012, 10:43 AM
i'll try to figure out how to make support for debugging.

egearbox
12-14-2012, 06:41 PM
Dude, you're a magician. How did you even generate those files?

Styler
12-15-2012, 04:14 AM
egearbox
The generator you can find here )
http://forums.newtek.com/showthread.php?131990-LWPy-amp-WingIDE

stevecullum
01-26-2014, 06:18 AM
Good news =). I got autocompletion in PyCharm

109869

Just unpack and copy files into 'Python\Lib\site-packages'. This won't give you opportunities to debug code, but for autocomplete works correctly.

109870

Glad I found this old thread. The files worked fine for Visual Studio Python too. Has anything changed since 2012 - Is it worth generating some new ones?

Styler
03-09-2014, 05:19 PM
Here is updated file generated with LW 11.6.2
120665

stevecullum
03-09-2014, 05:58 PM
Here is updated file generated with LW 11.6.2
120665

Thanks!

MentalFish
07-31-2014, 05:26 AM
Is there any limitations to this in regards to the free version of PyCharm? I cannot for the life of me get autocomplete to work on my free PyCharm on OS X.

Edit: Strike that and replace with "Have you tried turning it off and on again?", so all is good.

Styler
08-01-2014, 04:31 AM
No you shouldn't have any limitation regarding autocomplete. Where did you put lwsdk.py file? I guess it supposed to be this place in MacOS

/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python/Lib/site-packages

or you can use PYTHONPATH system variable to add location for extra python files/modules
https://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH