Skip to content
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 from
Closed

Conversation

@barraponto
Copy link
Contributor

@barraponto 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
Copy link
Contributor

@stav stav commented Mar 14, 2013

+1 for bpython

@artemdevel
Copy link

@artemdevel artemdevel commented Mar 14, 2013

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

@barraponto
Copy link
Contributor Author

@barraponto 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.

Copy link

@stav stav commented on 5676469 Mar 21, 2013

Nice, i like this, works for me.

@nramirezuy
Copy link
Contributor

@nramirezuy nramirezuy commented Oct 14, 2013

@barraponto Can you fix this PR?

@barraponto
Copy link
Contributor Author

@barraponto 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
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
example:

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

(closes scrapy#270, scrapy#1100)
@nyov
Copy link
Contributor

@nyov 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
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
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
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
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
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
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
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
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
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
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
Copy link
Member

@pablohoffman 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
Copy link
Member

@dangra 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
Copy link
Contributor

@nramirezuy nramirezuy commented Apr 16, 2015

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

@nyov
Copy link
Contributor

@nyov 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
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
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
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
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
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
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
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
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
lucywang000 pushed a commit to lucywang000/scrapy that referenced this pull request Feb 24, 2019
improve english in frontier-backends.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.