File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -211,11 +211,18 @@ def _parse_size(self, size_str: str) -> int:
211211 return - 1
212212
213213 async def alist_packages (self ) -> list [str ]:
214- return (await self .aexec ("uv pip list" , kernel = "bash" )).text .splitlines ()
214+ return (
215+ await self .aexec (
216+ "uv pip list | tail -n +3 | cut -d ' ' -f 1" ,
217+ kernel = "bash" ,
218+ )
219+ ).text .splitlines ()
215220
216221 async def ashow_variables (self ) -> dict [str , str ]:
217- vars = [line .strip () for line in (await self .aexec ("%who" )).text .strip ()]
218- return {v : (await self .aexec (v )).text for v in vars }
222+ vars = [
223+ line .strip () for line in (await self .aexec ("%who" )).text .strip ().split ()
224+ ]
225+ return {v : (await self .aexec (f"print({ v } , end='')" )).text for v in vars }
219226
220227 async def arestart (self ) -> None :
221228 """Restart the Jupyter kernel"""
You can’t perform that action at this time.
0 commit comments