mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-01-13 18:52:03 +05:30
generate_C_lang_token.py: do TODO 1
This commit is contained in:
parent
371f8819de
commit
60858de021
@ -4,16 +4,13 @@
|
|||||||
#
|
#
|
||||||
# Author: Intel A80486DX2-66
|
# Author: Intel A80486DX2-66
|
||||||
# License: Unlicense
|
# License: Unlicense
|
||||||
#
|
|
||||||
# TODO: If the generated token starts with `__`, replace the first 2 characters
|
|
||||||
# to a random [A-Za-z]{2,2} string
|
|
||||||
|
|
||||||
from random import choice
|
from random import choice
|
||||||
from string import ascii_lowercase, ascii_uppercase, digits
|
from string import ascii_lowercase, ascii_uppercase, digits
|
||||||
from sys import argv, stdin
|
from sys import argv, stdin
|
||||||
|
|
||||||
first_char_alphabet = ascii_uppercase + ascii_lowercase + "_"
|
first_char_alphabet = ascii_uppercase + ascii_lowercase
|
||||||
alphabet = first_char_alphabet + digits
|
alphabet = first_char_alphabet + digits + "_"
|
||||||
|
|
||||||
random_token = lambda n: \
|
random_token = lambda n: \
|
||||||
"".join( \
|
"".join( \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user