Code Monkey home page Code Monkey logo

Comments (7)

gojuukaze avatar gojuukaze commented on May 26, 2024

你运行这个demo( https://github.com/gojuukaze/terminal_layout/blob/master/demo/record_demo.py ) 的代码试试会不会闪烁。

如果不会的话需要你提供下可复现这个问题的代码

from terminal_layout.

rty813 avatar rty813 commented on May 26, 2024

20200819_155814 00_00_00-00_00_22.zip
这个偶尔有闪烁,没有那么频繁,可以看到3和4之间闪了一次

from terminal_layout.

rty813 avatar rty813 commented on May 26, 2024

貌似现实的东西越多,越容易出现。因为我这个不是直接使用的,是ssh连接到远程linux上面,再执行的

from terminal_layout.

gojuukaze avatar gojuukaze commented on May 26, 2024

这看起来像是屏幕在layout全部绘制完之前就刷新导致的,可能是系统本身的缓冲区限制,或者终端软件缓冲区限制。

可以尝试下面两个方法:

一、

在创建ctl之前增加下列代码:

import os
import sys
# 100不够的话可以调大点
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 100)

二、

调整putty的缓冲区,或者换xshell试试

from terminal_layout.

rty813 avatar rty813 commented on May 26, 2024

第一种方法没问题了,谢谢,以后要不要考虑把这个缓冲区设置作为一个模块自身的功能呢?

from terminal_layout.

gojuukaze avatar gojuukaze commented on May 26, 2024

第一种方法没问题了,谢谢,以后要不要考虑把这个缓冲区设置作为一个模块自身的功能呢?

嗯,之后版本会增加这个设置的。

from terminal_layout.

rty813 avatar rty813 commented on May 26, 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.