-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenEXR - Python IntelliSense #1607
Comments
Do you know why Intellisense can't autocomplete on OpenEXR? It sounds like a good thing to support if it doesn't require special maintenance. I don't know if anyone on the team has experience with Python and Intellisense. |
My guess is that the file does not exist in *.py format. For Imath it exists as Imath.py, but for OpenEXR it does not. I created a simple python wrapper to solve this problem. I hope this project helps you in your decision making. Although I haven't done much testing, I confirmed that it works well within the range I need (reading and writing files, extracting metadata, and intellisense support). I don't know if this is the best way to support intellisense (there may be a way to expose it automatically). However, I think OpenEXR is a very stable project. |
Your solution does look easy to maintain, thanks for putting it together. I'm not a Python expert, so please forgive my basic questions.
|
|
Thanks @404Vector ! @reinecke is there any guidance from the OpenTimelineIO project on this? I think OTIO went through a couple of iterations to get this working across the board. |
@meshula @404Vector One way to solve this is to use .pyi files which is basically declaring the python interface of your cpython methods. This will make intellisense be able to see expected inputs/outputs, but code will still be executed through the .so module and not via any wrapper. Also thanks @404Vector for the wrapper. |
OpenEXR - Python does not allow code autocompletion using intellisense.
![is](https://private-user-images.githubusercontent.com/39119364/293837067-c8aac7be-597a-4434-aee7-2070d30c7910.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4MDMzOTQsIm5iZiI6MTcxOTgwMzA5NCwicGF0aCI6Ii8zOTExOTM2NC8yOTM4MzcwNjctYzhhYWM3YmUtNTk3YS00NDM0LWFlZTctMjA3MGQzMGM3OTEwLlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAxVDAzMDQ1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNhMGRhZTdkYmEwNTQzMGM3MjNjODZlOTMxYzNhNTI3MjViODU2OTU2MTFmMmFiMjgxMjZkZDAzN2M2ODcwMTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ry71JPFy_P2SgfuugKt33dtc0m8tfBOEHir81bJWvAU)
intellisense is a simple convenience feature.
However, I hope that the openexr-python package will be supported to enable intellisense so that many developers can easily access it in the future.
The text was updated successfully, but these errors were encountered: