yes it does.
class Template(metaclass=_TemplateMetaclass):
“”“A string class for supporting $-substitutions.”“”
delimiter = ‘$’
idpattern = r’[_a-z][_a-z0-9]*’
flags = _re.IGNORECASE
def init(self, template):
self.template = template
Search for $$, identifier, {identifier}, and any bare $'s
def _invalid(self, mo):
i = mo.start(‘invalid’)
lines = self.template[:i].splitlines(keepends=True)
if not lines:
colno = 1
lineno = 1
else:
colno = i - len(‘’.join(lines[:-1]))
lineno = len(lines)
raise ValueError(‘Invalid placeholder in string: line %d, col %d’ %
(lineno, colno))
def substitute(*args, **kws):
if not args:
raise TypeError("descriptor ‘substitute’ of ‘Template’ object "
“needs an argument”)
self, *args = args # allow the “self” keyword be passed
if len(args) > 1:
raise TypeError(‘Too many positional arguments’)
if not args:
mapping = kws
elif kws:
mapping = _ChainMap(kws, args[0])
else:
mapping = args[0]
Helper function for .sub()
def convert(mo):
Check the most common path first.
named = mo.group(‘named’) or mo.group(‘braced’)
if named is not None:
return str(mapping[named])
if mo.group(‘escaped’) is not None:
return self.delimiter
if mo.group(‘invalid’) is not None:
self._invalid(mo)
raise ValueError(‘Unrecognized named group in pattern’,
self.pattern)
return self.pattern.sub(convert, self.template)
def safe_substitute(*args, **kws):
if not args:
raise TypeError("descriptor ‘safe_substitute’ of ‘Template’ object "
“needs an argument”)
self, *args = args # allow the “self” keyword be passed
if len(args) > 1:
raise TypeError(‘Too many positional arguments’)
if not args:
mapping = kws
elif kws:
mapping = _ChainMap(kws, args[0])
else:
mapping = args[0]
Helper function for .sub()
def convert(mo):
named = mo.group(‘named’) or mo.group(‘braced’)
if named is not None:
try:
return str(mapping[named])
except KeyError:
return mo.group()
if mo.group(‘escaped’) is not None:
return self.delimiter
if mo.group(‘invalid’) is not None:
return mo.group()
raise ValueError(‘Unrecognized named group in pattern’,
self.pattern)
return self.pattern.sub(convert, self.template)
···
On 28 November 2017 at 08:05, Eugene Pakhomov [email protected] wrote:
Check if that file contains “class Template”. If it does, then I have no idea what’s happening, and further exploration would require an access to your machine.
If it does not, then your Anaconda installation has become broken for some reason. I would try to reinstall it, or at least to create a conda environment.
On Tuesday, November 28, 2017 at 1:34:45 PM UTC+7, Andrea Tagliabue wrote:
Morning Eugene,
i get this C:\Users\andrt\Anaconda3\lib\string.py
No errors
Virus-free. www.avast.com
On 28 November 2017 at 07:28, Eugene Pakhomov [email protected] wrote:
Hi Andrea,
Regarding your latest message. Either your Python installation is incredibly broken so that standard library imports don’t work, or you have a “string” module in your PYTHONPATH that shadows the standard module.
Try executing:
import string
print(string.file)
Where does it point?
Regards,
Eugene
On Tuesday, November 28, 2017 at 1:16:13 PM UTC+7, Andrea Tagliabue wrote:
also i am getting errors when i am trying to use version from util
On 28 November 2017 at 07:10, Andrea Tagliabue [email protected] wrote:
Hi Bryan,
yes i am trying to create custom widgets and custom tools. I followed what is described here https://github.com/bokeh/bokeh/issues/6462 but unfort i got this error.
My nodejs version is 6.10.3.
Any help here would be great!
Thanks in advance!
Andrea
Virus-free. www.avast.com
On 25 November 2017 at 18:55, Bryan Van de ven [email protected] wrote:
Hi,
You are running in to this issue:
[https://github.com/bokeh/bokeh/issues/6462](https://github.com/bokeh/bokeh/issues/6462)
However “npm” is purely optional dependency. Unless you are:
Then you should not need it at all. (i.e. the problem with “bokeh info” is an annoyance but will not affect any normal usage).
If you are saying you are having problems with normal usage, please describe your actual situation and problem including a minimal example code to reproduce.
Thanks,
Bryan
On Nov 23, 2017, at 07:19, Andrea Tagliabue [email protected] wrote:
I think this prevents me to see any output in the browser
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f3a576aa-2b24-404c-ad00-b2ab6c7d6d7c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
<test.png>
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/27C8140F-72B6-4124-A21A-100365F582C8%40anaconda.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/21b2cda4-8682-42fc-a06d-27076b50ba07%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/034b6247-ed74-4063-986a-8387ef1bccc2%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.