A magical extendable paper :)
Project description
MagicPaper
A magical extendable paper to have fun with ...
Just like someone who said: it's not much, but it's honest work :) .
What's this?
It's just papers in terminal! You can create combinations of them that leads to something interesting ...
Let's try
It's just simple (as it is)
from magic_paper import Paper
paper = Paper()
print(paper)
+---------+
|█████████|
|█████████|
|█████████|
+---------+
Now combine them ...
paper = Paper(right=Paper(bottom=Paper(right=Paper())))
print(paper)
+---------+---------+
|█████████|█████████|
|█████████|█████████|
|█████████|█████████|
+---------+---------+---------+
|█████████|█████████|
|█████████|█████████|
|█████████|█████████|
+---------+---------+
You can change sizes
vertical_paper = Paper(width=3)
print(vertical_paper)
horizontal_paper = Paper(height=1)
print(horizontal_paper)
combined = Paper(width=3, bottom=Paper(height=1))
print(combined)
+---+
|███|
|███|
|███|
+---+
+---------+
|█████████|
+---------+
+---+
|███|
|███|
|███|
+---------+
|█████████|
+---------+
You can use EmptyPaper
for gaps.
from magic_paper import EmptyPaper, Paper
combined = Paper(
height=1,
bottom=Paper(
width=3,
bottom=EmptyPaper(
bottom=Paper(
width=3,
bottom=Paper(
height=1,
right=EmptyPaper(height=1, right=Paper(height=1), bring_back=True),
),
),
bring_back=True,
),
),
right=EmptyPaper(
height=1,
right=Paper(
height=1,
bottom=EmptyPaper(
width=5,
right=Paper(
width=3,
bottom=EmptyPaper(
bring_back=True,
bottom=Paper(
width=3,
),
),
),
bring_back=True,
),
),
bring_back=True,
),
)
print(combined)
+---------+ +---------+
|█████████| |█████████|
+---+-----+ +-----+---+
|███| |███|
|███| |███|
|███| |███|
+---+ +---+
+---+ +---+
|███| |███|
|███| |███|
|███| |███|
+---------+ +---------+
|█████████| |█████████|
+---------+ +---------+
Use >>
, <<
, /
, ^
to create new combination of papers.
maze = (
Paper()
>> (
Paper()
/ ( # Guess what this dose ...
Paper()
>> (
Paper()
>> (
Paper()
>> (
Paper() # <- On top of this <-
# |
^ ( #----- Attach everything inside this ( ) ----
# |
Paper() # <------------ this ------------- |
# | |
<< Paper() # Attach this on the left of -- |
# |
) # ---------------------------------------------
)
)
)
)
)
)
print(maze)
How it's going to looks like:
------>-------->-------
+---------+---------+ +---------+---------+ |
|█████████|█████████| |█████████|█████████| |
|█████████|█████████| |█████████|█████████| v
|█████████|█████████| |█████████|█████████| |
+---------+---------+---------+---------+---------+ |
--<------ |█████████|█████████|█████████|█████████| |
^ |█████████|█████████|█████████|█████████| |
| |█████████|█████████|█████████|█████████| v
| +---------+---------+---------+---------+ |
--------<---------<--------<---------<-------
Now it's time for you to imagine ...
zero_six_seven = Paper(
right=Paper(
right=Paper(
right=EmptyPaper(
right=Paper(
right=Paper(
right=Paper(
right=EmptyPaper(
right=Paper(
right=Paper(
right=Paper(
bottom=Paper(
bottom=Paper(
bottom=Paper(bottom=Paper())
)
)
)
)
),
bring_back=True,
),
bottom=Paper(
bottom=Paper(
bottom=Paper(
bottom=Paper(
left=Paper(
left=Paper(
top=Paper(
top=Paper(right=Paper())
)
)
)
)
)
)
),
)
)
),
bring_back=True,
),
bottom=Paper(
bottom=Paper(
bottom=Paper(
bottom=Paper(
left=Paper(
left=Paper(top=Paper(top=Paper(top=Paper())))
)
)
)
)
),
)
)
)
print(zero_six_seven)
You will need an screen with higher width, if shape below looks wired!
+---------+---------+---------+ +---------+---------+---------+ +---------+---------+---------+
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|█████████|█████████|
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|█████████|█████████|
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|█████████|█████████|
+---------+---------+---------+ +---------+---------+---------+ +---------+---------+---------+
|█████████| |█████████| |█████████| |█████████|
|█████████| |█████████| |█████████| |█████████|
|█████████| |█████████| |█████████| |█████████|
+---------+ +---------+ +---------+---------+---------+ +---------+
|█████████| |█████████| |█████████|█████████|█████████| |█████████|
|█████████| |█████████| |█████████|█████████|█████████| |█████████|
|█████████| |█████████| |█████████|█████████|█████████| |█████████|
+---------+ +---------+ +---------+---------+---------+ +---------+
|█████████| |█████████| |█████████| |█████████| |█████████|
|█████████| |█████████| |█████████| |█████████| |█████████|
|█████████| |█████████| |█████████| |█████████| |█████████|
+---------+---------+---------+ +---------+---------+---------+ +---------+
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|
+---------+---------+---------+ +---------+---------+---------+ +---------+
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
MagicPaper-1.1.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for MagicPaper-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3badbd336b66f4c721f58028e489fd835b21af9458f98d0730a6638e6da1ad29 |
|
MD5 | 9dd0a1d50c57adf915f851747786afe0 |
|
BLAKE2b-256 | 5ac863ed791996cc3f04a5d3f67ba4f79ed6b6fddb25afd6683a844c58c68e97 |