蟒蛇纹优雅

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 JavaFX使对象可见,但不使用(忽略)点击   java LibGdx奇怪的纹理行为   java JavaFx ComboBox在第一次单击时未获得正确的值   api WebDav服务器库最好使用Java   java在Android中维护应用程序状态   java保存在Android中拖放RecyclerView后所做的更改我已经阅读了所有内容   无法读取项目中所需库tomcatembedwebsocket的java存档,或者该存档不是有效的ZIP文件   c#类在系统中有哪些关联?如何在UML中最好地表示它们?   java如何使用bazaar访问两台计算机上的同一文件夹   Java易失性与缓存一致性   java如何解决http11。校长:例外?   java liferaymavenplugin从maven Liferay 6.2.5(6.2 ga6)部署war   安卓的jar for java在哪里。木卫一。文件   java邻接矩阵中BFS的顺序是什么?   虚拟机如何从java启动linux虚拟机?   向DefaultListModel添加元素时java JList未更新   java JMSListener批注无法与REST服务一起使用   java DirectoryStream返回路径的顺序是什么?文件名,上次修改,文件大小?   java DropWizard Hibernate doc想说什么?