ljcooke / see Goto Github PK
View Code? Open in Web Editor NEWPython's dir() for humans.
Home Page: https://ljcooke.github.io/see/
License: BSD 3-Clause "New" or "Revised" License
Python's dir() for humans.
Home Page: https://ljcooke.github.io/see/
License: BSD 3-Clause "New" or "Revised" License
An error occurs in using see
in JupyterLite
see
included in requirements.txt
from see import see
see(<an object>)
generates an errorExpected behaviour: [...]
No error
Actual behaviour: [...]
The following error message is displayed
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
File /lib/python3.10/site-packages/IPython/core/formatters.py:707, in PlainTextFormatter.__call__(self, obj)
700 stream = StringIO()
701 printer = pretty.RepresentationPrinter(stream, self.verbose,
702 self.max_width, self.newline,
703 max_seq_length=self.max_seq_length,
704 singleton_pprinters=self.singleton_printers,
705 type_pprinters=self.type_printers,
706 deferred_pprinters=self.deferred_printers)
--> 707 printer.pretty(obj)
708 printer.flush()
709 return stream.getvalue()
File /lib/python3.10/site-packages/IPython/lib/pretty.py:410, in RepresentationPrinter.pretty(self, obj)
407 return meth(obj, self, cycle)
408 if cls is not object \
409 and callable(cls.__dict__.get('__repr__')):
--> 410 return _repr_pprint(obj, self, cycle)
412 return _default_pprint(obj, self, cycle)
413 finally:
File /lib/python3.10/site-packages/IPython/lib/pretty.py:778, in _repr_pprint(obj, p, cycle)
776 """A pprint that just redirects to the normal repr function."""
777 # Find newlines and replace them with p.break_()
--> 778 output = repr(obj)
779 lines = output.splitlines()
780 with p.group():
File /lib/python3.10/site-packages/see/output.py:46, in SeeResult.__repr__(self)
43 else:
44 indent = ' ' * MAX_INDENT
---> 46 return textwrap.fill(''.join(padded), term.line_width(),
47 initial_indent=indent,
48 subsequent_indent=indent)
File /lib/python3.10/site-packages/see/term.py:57, in line_width(default_width, max_width)
52 def line_width(default_width=DEFAULT_LINE_WIDTH, max_width=MAX_LINE_WIDTH):
53 """
54 Return the ideal column width for the output from :func:`see.see`, taking
55 the terminal width into account to avoid wrapping.
56 """
---> 57 width = term_width()
58 if width: # pragma: no cover (no terminal info in Travis CI)
59 return min(width, max_width)
File /lib/python3.10/site-packages/see/term.py:34, in term_width()
32 if fcntl and termios:
33 try:
---> 34 winsize = fcntl.ioctl(0, termios.TIOCGWINSZ, ' ')
35 _, width = struct.unpack('hh', winsize)
36 return width
AttributeError: module 'fcntl' has no attribute 'ioctl'
The following deprecation warning messages are shown after using see()
.
/Users/tetsu/opt/anaconda3/envs/tflow/lib/python3.10/site-packages/see/inspector.py:117: FutureWarning: Index.is_all_dates is deprecated, will be removed in a future version. check index.inferred_type instead.
prop = getattr(obj, attr)
/Users/tetsu/opt/anaconda3/envs/tflow/lib/python3.10/site-packages/see/inspector.py:117: FutureWarning: is_monotonic is deprecated and will be removed in a future version. Use is_monotonic_increasing instead.
prop = getattr(obj, attr)
/Users/tetsu/opt/anaconda3/envs/tflow/lib/python3.10/site-packages/see/inspector.py:117: FutureWarning: weekofyear and week have been deprecated, please use DatetimeIndex.isocalendar().week instead, which returns a Series. To exactly reproduce the behavior of week and weekofyear and return an Index, you may call pd.Int64Index(idx.isocalendar().week)
prop = getattr(obj, attr)
/Users/tetsu/opt/anaconda3/envs/tflow/lib/python3.10/site-packages/see/inspector.py:117: FutureWarning: weekofyear and week have been deprecated, please use DatetimeIndex.isocalendar().week instead, which returns a Series. To exactly reproduce the behavior of week and weekofyear and return an Index, you may call pd.Int64Index(idx.isocalendar().week)
prop = getattr(obj, attr)
from see import see
see()
Following the readme:
$ pip install --upgrade see
Collecting see
Installing collected packages: see
Successfully installed see-1.2.0
$ python
Python 2.7.10 (default, Sep 23 2015, 04:34:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from see import see
>>> foo = 'bar'
>>> see()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable
$ python
>>> see()
>>> see()
os see() sys
fcntl is Only being used to determine the terminal width.
It looks like there are a couple of ways of getting the terminal width on Windows, see:
https://code.activestate.com/recipes/440694-determine-size-of-console-window-on-windows/
Consider putting see under Python's license, or something equally liberal like Apache or BSD. If see is used in any Python program it currently requires the entire program to become GPL. That's obviously not acceptable for most software, including software that is open source under a more liberal license.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.