Code Monkey home page Code Monkey logo

Comments (8)

gojuukaze avatar gojuukaze commented on June 6, 2024

你用的是python2吗

from terminal_layout.

miss85246 avatar miss85246 commented on June 6, 2024

不是呀, 用的是python3.8

from terminal_layout.

gojuukaze avatar gojuukaze commented on June 6, 2024

你用的是什么终端软件,感觉应该是终端不适配。

你可以直接用python运行这个看看会不会报错:

import os
print(os.get_terminal_size())

from terminal_layout.

miss85246 avatar miss85246 commented on June 6, 2024

image

os.terminal_size(columns=120, lines=30)

显示的是这个,我觉得应该没有关系吧. 我用的是 windows terminal python 3.8.5

from terminal_layout.

gojuukaze avatar gojuukaze commented on June 6, 2024

你运行样例会出错吗,如果样例能运行的话需要你贴一下能复现的代码

from terminal_layout.

miss85246 avatar miss85246 commented on June 6, 2024

抱歉, 我昨天说错了, 我今天复现了问题, 发现是因为在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.

gojuukaze avatar gojuukaze commented on June 6, 2024

这个库是依赖于终端提供的功能来运行的,如果直接在pycharm里点run是不行的。

只是为了调试的话可以设置 ctl.debug=True ,这样虽然能输出但每次输出都会从新的一行开始

from terminal_layout.

miss85246 avatar miss85246 commented on June 6, 2024

好的吧, 那我尽量在终端中进行调试吧, 谢谢

from terminal_layout.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.