New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for bpython. #270

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
7 participants
@barraponto
Contributor

barraponto commented Mar 14, 2013

bpython is a fancy interface to the Python interpreter, with lots of features like syntax highlight (using pygments), autocomplete and pastebin support.

This is a trivial patch, we might rethink the start_python_console arguments in order to let the user choose which console the user wants. This code defaults to bpython if it is available, falls back to IPython and, finally, python if no fancier interpreter is around.

@stav

This comment has been minimized.

Show comment
Hide comment
@stav

stav Mar 14, 2013

Contributor

+1 for bpython

Contributor

stav commented Mar 14, 2013

+1 for bpython

@artemdevel

This comment has been minimized.

Show comment
Hide comment
@artemdevel

artemdevel Mar 14, 2013

Contributor

maybe better to add a setting into .scrapy.cfg so a user could set preferred console there?

Contributor

artemdevel commented Mar 14, 2013

maybe better to add a setting into .scrapy.cfg so a user could set preferred console there?

@barraponto

This comment has been minimized.

Show comment
Hide comment
@barraponto

barraponto Mar 14, 2013

Contributor

@artem-dev yes, I think it'd be great. I thought of adding it to scrapy.cfg but while this makes sense as a project override, it definitely should be set user-wide. I wasn't aware of a .scrapy.cfg though. Cool!

Contributor

barraponto commented Mar 14, 2013

@artem-dev yes, I think it'd be great. I thought of adding it to scrapy.cfg but while this makes sense as a project override, it definitely should be set user-wide. I wasn't aware of a .scrapy.cfg though. Cool!

@stav

This comment has been minimized.

Show comment
Hide comment
@stav

stav Mar 21, 2013

Nice, i like this, works for me.

stav commented on 5676469 Mar 21, 2013

Nice, i like this, works for me.

@nramirezuy

This comment has been minimized.

Show comment
Hide comment
@nramirezuy

nramirezuy Oct 14, 2013

Member

@barraponto Can you fix this PR?

Member

nramirezuy commented Oct 14, 2013

@barraponto Can you fix this PR?

@barraponto

This comment has been minimized.

Show comment
Hide comment
@barraponto

barraponto Oct 14, 2013

Contributor

Yeah, I'll give it a try. Never dug into scrapy configurations, but I think it'll be a nice experience.

Contributor

barraponto commented Oct 14, 2013

Yeah, I'll give it a try. Never dug into scrapy configurations, but I think it'll be a nice experience.

nyov added a commit to nyov/scrapy that referenced this pull request Mar 24, 2015

bpython console: support configuration from scrapy.cfg
example:

cat <<EOF >> ~/.scrapy.cfg
[settings]
console = python
EOF

(closes scrapy#270)

nyov added a commit to nyov/scrapy that referenced this pull request Mar 24, 2015

bpython console: support configuration from scrapy.cfg
example:

cat <<EOF >> ~/.scrapy.cfg
[settings]
console = python
EOF

(closes scrapy#270, scrapy#1100)
@nyov

This comment has been minimized.

Show comment
Hide comment
@nyov

nyov Mar 24, 2015

Contributor

So I've rebased this and added a scrapy.cfg setting for it. I hope this could get merged now.

Contributor

nyov commented Mar 24, 2015

So I've rebased this and added a scrapy.cfg setting for it. I hope this could get merged now.

nyov added a commit to nyov/scrapy that referenced this pull request Mar 25, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Mar 25, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Mar 25, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Mar 25, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Mar 26, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Mar 27, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Mar 27, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Apr 1, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Apr 2, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Apr 5, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)
@pablohoffman

This comment has been minimized.

Show comment
Hide comment
@pablohoffman

pablohoffman Apr 15, 2015

Member

shouldn't we give users the option to select which one to use (via setting or something)?. I've used both (have both installed) and feel more comfortable with IPython for Scrapy shell. Milages may vary here.

Member

pablohoffman commented Apr 15, 2015

shouldn't we give users the option to select which one to use (via setting or something)?. I've used both (have both installed) and feel more comfortable with IPython for Scrapy shell. Milages may vary here.

@dangra

This comment has been minimized.

Show comment
Hide comment
@dangra

dangra Apr 16, 2015

Member

+1 to some way of personal choice like ~/.scrapy.cfg or similar, keeping the default to IPython if installed.

Member

dangra commented Apr 16, 2015

+1 to some way of personal choice like ~/.scrapy.cfg or similar, keeping the default to IPython if installed.

@nramirezuy

This comment has been minimized.

Show comment
Hide comment
@nramirezuy

nramirezuy Apr 16, 2015

Member

@pablohoffman @dangra we have 2 ways in here; we could also support custom shells.

Member

nramirezuy commented Apr 16, 2015

@pablohoffman @dangra we have 2 ways in here; we could also support custom shells.

@nyov

This comment has been minimized.

Show comment
Hide comment
@nyov

nyov Apr 27, 2015

Contributor

There are the

~/.scrapy.cfg:
    [settings]
    shell = bpython

and SCRAPY_PYTHON_SHELL=ipython scrapy
options for user configuration now,

with the support for $XDG_CONFIG_HOME from #1098
we also support ~/.config/scrapy.cfg here.

Contributor

nyov commented Apr 27, 2015

There are the

~/.scrapy.cfg:
    [settings]
    shell = bpython

and SCRAPY_PYTHON_SHELL=ipython scrapy
options for user configuration now,

with the support for $XDG_CONFIG_HOME from #1098
we also support ~/.config/scrapy.cfg here.

nyov added a commit to nyov/scrapy that referenced this pull request Apr 27, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request May 15, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Jul 10, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Jul 11, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Jul 17, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be used as the interactive python console, if available.
# (default is ipython, fallbacks in the order listed above)
shell = python
EOF

(closes scrapy#270, scrapy#1100)

nyov added a commit to nyov/scrapy that referenced this pull request Jul 21, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be tried as the interactive python console
# (in above order, unless set here).
shell = python
EOF

(closes scrapy#270, scrapy#1100, scrapy#1301)

nyov added a commit to nyov/scrapy that referenced this pull request Aug 15, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be tried as the interactive python console
# (in above order, unless set here).
shell = python
EOF

(closes scrapy#270, scrapy#1100, scrapy#1301)

nyov added a commit to nyov/scrapy that referenced this pull request Aug 21, 2015

Add support for bpython console.
Adds support for configuration of shells from scrapy.cfg
and SCRAPY_PYTHON_SHELL.

config snippet:

cat <<EOF >> ~/.scrapy.cfg
[settings]
# shell can be one of ipython, bpython or python;
# to be tried as the interactive python console
# (in above order, unless set here).
shell = python
EOF

(closes scrapy#270, scrapy#1100, scrapy#1301)

@kmike kmike closed this in 509cc8d Aug 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment