This python module can convert a single character or a string into the ASCII value of that character.
To use it, download the cti.py
file, make sure it is in the same folder as the project you are working on and write import cti
cti.example()
takes nothing; will show the basic functions you can do
cti.single()
takes a string of one character; will return an integer
cti.multi()
takes a string of any amount and a boolean; will return a list (array) if the boolean is False
, and a more readable string if True
cti.prtMulti()
takes a string of any amount; will return a list (array) and print a more readable string to the console.
cti.bin()
takes a string of any amount; will return an array of binary values
NOTE: any characters given that are not in the accepted data will return a blank value (0 for single; nothing for multi)
- Add function to print and assign variable
- Fix problem with data amount being limited
- Add more data
- Make a way to convert the characters straight to binary
- Add a function to convert characters into both binary and ASCII values