• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

Is there a way to load "ac" library to have autocomplete in an IDE (e.g. PyCharm)?

FitbyBit

New Member
I would like to have autocomplete in PyCharm python IDE.
Now I have following:
upload_2023-3-18_19-23-27.png


Is it possible to load AC Python libs or stub libs?
 

FitbyBit

New Member
Thanks for your answer, mate.
Yeah, that's a shame =)
Probably it is worth to start a GitHub repo for this. :)
But who is the owner of this document?
It would be easier to fetch some raw text if he has it yet.

...nevermind. =)
I figured out the PDF contains the update from you + original document :)
 
Last edited:

FitbyBit

New Member
DEPRECATED. See ac-stubs package below.


Added the package...
https://pypi.org/project/AcDummyLib/

Code:
✓ $ /d/prog/python37/python -m virtualenv venv
created virtual environment CPython3.7.9.final.0-64
[...]
✓ $ python --version
Python 3.7.9
✓ $ venv/Scripts/pip install AcDummyLib
Collecting AcDummyLib
  Downloading AcDummyLib-0.1.0-py3-none-any.whl (9.4 kB)
Installing collected packages: AcDummyLib
Successfully installed AcDummyLib-0.1.0
In the code for proper autocomplete we need add

Code:
from AcDummyLib import ac
and comment:
Code:
# import ac
On code test/publish, this change must be reverted.

If someone knows how to avoid this, please mention it.
 
Last edited:

fughettaboutit

aka leBluem
Ah nice! This should do the trick without doing manual labor for switching
# put this in your app:
Code:
if __name__ == '__main__':
    ### with python installed, run this on console:
    # pip install ac-stubs
    ### ---in editor use the stub
    from AcDummyLib import ac
else:
    ### ---in ac just use this
    import ac
 
Last edited:

FitbyBit

New Member
you missed this in the pdf :)
Yes, good point, thanks. I grabbed all functions, just programmatically. Pushed ChatGPT to make the script :D

edit btw : "acsys.py" is in steamapps\common\assettocorsa\apps\python\system\
Do you mean I need to paste the trick into this file?
 
Top