Results 1 to 13 of 13

Thread: Autocompletion for LW SDK in Python?

  1. #1

    Question Autocompletion for LW SDK in Python?

    Has anybody, in any IDE, managed to get autocompletion working for the LW SDK in Python?

  2. #2

  3. #3
    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...

  4. #4
    Registered User
    Join Date
    Oct 2009
    Location
    Iceland
    Posts
    55
    Good news =). I got autocompletion in PyCharm

    Click image for larger version. 

Name:	lw_autocom.jpg 
Views:	185 
Size:	95.3 KB 
ID:	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.

    LWPy_autocompletion.zip

  5. #5
    Registered User sami's Avatar
    Join Date
    Jul 2003
    Location
    TopLeft Viewport
    Posts
    995
    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.

  6. #6
    Registered User
    Join Date
    Oct 2009
    Location
    Iceland
    Posts
    55
    i'll try to figure out how to make support for debugging.

  7. #7

    Styler rules!

    Dude, you're a magician. How did you even generate those files?

  8. #8
    Registered User
    Join Date
    Oct 2009
    Location
    Iceland
    Posts
    55
    egearbox
    The generator you can find here )
    http://forums.newtek.com/showthread....Py-amp-WingIDE

  9. #9
    Lightwave junkie stevecullum's Avatar
    Join Date
    Jun 2005
    Location
    Reading UK
    Posts
    3,136
    Quote Originally Posted by Styler View Post
    Good news =). I got autocompletion in PyCharm

    Click image for larger version. 

Name:	lw_autocom.jpg 
Views:	185 
Size:	95.3 KB 
ID:	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.

    LWPy_autocompletion.zip
    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?
    i7 X3930/32GB/Quadro 4000

  10. #10
    Registered User
    Join Date
    Oct 2009
    Location
    Iceland
    Posts
    55
    Here is updated file generated with LW 11.6.2
    LWPy_11.6.2_autocompletion.zip

  11. #11
    Lightwave junkie stevecullum's Avatar
    Join Date
    Jun 2005
    Location
    Reading UK
    Posts
    3,136
    Quote Originally Posted by Styler View Post
    Here is updated file generated with LW 11.6.2
    LWPy_11.6.2_autocompletion.zip
    Thanks!
    i7 X3930/32GB/Quadro 4000

  12. #12
    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.
    Last edited by MentalFish; 07-31-2014 at 06:45 AM.
    Petter Sundnes
    Free LScripts

  13. #13
    Registered User
    Join Date
    Oct 2009
    Location
    Iceland
    Posts
    55
    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/cmdl...var-PYTHONPATH

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •