alankilborn

Results 817 comments of alankilborn

Your screenshot shows that you are set up to count only occurrences in selected text, but I see no selected text in the screenshot.

>after changing initialization to ONSTARTUP instead of LAZY Yes! --- >some "run" command in startup.py your script, called `foo.py`, has a "controlling" function (the function that will do the work...

>Easiest solution I found: > exec(file.read()) This is more of a brute force way, not a smart way. :-(

> So I looked in BracketHighlighter as an example and I don't see a "controlling" function? I looked at this sample, and you're right -- it isn't set up in...

Here's another way, using Python classes, to architect a script so that it is callable by another script: In `foo2.py`: ```py class Foo2(object): def __init__(self): print('fubar') ``` and then in...

Here's a new version of `BracketHighlighter.py`. I modified as little as possible while "modernizing" the script to use the class-based approach shown in the previous posting. The modernization allows easier...

>Do I need to so something to include the samples directory itself so it can find BracketHighlighter? @chcg Maybe Pythonscript could be modified so that this wouldn't happen? --- >sys.path.insert(0,'.\Samples')...

> or by adding a `__init__.py` to the examples directory. You mean the `Samples` folder. I tried creating an empty file there: `...\plugins\PythonScript\scripts\Samples\__init__.py` and then trying this in the PS...

> Yes, but `from Samples ...`, it's always the directory that contains the **init**.py that defines the module/package. I don't understand how that answers my question, but no worries, I'll...

@YakovL Documentation changes are fine, but I don't think any of your suggestions needs to result in a code change to the plugin.