V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Northxw
V2EX  ›  Python

Windows 安装 bpython 这个梗该怎么破?

  •  
  •   Northxw · 2018-05-21 23:58:26 +08:00 · 2979 次点击
    这是一个创建于 2138 天前的主题,其中的信息可能已经有所发展或是发生改变。
    找了好多 bpython 安装的博文,唯独 http://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_python_006_bpython.html 这篇写的还行. 踏着步子走完教程,然后终端输入 bpython-curses 成功运行,结果刚敲完一行 for 循环(此时我的内心是无比瘙痒难耐的!),直接崩掉,反馈:AttributeError: module 'fcntl' has no attribute 'LOCK_EX'。

    emmm...其实是没有 fcntl 的,在 stack overflow 上有人说可以建一个 fcntl.py 文件放在 Libs 下面,我照做了(有点坑),然后再没有成功的基础之上才找到了上面 url 的博客. fcntl 的内容如下:

    ---------------------------------------华丽风骚的分隔线---------------------------------------------------
    def fcntl(fd, op, arg=0):
    return 0

    def ioctl(fd, op, arg=0, mutable_flag=True):
    if mutable_flag:
    return 0
    else:
    return ""

    def flock(fd, op):
    return

    def lockf(fd, operation, length=0, start=0, whence=0):
    return

    -----------------------------------------又是一条华丽风骚的分隔线----------------------------------------
    所以,这个梗,各位 V 友,应该怎么破啊?
    zhantss
        1
    zhantss  
       2018-05-22 00:19:19 +08:00 via Android
    有什么需求么?不考虑一下 vs code ? windows 下面也不是很重。
    PythonAnswer
        2
    PythonAnswer  
       2018-05-22 08:24:12 +08:00 via iPhone
    还是用大家都用的 ipy 吧
    SoulMelody
        3
    SoulMelody  
       2018-05-22 10:50:28 +08:00
    wsl or cygwin
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2449 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 15:54 · PVG 23:54 · LAX 08:54 · JFK 11:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.