Giter Club home page Giter Club logo

bipython's People

Contributors

ivanov avatar rkern avatar scopatz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bipython's Issues

Unicode issues

Can't input unicode

Can't input unicode text. Try to type é, get é. This is what would happen if utf8 bytes were interpreted as latin1:

In [2]: print u'é'.encode('utf8').decode('latin1')
é

unicode completions crash bipython

$> touch uñîçø∂é
$> bipython

in bipython:

In [1]: u<TAB>

crashes with

UnicodeEncodeError: 'ascii' codec can't encode character...

deep inside urwid. Looks like a str _caption and unicode text.

Can't start bipython

After installing all the components, when typing bipython into the terminal I get:

Traceback (most recent call last):
  File "/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
  File "/usr/lib/python2.7/site-packages/bipython/__init__.py", line 1769, in main
    myrepl = URWIDRepl(event_loop, palette, interpreter, config)
  File "/usr/lib/python2.7/site-packages/bipython/__init__.py", line 651, in __init__
    self.ipython = self.connect_ipython_kernel()
  File "/usr/lib/python2.7/site-packages/bipython/__init__.py", line 708, in connect_ipython_kernel
    self.echod(":IPython " + s + " failed", "Info")
TypeError: echod() takes exactly 2 arguments (3 given)

any idea?

bipython won't start

after doing a

      pip install bipython

on startup it spits out the following error :

/home/aftnix/.local/lib/python2.7/site-packages/IPython/config.py:13: ShimWarning: The `IPython.config` package has been deprecated. You should import from traitlets.config instead.
  "You should import from traitlets.config instead.", ShimWarning)
/home/aftnix/.local/lib/python2.7/site-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)
Traceback (most recent call last):
  File "/usr/local/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
  File "/usr/local/lib/python2.7/dist-packages/bipython/__init__.py", line 1769, in main
    myrepl = URWIDRepl(event_loop, palette, interpreter, config)
  File "/usr/local/lib/python2.7/dist-packages/bipython/__init__.py", line 651, in __init__
    self.ipython = self.connect_ipython_kernel()
  File "/usr/local/lib/python2.7/dist-packages/bipython/__init__.py", line 681, in connect_ipython_kernel
    from IPython.zmq.blockingkernelmanager import BlockingKernelManager as KernelManager
ImportError: No module named zmq.blockingkernelmanager

bipython error: ValueError: No JSON object could be decoded

While starting bipython getting the below error.

Traceback (most recent call last):
  File "/Users/mrokade/.virtualenvs/cricket/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
  File "/Users/mrokade/.virtualenvs/cricket/lib/python2.7/site-packages/bipython/__init__.py", line 1769, in main
    myrepl = URWIDRepl(event_loop, palette, interpreter, config)
  File "/Users/mrokade/.virtualenvs/cricket/lib/python2.7/site-packages/bipython/__init__.py", line 651, in __init__
    self.ipython = self.connect_ipython_kernel()
  File "/Users/mrokade/.virtualenvs/cricket/lib/python2.7/site-packages/bipython/__init__.py", line 712, in connect_ipython_kernel
    km.load_connection_file()
  File "/Users/mrokade/.virtualenvs/cricket/lib/python2.7/site-packages/IPython/kernel/connect.py", line 504, in load_connection_file
    cfg = json.load(f)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Any ideas how this can be fixed ?

Choose ipython kernel at runtime?

Perhaps I'm being really dense, but is there a way to choose which ipython kernel to connect to? I am really loving this interface as a way to conduct quick explorations while I've got a notebook open, and then copy my results back into the notebook after I've used the interactive features to figure out how to do something. However, if I've got more than one notebook open, there are several kernels, and I'm not sure how to tell bipython which to connect to.

Perhaps a dialog, on launch, to select which kernel to use would be useful, or an ipython magic function to launch bipython connected to the current kernel, or an implementation of the --existing flag?

I realize that this project is reasonably early in development, without a big team, but I absolutely love it, and hope it takes off in a big way! Great work.

Install troubles ('ZMQSocketChannel' object has no attribute 'execute')

After running bipython after running ipython console or ipython kernel I get

> bipython
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
  File "/Users/scott/anaconda/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.3.-f261b78-', 'console_scripts', 'bipython')()
  File "/Users/scott/anaconda/lib/python2.7/site-packages/bipython-0.1.3._f261b78_-py2.7.egg/bipython/__init__.py", line 1860, in main
    myrepl = URWIDRepl(event_loop, palette, interpreter, config)
  File "/Users/scott/anaconda/lib/python2.7/site-packages/bipython-0.1.3._f261b78_-py2.7.egg/bipython/__init__.py", line 728, in __init__
    self.ipython = self.connect_ipython_kernel()
  File "/Users/scott/anaconda/lib/python2.7/site-packages/bipython-0.1.3._f261b78_-py2.7.egg/bipython/__init__.py", line 817, in connect_ipython_kernel
    self.send_ipython = kc.shell_channel.execute
AttributeError: 'ZMQSocketChannel' object has no attribute 'execute'

I'd really like to use bipython.

hey hi

Hey,

talked earlier today at pycon. Here is an issue, as promised. Ima take a look at the bpython code and see whats up.

Immediately fails on startup (SyntaxError)

What I did:

sudo pip install bipython
ipython console &
bipython

This is the traceback:

Traceback (most recent call last):
  File "/usr/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.4/site-packages/bipython/__init__.py", line 161
    print sys.exc_info()
            ^
   SyntaxError: invalid syntax

EDIT: I saw that you don't support Python 3 yet. However running it under python 2 yielded a different error.

sudo pip2 install bipython
ipython2 console &
bipython

Traceback (most recent call last):
  File "/usr/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
  File "/usr/lib/python2.7/site-packages/bipython/__init__.py", line 1769, in main
    myrepl = URWIDRepl(event_loop, palette, interpreter, config)
  File "/usr/lib/python2.7/site-packages/bipython/__init__.py", line 651, in __init__
    self.ipython = self.connect_ipython_kernel()
  File "/usr/lib/python2.7/site-packages/bipython/__init__.py", line 738, in connect_ipython_kernel
    self.send_ipython = kc.shell_channel.execute
AttributeError: 'ZMQSocketChannel' object has no attribute 'execute'

Unexpected error

When i try to run on a virtualenv i got this error:
Traceback (most recent call last):
File "/home/cassiobotaro/.virtualenvs/engenharia/bin/bipython", line 9, in
load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
File "/home/cassiobotaro/.virtualenvs/engenharia/local/lib/python2.7/site-packages/bipython/init.py", line 1769, in main
myrepl = URWIDRepl(event_loop, palette, interpreter, config)
File "/home/cassiobotaro/.virtualenvs/engenharia/local/lib/python2.7/site-packages/bipython/init.py", line 651, in init
self.ipython = self.connect_ipython_kernel()
File "/home/cassiobotaro/.virtualenvs/engenharia/local/lib/python2.7/site-packages/bipython/init.py", line 708, in connect_ipython_kernel
self.echod(":IPython " + s + " failed", "Info")
TypeError: echod() takes exactly 2 arguments (3 given)

IPython version dependency

setup.py claims >= 0.12, but it does not appear to work with 1.2.1 or 1.1.0:

[~]$ ipython
Python 2.7.3 | 64-bit | (default, Aug  8 2013, 05:37:06)
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

[~]
|1>
Do you really want to exit ([y]/n)?
[~]$ bipython
Traceback (most recent call last):
  File "/Users/rkern/Library/Enthought/Canopy_64bit/User/bin/bipython", line 10, in <module>
    sys.exit(main())
  File "/Users/rkern/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bipython/__init__.py", line 1769, in main
    myrepl = URWIDRepl(event_loop, palette, interpreter, config)
  File "/Users/rkern/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bipython/__init__.py", line 651, in __init__
    self.ipython = self.connect_ipython_kernel()
  File "/Users/rkern/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bipython/__init__.py", line 712, in connect_ipython_kernel
    km.load_connection_file()
  File "/Users/rkern/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/kernel/connect.py", line 495, in load_connection_file
    setattr(self, name, cfg[name])
KeyError: 'control_port'

IPython.core.profiledir.ProfileDirError: Profile directory not found in paths: profile_default

Traceback (most recent call last):
File "/usr/local/bin/bipython", line 9, in
load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bipython/init.py", line 1769, in main
myrepl = URWIDRepl(event_loop, palette, interpreter, config)
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bipython/init.py", line 651, in init
self.ipython = self.connect_ipython_kernel()
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bipython/init.py", line 706, in connect_ipython_kernel
fullpath = find_connection_file(s.lstrip().rstrip())
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/kernel/connect.py", line 212, in find_connection_file
profile_dir = ProfileDir.find_profile_dir_by_name(get_ipython_dir(), 'default')
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/profiledir.py", line 264, in find_profile_dir_by_name
raise ProfileDirError('Profile directory not found in paths: %s' % dirname)
IPython.core.profiledir.ProfileDirError: Profile directory not found in paths: profile_default

Not pip installable

$ sudo pip2.7 install --upgrade bipython
Downloading/unpacking bipython
  Could not find any downloads that satisfy the requirement bipython
[…]
$ sudo pip3.3 install --upgrade bipython
Downloading/unpacking bipython
  Could not find any downloads that satisfy the requirement bipython
[…]

Python 3 compatible?

bipython installs fine on Python 3.3 here, however:

$ bipython
Traceback (most recent call last):
  File "/usr/local/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
  File "/usr/local/lib/python3.3/dist-packages/pkg_resources.py", line 351, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.3/dist-packages/pkg_resources.py", line 2363, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.3/dist-packages/pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python3.3/dist-packages/bipython/__init__.py", line 161
    print sys.exc_info()
            ^
SyntaxError: invalid syntax

Is bipython meant to be Python 3 compatible?

SyntaxError: invalid syntax

Traceback (most recent call last):
File "/home/fjc/.pyenv/versions/3.5.0/bin/bipython", line 9, in
load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
File "/home/fjc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/init.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/fjc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/init.py", line 2697, in load_entry_point
return ep.load()
File "/home/fjc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/init.py", line 2370, in load
return self.resolve()
File "/home/fjc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/init.py", line 2376, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/home/fjc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/bipython/init.py", line 161
print sys.exc_info()
^
SyntaxError: invalid syntax

Make prompt configurable (better: use ipython prompt)

This is what I have in ipython:

powerline prompt

. And this is bipython:

bipython prompt

. I guess it is easy to see the difference:

  • bipython version uses only one color
  • bipython prompt is hard to see on dark background
  • bipython prompt does not provide information about virtual env (and any other information that powerline may be configured to display, but currently is not)

. I have checked out bipython code, but did not find any standard way to configure prompt. Worse, I have not found standard way to use different colors inside the prompt, so I cannot hack it like I did with old ipython (if you check out powerline code you will see that I had to add three classes with custom __str__ of which one is proxy class with custom __add__ just to forbid old ipython to leave me with plain ASCII).

bipython prints more lines than ipython, and many more than bpython

I'm seeing a lot of blank lines that don't appear in ipython or bpython, and statements that don't produce any output sometimes get echoed. Sometimes not. I can't figure out exactly what circumstances cause the echoing. Example:

bpython:

>>> import time
>>> time.sleep(1)
>>> 

ipython:

In [1]: import time

In [2]: time.sleep(1)

In [3]: 

bipython:

In [1]: import time


In [3]: time.sleep(1)


In [3]: time.sleep(1)  #white

In [3]:                #blue

In [4]:                #blue

Entering empty statements also produces the echoing:

In [6]: 1   #blue

Out[6]: 1   #red

In [7]:     #blue


In [7]:     #white

In [7]:     #blue


In [7]:     #white

In [7]:     #blue

URWIDRepl.echod: two arguments or three?

On the current master, URWIDRepl.echod is defined to take one non-self argument, but in some places, like connect_ipython_kernel, it's called with two non-self arguments. That gave me this error (when trying to print another error):

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bipython-0.1.2-py2.7.egg/bipython/__init__.py", line 1769, in main
    myrepl = URWIDRepl(event_loop, palette, interpreter, config)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bipython-0.1.2-py2.7.egg/bipython/__init__.py", line 651, in __init__
    self.ipython = self.connect_ipython_kernel()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bipython-0.1.2-py2.7.egg/bipython/__init__.py", line 708, in connect_ipython_kernel
    self.echod(":IPython " + s + " failed", "Info")
TypeError: echod() takes exactly 2 arguments (3 given)

What's the intended signature?

Cannot install on Windows 8 64

Getting the error "Mircrosoft Visual C++ 10.0 is required (Unable to find vcvarshall.bat" during pip install.

Then if I try to run bipython, I get "fcntl" is not defined.

Could you provide a wheel for it ?

bipython can't find ipython dependency

I installed bipython via pip on OSX. When trying to start it, I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/bipython", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: ipython>=1.0

I definitely have ipython installed:

$ pip freeze
...
ipython==3.1.0
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.