On Wed, 25 Oct 2017, Schaff, Frederik wrote:
> What's your python version? For example, this part of
Jack's embedded
> python code: "print(d)" looks like Python3, so I think it wouldn't work
in
> Python 2.x.
> If that's not it, you might post some details about the problem anyway.
>
> thanks,
> sven
I am using python 3. Here is the gretl output, using the script of Jack (i.e. with dotdir
as path - the problem is general, however).
----
Array of strings, length 4
[1] " File "C:\Users\Frederik\AppData\Roaming\gretl\gretltmp.py", line
3"
[2] " a =
next(walk("C:\Users\Frederik\AppData\Roaming\gretl"))[1]"
[3] " ^"
[4] "SyntaxError: (unicode error) 'unicodeescape' codec can't decode
bytes..."
---
Gaaaaaaaaah, that's because "\U" means "Unicode" in Python. If the
string
containing tha path is "raw-ified", the problem should go. Could you try
substituting
<python>
a = next(walk("@path"))[1]
</python>
with
<python>
a = next(walk(r"@path"))[1]
</python>
and see what happens? (The prepended "r" means "raw")
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------