mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
module imports are working now
This commit is contained in:
24
ftest.py
24
ftest.py
@@ -3,26 +3,16 @@
|
||||
import functions
|
||||
|
||||
#functions.debug.debug_function = functions.debug.print_to_stdout
|
||||
functions.debug.ignored_modules += ['parsing', 'builtin']
|
||||
#functions.debug.ignored_modules += ['parsing', 'builtin']
|
||||
functions.modules.module_find_path.insert(0, '.')
|
||||
|
||||
with open('test.py') as f:
|
||||
f_name = 'test.py'
|
||||
import os
|
||||
path = os.getcwd() + '/' + f_name
|
||||
|
||||
with open(path) as f:
|
||||
code = f.read()
|
||||
for i in range(1):
|
||||
completions = functions.complete(code, 50, 200)
|
||||
completions = functions.complete(code, 150, 200, path)
|
||||
|
||||
print '\n', ', '.join(str(c) for c in completions)
|
||||
|
||||
out = []
|
||||
for c in completions:
|
||||
d = dict(word=str(c),
|
||||
abbr=c.complete,
|
||||
menu=c.description, # the stuff directly behind the completion
|
||||
info=c.help, # docstr and similar stuff
|
||||
kind=c.type, # completion type
|
||||
icase=1, # case insensitive
|
||||
dup=1, # allow duplicates (maybe later remove this)
|
||||
)
|
||||
out.append(d)
|
||||
|
||||
print str(out)
|
||||
|
||||
Reference in New Issue
Block a user