View Single Post
Old 11-15-2016, 10:43 PM   #20
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@KevinH...I've also just noticed another instance of peculiar behaviour from the Sigil Plugin Manager. You can perhaps try this yourself.

Put this into your import code:
Code:
try:
    from sigil_bs4 import BeautifulSoup
    print('Running sigil_bs4...')
except:
    from bs4 import BeautifulSoup
    print('Running regular bs4...')
Then set the PM to bundled python and click OK.
When you run the plugin it will correctly show this message in the plugin window:

Running sigil_bs4...

But, most odd, if you then untick bundled python and set system python(to bs4) and press ok then, when you run the plugin, you get this message in the plugin window:

Running sigil_bs4...

The only way that I've found to run your own system python version is to untick bundled python and put just this in the import code:

from bs4 import BeautifulSoup
print('Running regular bs4...')

...With no reference at all to the sigil_bs4 version.
Then you will get the correct message:

Running regular bs4...

It seems that if you have the import try/except code shown at the top then no matter whether you set bundled python or not -- the PM will always select sigil_bs4.

Is this proper behaviour for the Plugin Manager?

Last edited by slowsmile; 11-15-2016 at 11:03 PM.
slowsmile is offline   Reply With Quote