Pedro Lacerda

Results 98 comments of Pedro Lacerda

Seems that to be both `bool` and coerce "yes"/"no" string is impossible because `bool` don't accept subclasses.

I was wrong and found a workaround for `bool` arguments. https://gist.github.com/pslacerda/1e6a14cbe3fc7aeb2425e0a5d74ddc78

There are more design analysis or can I already starts to implement on a branch? I just implemented the support for `Enum`s. ```python class FTMapEngine(StrEnum): FTMAP = "ftmap" ATLAS =...

When `display`ed on JupyterLab It shows the 0 axis truncated without ellipsis and the 1 axis overflowed. If I remember correctly, on the terminal it show the 0 axis truncated...

With this Python 3 syntax is possible to pretty format the help automatically with HTML: ``` USAGE nearby_aminoacids_similarity sel1, sel2, [polymer1='polymer'], [polymer2='polymer'], ... ``` Is also possible to use the...

For hobby I modified some open source to parse PyMOL docstrings. I was seriously dreaming about a full featured help usage. Merged despite status: https://github.com/rr-/docstring_parser/pull/5 With a object model for...

```python3 class Selection(str): pass class Boolean(bool): def __init__(self, v): x = v in ['True', 'true', 'T', 't', 'Yes', 'yes', 'Y', 'y', '1'] super().__init__(x) @pm.extend @pm.autocomplete( # or autocomplete(OBJECT_LIST, OBJECT_LIST) sel1=OBJECT_LIST,...

I'm executing in a plugin: ```python subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'mypackage']) ``` Because is a subprocess it inherit the environment including any conda changes to environment variables. If PyMOL runs...

Here the `os.environ` running from inside PyMOL launched from `Conda-Prompt.bat`. The previous was from `pymolwin.exe`. They differ: ``` environ({ 'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\Kleit\\AppData\\Roaming', 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files...