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

2018-05-21 23:58:26 +08:00
 Northxw
找了好多 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 友,应该怎么破啊?
3047 次点击
所在节点    Python
3 条回复
zhantss
2018-05-22 00:19:19 +08:00
有什么需求么?不考虑一下 vs code ? windows 下面也不是很重。
PythonAnswer
2018-05-22 08:24:12 +08:00
还是用大家都用的 ipy 吧
SoulMelody
2018-05-22 10:50:28 +08:00
wsl or cygwin

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/456673

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX