cant install pyke

150 views
Skip to first unread message

PIYUSH KUMAR

unread,
May 30, 2015, 11:58:00 AM5/30/15
to py...@googlegroups.com
>>> from pyke import knowledge_engine
>>>my_engine=knowledge_engine.engine(__file__)

Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
my_engine=knowledge_engine.engine(__file__)
NameError: name '__file__' is not defined

Bruce Frederiksen

unread,
May 31, 2015, 3:23:54 PM5/31/15
to py...@googlegroups.com
You have to do this from within your python module (your own .py file).  It doesn't work like this from the python command prompt.


--
You received this message because you are subscribed to the Google Groups "PyKE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyke+uns...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyke.
For more options, visit https://groups.google.com/d/optout.

Dante_Zaupa

unread,
May 31, 2015, 3:30:24 PM5/31/15
to py...@googlegroups.com
And __file__ is a variable that has to be set with the value of a
valid Pyke rules file.
--
Dante

http://dzaupa.notapipe.org/

"Aquilo que pode ser afirmado sem provas, pode ser refutado sem provas."
-- Cristopher Hitchens

Usuário Linux #459228 -- Mint 11

Bruce Frederiksen

unread,
May 31, 2015, 4:43:26 PM5/31/15
to py...@googlegroups.com
__file__ is set automatically by Python to refer to the file containing your python module.
Reply all
Reply to author
Forward
0 new messages