蟒蛇纹优雅

pyprel的Python项目详细描述


pyprel

雅致的Python印花

设置

pip install pyprel

简介

此模块提供python呈现功能。它可以呈现 字典,以便显示缩进以供说明 等级:

sample information:
  name: ttH
  generator: pythia8
  cross section: 0.055519
  variables:
    zappo_n: 9001
    trk_n: 147
  number of events: 124883
  k factor: 1.0201
  ID: 169888

它可以渲染和显示徽标:

  ____      _            _____ _
 / ___|___ | | ___  _ __|  ___| | _____      __
| |   / _ \| |/ _ \| '__| |_  | |/ _ \ \ /\ / /
| |__| (_) | | (_) | |  |  _| | | (_) \ V  V /
 \____\___/|_|\___/|_|  |_|   |_|\___/ \_/\_/

它可以将文本块居中,以便终端输出(例如 上面的标志)。它可以渲染段显示:

 _     _  _     _  _  _  _  _
| |  | _| _||_||_ |_   ||_||_|
|_|  ||_  _|  | _||_|  ||_| _|

它可以呈现和显示各种指定宽度和列的表 具有各种文字环绕功能和分隔符的宽度:

|---------------------------------------------------|
|heading 1                |heading 2                |
|---------------------------------------------------|
|some text                |some more text           |
|---------------------------------------------------|
|lots and lots and lots   |some more text           |
|and lots and lots of text|                         |
|---------------------------------------------------|
|---------------------------|
|heading 1    |heading 2    |
|---------------------------|
|some text    |some more    |
|             |text         |
|---------------------------|
|lots and lots|some more    |
|and lots and |text         |
|lots and lots|             |
|of text      |             |
|---------------------------|
||----------------------------------------------------||
||heading 1                ||heading 2                ||
||----------------------------------------------------||
||some text                ||some more text           ||
||----------------------------------------------------||
||lots and lots and lots   ||some more text           ||
||and lots and lots of text||                         ||
||----------------------------------------------------||
|-----------------------------------------------------------------------------|
|heading 1                |heading 2                |heading 3                |
|-----------------------------------------------------------------------------|
|some text                |some more text           |even more text           |
|-----------------------------------------------------------------------------|
|lots and lots and lots   |some more text           |some more text           |
|and lots and lots of text|                         |                         |
|-----------------------------------------------------------------------------|
|---------------------------------------------------------------------------|
|heading 1         |heading 2         |heading 3         |heading 4         |
|---------------------------------------------------------------------------|
|some text         |some more text    |even more text    |yeah more text    |
|---------------------------------------------------------------------------|
|lots and lots and |some more text    |some more text    |some more text    |
|lots and lots and |                  |                  |                  |
|lots of text      |                  |                  |                  |
|---------------------------------------------------------------------------|

它可以提供调色板,扩展它们并保存它们的图像。 通过保存可用调色板的图像,可以查看它们:

pyprel.save_images_of_palettes()

调色板可以使用其名称加载:

pyprel.access_palette(name="palette1")

调色板可以扩展到所需的颜色数:

colors_1_extended=extend_palette(colors=colors_1,minimum_number_of_colors_needed=15)

调色板

image0image1image2image3image4image5image6image7image8image9image10image11image12image13image14image15image16image17image18image19image20image21

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java损坏的文件处理   基于java注释的ServiceLocatoryBean?   java HashMap:将arraylist设置为一组键或值   java无法执行dex:多个dex文件定义Lcom/google/安卓/gms/analytics/internal/Command   Java 8 Streams map API解释方法参考   java如何保护安卓中的sqlite db不被窃取   java微调器NullPointerException   Java Eclipse Vlcj Java本机访问(JNA)   Spring中的java CompositeItemReader   java组织。冬眠QueryException:无法解析属性,但HQL有效   字符串错误:java。lang.OutOfMemoryError:Java堆空间   当identity_insert设置为OFF时,java无法在表“bulto”中为identity列插入显式值。冬眠   Jboss中的java表达式语言API   一个消费者正在读取数据   在没有StringBuilder的Java中反转字符串   JavaEclipsePDE构建/导出插件/功能/更新站点不支持文件编码如何禁止重新编译   java Google应用程序引擎分前端和后端   java Spring无法加载JDBC驱动程序类错误   java二叉树的高度:为什么这个解决方案不能通过hackerrank中的2/6测试用例?