debug
Project description
My Library
สรุปภาษาไทย ตัวหลักของ library นี้ ใด้แก่ ij() และ ji() หรือถ้าให้ง่ายที่สุด เอาโค้ดตัวอย่างไปลองรันใด้เลย ################################################ #Working example #This run should be the easiest to understand. from iprint import * a = 'icecomet'
ij(); ij(); ij() ij('--------------------------------------------',c=ct.blue) ij(a) ij(a,'i'); ij(a,'t'); ij(a,'l') #The second attribute can contain 3 characters: i>value, l>len, t>type. ij('--------------------------------------------',c=ct.blue) ij(a,'tl') #Arrange them any way you want. ij('--------------------------------------------',c=ct.blue) ij(a,'itl') #Arrange them any way you want. ij('--------------------------------------------',c=ct.blue) ij('--------------------------------------------',c=ct.greenk) ###################################################################################### ji(end=' >> '); ji(end=' >> '); ji() ij('--------------------------------------------',c=ct.sky) ji('icecomet',c=ct.red) ji('luna',c=ct.blue) ji('luna') ji('icecomet') ji('luna') ji('luna') ################################################ สำหรับตัว ij() จะทำงานคล้ายๆคำสั่งปริ้น ij('หวัดดีชาวไทย') ก็จะเป็นคำสั่งปริ้นตามปกติ(แต่สีเขียว) แต่ที่พิเศษคือ เพิ่ม mode ใด้ ij('หวัดดีชาวไทย',mode) #โหมดจะใส่หรือไม่ใส่ก็ใด้ มีให้เลือก 3 โหมด ; 'i' = print('หวัดดีชาวไทย') 't' = print(type('หวัดดีชาวไทย')) 'l' = print(len('หวัดดีชาวไทย')) วิธีประกาศ ij('หวัดดีชาวไทย','tli') mode จะใส่กี่ตัวหรือเรียงยังไงก็ใด้ โปรแกรมจะทำงานตามลำดับนั้น ถ้าอยากจะเปลี่ยนสี ให้เพิ่มตัวแปรว่า สำหรับ ji(): การทำงานตามนี้เลย def ji(a='',c=ct.jiset,end='\n'): global ji_round if a not in ji_round.keys(): ji_round[a] = (0,c) print(ji_round[a][1]+f"Tag '{a}' Passed : "+str(ji_round[a][0])+ct.set,end=end) ji_round[a] = (ji_round[a][0]+1,ji_round[a][1])
in iprint: for debug Have function ij() and ji() Try running the code below, you should understand it faster than reading the description.; from iprint import * a = 'icecomet'
ij(); ij(); ij()
ij('--------------------------------------------',c=ct.blue)
ij(a)
ij(a,'i'); ij(a,'t'); ij(a,'l') #The second attribute can contain 3 characters: i>value, l>len, t>type.
ij('--------------------------------------------',c=ct.blue)
ij(a,'tl') #Arrange them any way you want.
ij('--------------------------------------------',c=ct.blue)
ij(a,'itl') #Arrange them any way you want.
ij('--------------------------------------------',c=ct.blue)
ij('--------------------------------------------',c=ct.greenk)
######################################################################################
ji(end=' >> '); ji(end=' >> '); ji()
ij('--------------------------------------------',c=ct.sky)
ji('icecomet',c=ct.red)
ji('luna',c=ct.blue)
ji('luna')
ji('icecomet')
ji('luna')
ji('luna')
this code for both function;
ij_round = 0
ji_round = 0
def ij(a='',mode=None,c=ct.ijset,end='\n'):
global ij_round
if a=='':
print(c+'Passed : '+str(ij_round)+ct.set,end=end)
ij_round += 1
elif mode is None or mode =='':
print(f'{c}{a}'+ct.set,end=end)
return a
else :
for i in mode:
if i == 'l':
print(f'{c}จำนวน : {len(a)}'+ct.set,end=end)
elif i == 't':
print(f'{c}ประเภท : {type(a)}'+ct.set,end=end)
elif i == 'i':
print(f'{c}{a}'+ct.set,end=end)
return a
def ji(a='',c=ct.jiset,end='\n'):
global ji_round
print(c+f"Tag '{a}' Passed : "+str(ji_round)+ct.set,end=end)
ji_round += 1
for icolor: ct = object that collect colorText code example ; ct.red = "\033[91m" ct.green = "\033[92m" ct.set = "\033[0m" #Default color use_case example ; #plese run code below import icolor print(ct.red+"This text'color is red"+ct.set) print("And this text'color is Default")
cH = HEX color
example :
cH.main.red = "#FF0000"
cH.main.blue = "#0000FF"
cH.other.cream = "FFF599"
use_case example ; The method of use is the same as ct
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icecomet-1.0.1.tar.gz.
File metadata
- Download URL: icecomet-1.0.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21d349ed0afe7960cb7585389b1eb28fcfe82d1d4ad169a5eb459bc7cc995d46
|
|
| MD5 |
da051b2565b4a1e86a31e6a6d27a4ab7
|
|
| BLAKE2b-256 |
f94640d6f11e8bba3a5b143aecec74cbf7b44b696be5837269df3fc9206493a4
|
File details
Details for the file icecomet-1.0.1-py3-none-any.whl.
File metadata
- Download URL: icecomet-1.0.1-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa97eff68a2d8c8990d6ac51e3f60839627ba48600f860979821f0a0729cf5a4
|
|
| MD5 |
08c2ed1bc2a340cf6519e6f500442719
|
|
| BLAKE2b-256 |
78baeeb984f469e4763e97131be3b2448a850240ddf684d91a45dafd93b16c69
|