Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/mod.ts>pyeval

๐Ÿ“š Standard module for denops.vim
Go to Latest
function pyeval
import { pyeval } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";

Evaluate Python expression {expr} and return its result converted to Vim data structures. Numbers and strings are returned as they are (strings are copied though). Lists are represented as Vim List type. Dictionaries are represented as Vim Dictionary type, non-string keys result in error. Note that in a :def function local variables are not visible to {expr}.

Can also be used as a method:

GetExpr()->pyeval()

only available when compiled with the +python feature

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>