classes module

class classes.Case(tar)

Bases: object

Define Case Of Switch-Case. Just In Case You Want To Use It Like Case(x).

class classes.Cond(condition)

Bases: object

Thats Just Normal One line Conditions That Exists in C++. ( Inspired From C++ ) You Can Use It Like : * Cond( condition )( if_its_true, if_its_false ) For Example : * Cond(i > j)(i,j) Or Cool Things Like : * Cond(i > j)(minus,add)(i,j) Thats Your Creativity That Makes Your Application Cool :)

class classes.CrossPlatformer(supported_os=['linux', 'windows', 'mac'])

Bases: object

This Class Will Make An Environment For You To Have Easier And Better Experience :)

add_os_commands(name, commands: dict)

Set Command For User Os. Arguments Are : * name : Name Of Command * commands : Dictionary Of Commands For Example : * add_os_commands(“git”, {“linux”: “git”, “windows”: “git.exe”}) Or : * add_os_commands(“clear”, {“linux”: “clear”, “windows”: “cls”, “mac”: “clear”})

get_os_command(name)

Get Command For User Os. Arguments : * name : Command Name For Example :

If You Set add_os_commands(“clear”, {“linux”: “clear”, “windows”: “cls”, “mac”: “clear”}) : * get_os_command(“clear”)

Will Return You The Command Depends On Your Os.

get_os_name()

Get User Os Name

get_os_version()

Get User Os Version

is_os_supported(os_name)

Check If An Os Is Supported

class classes.Default

Bases: object

Default Case Of Switch-Case. Its Not Doing Anything But You Can Use It On Your Switch Cases.

class classes.Loop(*args)

Bases: object

This Option Is Unique Too Pysha. Its Not From Anywhere Else But Anyway I Think Its Not That Cool :/ You Can Use It Like : `Loop(x,y)("Enter Number[_1_][_2_] :",Loop.Modes.Input) # Input Mode Is Default`

### Modes : * Input = 0 * Print = 1

Input Is Where You Want To Get Input Just Not Print The Text In x * y Times. It Will Return x * y Array Contains Inputs. Print Is Where You Want To Just Print The Text In x * y Times.

class Modes(value)

Bases: Enum

An enumeration.

Input = 0
Print = 1
class classes.PercentPrinter(chars=100, pass_color='\x1b[39m', loading_color='\x1b[39m')

Bases: object

Pretty Percent Printer For Loading Some Progress Or Downloading :) In Fact, Its Progressbar Itself :)

config(char_ok, char_loading)

Set char_ok And char_loading For Progressbar.

finish(show=True)

Finishes The Progressbar.

increase(p=1, show=True)

Increses Progressbar In Percents That You Set.

property percent
show(char_ok='#', char_loading='-', end='\n')

This Function Just Shows The Progressbar.

class classes.Switch(var)

Bases: object

The Famous Switch-Case :)

case(tar, func, args=())
cases(all_funcs)

This Function Should Get A Dictionary That Key Is Case And Value Is Function That Will Run On That Case. You Can Pass Lots Of Types For Example : ```

Case(5):
[

func, arguments, kwargs

]

` Or : `

Case(1):

” print(“yay”) “

` Or : `

Case(6):
lambda x,y:

print(x,y)

``` For More Models You Can See Examples.

class classes.Vars

Bases: object

In Case You Want To Define Some Variables In lambdas, You Can Set Attributes Of This Class.

class classes.command

Bases: object

This Class Will Be Use For Fun Part Of This Framework :)

condition(check, p=True, **kwargs)

This Function Act As c++ One Line Condition. You Can Use This Function Like :

condition(‘i > j ? “i Is Grater” : “j Is Grater”’,i=20,j=23)

Output Will Be :

“j Is Grater”

Notes & Warnings :

-> ‘(Quotes) Are Not Working, Always Use “(Double Quotes)

exe(string, priority=0, strip_response=True)

In Progress But This Function Should Get Text Between () Of $(cmd) And Run It In Terminal Then Replace The Output With $(cmd) And Should Get #(cmd) Too And Run It As Python Code And Replace This Output Too.

Problem Now :

Use This 2 Thing Together.

Args :

  • string -> The String Pattern That You Want To Make.

  • priority -> If Its 0 First System Commands Will Replace Then

    Python Commands Will Replace. And If Its 1 First Python Commands Will Replace Then System Commands Will Be Replaced. Default Is 0.

  • strip_response -> Default Is True. It Wanted To Know That Your

    String That Replaced Should Be striped ? ( Remove Addtion New Lines And Spaces In Start And End Of String ? )

Example :

  • exe(“You Current Directory :

$(dir)

Finished :)”)

loop(cmd, mode='p', c=True)

2 Types Of Loop Currently Exists. i(Input) and p(Print) Mode. In print mode you can make a print loop like that : `<i:3>{You Are In _i_ Loop}` And This Will Be Printed Like That : `You Are In 0 Loop` `You Are In 1 Loop` `You Are In 2 Loop`

And In Input Mode You Can Do This : `<i:3>{Enter _i_ Number : }` It Will Get 3 Input Like This : `Enter 0 Number : (input0)` `Enter 1 Number : (input1)` `Enter 2 Number : (input2)` And Will Return [input0,input1,input2]

More Options : `<i:3>{Enter _i++_ Number : }` `<i:3>{Enter _i--_ Number : }` `<i:2,j:2>{Enter Row _i++_ And Column _j++_  Number : }` `<i:2>{Enter (Fore.CYAN)[_i++_] Number : }`

Notes : * Just Maded Maximum For 2 Variables Not More.

property mode