Comments (8)
你用的是python2吗
from terminal_layout.
不是呀, 用的是python3.8
from terminal_layout.
你用的是什么终端软件,感觉应该是终端不适配。
你可以直接用python运行这个看看会不会报错:
import os
print(os.get_terminal_size())
from terminal_layout.
os.terminal_size(columns=120, lines=30)
显示的是这个,我觉得应该没有关系吧. 我用的是 windows terminal python 3.8.5
from terminal_layout.
你运行样例会出错吗,如果样例能运行的话需要你贴一下能复现的代码
from terminal_layout.
抱歉, 我昨天说错了, 我今天复现了问题, 发现是因为在pycahrm内直接运行导致的:
Traceback (most recent call last):
File "F:/PythonCode/SNS/EPAS/views/aa.py", line 3, in <module>
print(os.get_terminal_size())
OSError: [WinError 6] 句柄无效。
有什么办法能够在pycharm内运行吗?
我的pycharm 版本是 20.2.4
from terminal_layout.
这个库是依赖于终端提供的功能来运行的,如果直接在pycharm里点run是不行的。
只是为了调试的话可以设置 ctl.debug=True
,这样虽然能输出但每次输出都会从新的一行开始
from terminal_layout.
好的吧, 那我尽量在终端中进行调试吧, 谢谢
from terminal_layout.
Related Issues (14)
- 关于刷新出现的问题 HOT 5
- choice 中导入后会自动产生 termina_layout.log 日志,实际上没有用到日志 HOT 1
- 能添加自定义样式吗? HOT 1
- 一屏显示不够或一行折行的情况 HOT 1
- window下pycharm中使用时,无法上下选择 HOT 7
- tablelayout行数超过屏幕显示范围时显示异常 HOT 2
- get_terminal_size 函数报错 HOT 3
- TextView 设置 Overflow.hidden_left 报错
- 每次刷新的时候,屏幕都会闪一下 HOT 7
- Can you test the upgrade the colorama dependencies,for which I want to use tox? HOT 2
- 在某些Linux设备上,无法显示中文 HOT 11
- install error HOT 1
- 为什么无法使用set_text? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal_layout.