Python editor autocomplete

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
FreeMake
Posts: 33
Joined: Tue Mar 19, 2019 12:10 pm

Python editor autocomplete

Post by FreeMake »

Hi all,

Autocomplete does not seem to be working when using the FreeCAD built in editor. Is there some setting that I need to change? It does work for the console.

Thanks
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Python editor autocomplete

Post by Joel_graff »

FreeMake wrote: Tue Mar 19, 2019 12:16 pm Hi all,

Autocomplete does not seem to be working when using the FreeCAD built in editor. Is there some setting that I need to change? It does work for the console.

Thanks
Autocomplete should just work...

I don't know anything about this specific problem, but you can help identify issues by doing two things:

1. Start FreeCAD from the command line / terminal. If there's any output identifying errors / warnings, copy / paste that into a message here.
2. With FreeCAD running, select Help -> About and click the 'Copy to Clipboard' button, then paste the results into a message. That will provide the details about your FreeCAD configuration...
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
FreeMake
Posts: 33
Joined: Tue Mar 19, 2019 12:10 pm

Re: Python editor autocomplete

Post by FreeMake »

No errors appear when running from the command line. It does print something in the report view:

Code: Select all

Run Gui init script
Init: Running FreeCADGuiInit.py start script...
Init:   Searching modules...
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Sketcher... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\ReverseEngineering... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Show(InitGui.py not found)... ignore
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Image... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Surface... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\PartDesign... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Measure(InitGui.py not found)... ignore
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Ship... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Plot... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\MeshPart... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\OpenSCAD... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Fem... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Spreadsheet... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Start... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Points... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Draft... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Test... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Import... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\TechDraw... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Tux... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Complete... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Web... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Material... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Raytracing... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Mesh... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Path... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Part... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Arch... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Robot... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\AddonManager... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Idf(InitGui.py not found)... ignore
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Inspection... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Drawing... done
Init: Loading FreeCAD GUI
Init: Running FreeCADGuiInit.py start script... done
Init: Activating default workbench StartWorkbench
Loading GUI of Web module... done
Loading GUI of Start module... done
Loading Start module... done
not a freecad file: .STEP
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Init: Showing main window
Main window restored
Show main window
Toolbars restored
3Dconnexion device not attached.
Init: Entering event loop
Init: Processing command line files

This is my installation information:

Code: Select all

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13509 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/Belgium (en_BE)

Autocomplete does work when writing in the Console, but it does not work in the editor. Are you sure it is also supposed to work in the editor?
schupin
Posts: 476
Joined: Sun Jan 21, 2018 1:43 pm

Re: Python editor autocomplete

Post by schupin »

FreeMake wrote: Mon Mar 25, 2019 10:05 am Autocomplete does work when writing in the Console, but it does not work in the editor. Are you sure it is also supposed to work in the editor?
To my knowledge it's not working in the editor (console only).

For me, the editor is just a python colored text editor.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Python editor autocomplete

Post by Joel_graff »

FreeMake wrote: Mon Mar 25, 2019 10:05 am Autocomplete does work when writing in the Console, but it does not work in the editor. Are you sure it is also supposed to work in the editor?
Ah, I think I had assumed you were referring to the console - I never think of the macro editor as I never use it. I do all of my development in an IDE outside of FreeCAD, usually.

Anyway, it appears the editor doesn't support auto-complete. :/
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
FreeMake
Posts: 33
Joined: Tue Mar 19, 2019 12:10 pm

Re: Python editor autocomplete

Post by FreeMake »

Okay, I guess this can be closed then. Thanks anyway guys!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python editor autocomplete

Post by Kunda1 »

FreeMake wrote: Tue Mar 26, 2019 9:36 am Okay, I guess this can be closed then. Thanks anyway guys!
you could open a ticket on the tracker and link back to this thread + notate in this thread what ticket number you created.
BTW, we recommend using version 0.18
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
adnanmakda95
Posts: 9
Joined: Wed Jan 02, 2019 10:08 am

Re: Python editor autocomplete

Post by adnanmakda95 »

Joel_graff wrote: Fri Mar 22, 2019 4:22 pm
FreeMake wrote: Tue Mar 19, 2019 12:16 pm Hi all,

Autocomplete does not seem to be working when using the FreeCAD built in editor. Is there some setting that I need to change? It does work for the console.

Thanks
Autocomplete should just work...

I don't know anything about this specific problem, but you can help identify issues by doing two things:

1. Start FreeCAD from the command line / terminal. If there's any output identifying errors / warnings, copy / paste that into a message here.
2. With FreeCAD running, select Help -> About and click the 'Copy to Clipboard' button, then paste the results into a message. That will provide the details about your FreeCAD configuration...
How do configure for autocomplete in external editor?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python editor autocomplete

Post by Kunda1 »

adnanmakda95 wrote: Sat Feb 22, 2020 1:08 pm How do configure for autocomplete in external editor?
Checkout https://forum.freecadweb.org/viewtopic.php?f=8&t=40673
Although it seems that autocomplete is not fully supported.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply