Advertisement
hackedprofile

TestPythonPackage

Aug 11th, 2021 (edited)
1,311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.47 KB | None | 0 0
  1. # Importing chocolate script and stylesheet
  2.  
  3. import chocolatescript.chocolate as app
  4. from chocolatescript.chocolate import style
  5.  
  6. # Start of the app
  7.  
  8. # Does app.chocolate(), chocolatescripts version of hello world
  9.  
  10. app.chocolate()
  11.  
  12. # Creates two spaces in between the header and the user input
  13. app.linebreak()
  14. app.linebreak()
  15. app.linebreak()
  16. app.linebreak()
  17.  
  18. # Displays header on the screen
  19. app.display("header", "Hey! I'm a header!")
  20.  
  21. app.linebreak()
  22. app.linebreak()
  23.  
  24. # Displays a user input dialog on the screen
  25. app.display("capture", "Hey I'm a capture. I take user input! ")
  26.  
  27. app.linebreak()
  28.  
  29. # Displays an info message on the screen
  30. app.display("info", "Hey! I'm info, I display information!")
  31.  
  32. app.linebreak()
  33.  
  34. # Displays plain text on the screen
  35. app.display("write", "I'm just plain ol' text.")
  36.  
  37. app.linebreak()
  38.  
  39. # Displays an error on the screen
  40. app.display("error", "Uh oh, I'm an error!")
  41.  
  42. app.linebreak()
  43.  
  44. # Displays a warning on the screen
  45. app.display("warn", "I'm a warning, and I'm here to warn you that the next message will take 5 seconds to display using wait()")
  46.  
  47. app.linebreak()
  48. # Waits 5 seconds to continue the script
  49. app.wait(5)
  50.  
  51. app.display("info", "I loaded!")
  52.  
  53. app.linebreak()
  54. app.linebreak()
  55.  
  56. app.display("header", "Ip Tools")
  57.  
  58. app.linebreak()
  59. app.linebreak()
  60.  
  61. app.display("info", "Below is your private ip!")
  62.  
  63. app.linebreak()
  64. # Get your ip, mode 1 meaning private ip
  65. app.getip(1)
  66. app.linebreak()
  67. app.linebreak()
  68.  
  69. app.display("info", "Below is your public ip!")
  70.  
  71. app.linebreak()
  72. # Get your ip, mode 2 meaning public ip
  73. app.getip(2)
  74.  
  75. app.linebreak()
  76. app.linebreak()
  77. app.linebreak()
  78.  
  79. # Style Sheet to make colors
  80.  
  81. app.display("header", "Stylesheet", style.UNDERLINE)
  82.  
  83. app.linebreak()
  84. app.linebreak()
  85.  
  86. # List of colors
  87.  
  88. app.display("info", "This is color black", style.BLACK)
  89. app.display("info", "This is color red", style.RED)
  90. app.display("info", "This is color green", style.GREEN)
  91. app.display("info", "This is color yellow", style.YELLOW)
  92. app.display("info", "This is color blue", style.BLUE)
  93. app.display("info", "This is color megenta", style.MAGENTA)
  94. app.display("info", "This is color cyan", style.CYAN)
  95. app.display("info", "This is color white", style.WHITE)
  96. app.display("info", "This text has an underline", style.UNDERLINE)
  97. app.display("info", "This text has no style, using style.NONE. However another way you could do this is by typing nothing and leaving the third paramater blank.", style.NONE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement