|
| 1 | +@Version=Plato-UTF8 |
| 2 | + |
| 3 | +#LIBRARY MODULES |
| 4 | +glob\\global module |
| 5 | +string\\string module |
| 6 | +os\\operating system module |
| 7 | +sys\\system module |
| 8 | +from string import Template |
| 9 | +subprocess\\subprocess module |
| 10 | + |
| 11 | +#STANDARD SYNTAX TEMPLATES |
| 12 | +[[d]].close()\\file dot close template |
| 13 | +[[d]]=open([d],"[r]")\\open file template |
| 14 | +[[d]].write([d])\\file dot write template |
| 15 | +[[d]]=[d]([d])\\function call template |
| 16 | +[[f]].seek([v])\\file dot seek template |
| 17 | +class [d] ([object]):\\class definition template |
| 18 | +def __init__(self [,][d]):\\constructor function template |
| 19 | +def __call__(self [,][d]):\\call function template |
| 20 | +def __iter__(self):\\iterator function template |
| 21 | +def __next__(self):\\next function template |
| 22 | +[[d]].__init__(self,[[d]])\\run super initialisation template |
| 23 | +[[d]].[d]([])\\run super function template |
| 24 | +def [f] ([self]):\\function definition template |
| 25 | +for [i] in [d] :\\for loop template |
| 26 | +if([]):\\if statement template |
| 27 | +elif([c]):\\else if template |
| 28 | +else:\\else template |
| 29 | +glob.glob([])\\global dot global template |
| 30 | +main()\\main function call template |
| 31 | +None\\python null |
| 32 | +if __name__ == "__main__":\\if name is equal to main template |
| 33 | +while([]):\\while loop template |
| 34 | +while(True):\\while true loop |
| 35 | +while(False):\\while false loop |
| 36 | +print("[d]",[d])\\print comma template |
| 37 | +print("[d]"%([d]))\\print percent template |
| 38 | +print("[d]")\\print simple template |
| 39 | + |
| 40 | +#OS FUNCTIONS |
| 41 | +os.chdir([])\\operating system dot change directory |
| 42 | +os.getcwd([])\\operating system dot get current working directory |
| 43 | +os.listdir([])\\operating system dot list directory |
| 44 | +([d],[d])=os.path.splitext([])\\operating system dot path dot split extension |
| 45 | +[[d]]=os.path.basename([])\\operating system dot path dot base name |
| 46 | +os.path.normcase([])\\operating system dot path dot normal case |
| 47 | +os.path.normpath([])\\operating system dot path dot normal path |
| 48 | +os.path.realpath([])\\operating system dot path dot real path |
| 49 | +os.path.dirname([])\\operating system dot path dot directory name |
| 50 | +os.path.expanduser([])\\operating system dot path dot expand user |
| 51 | +os.path.exists([])\\operating system dot path dot exists |
| 52 | +os.path.isfile([])\\operating system dot path dot is file |
| 53 | +os.path.join([])\\operating system dot path dot join |
| 54 | + |
| 55 | + |
| 56 | +#SYSTEM MODULE |
| 57 | +sys.exit([return code])\\system dot exit |
| 58 | + |
| 59 | +#comparison operators |
| 60 | +=\\assignment equals |
| 61 | +==\\comparison equals |
| 62 | +!=\\not equal operator |
| 63 | +<\\less than operator |
| 64 | +>\\greater than operator |
| 65 | +>=\\greater than or equal to operator |
| 66 | +<=\\less than or equal to operator |
| 67 | ++=\\self increment operator |
| 68 | +-=\\self decrement operator |
| 69 | + |
| 70 | +#CODE SNIPPETS |
| 71 | +.py\\dot Python |
| 72 | +{[]}\\empty braces |
| 73 | +([])\\empty parens |
| 74 | +[[]]\\empty squares |
| 75 | +r'[]'\\raw string |
| 76 | +ipy32\\iron python executable |
| 77 | +self.\\self dot |
| 78 | +==True\\is equal to true |
| 79 | +==False\\is not equal to true |
| 80 | +"""\\multiline string start |
| 81 | +"""\\multiline string end |
| 82 | +cmd\\short form for command |
| 83 | +except IOError as e:\\except input output error as |
| 84 | +except SameFileError as e:\\except same file error as |
| 85 | +except [[d]] as e:\\except some error as |
| 86 | +del\\element delete operator |
| 87 | +rstrip([d])\\right strip template |
| 88 | +lstrip([d])\\left strip template |
| 89 | +self.editBox.AppendText([text])\\edit box append text |
| 90 | +self.cmdBox.AppendText([text])\\command box append text |
| 91 | +self.viewBox.AppendText([text])\\view box append text |
| 92 | +self.statusBox.AppendText([text])\\status box append text |
| 93 | +self.scaleBox.AppendText([text])\\scale box append text |
| 94 | +[d]=self.editBox.SelectionStart\\edit box selection start |
| 95 | +a-zA-Z\\match all letters in the alphabet |
| 96 | + |
| 97 | +#RE FUNCTIONS |
| 98 | +$\\match end of line |
| 99 | +^\\match start of line |
| 100 | +[r]=[s].replace([o],[n],[c])\\string dot replace |
| 101 | +[d].group([d])\\match object dot group |
| 102 | +[d].start([d])\\match object dot start |
| 103 | +[d].end([d])\\match object dot end |
| 104 | +[d].span([d])\\match object dot span |
| 105 | +re\\regular expression module |
| 106 | +[m]=re.findall([d],[d])\\regular expression dot find all |
| 107 | +[m]=re.finditer([d],[d])\\regular expression dot find iterator |
| 108 | +[m]=re.match([d],[d])\\regular expression dot match |
| 109 | +[m]=re.search([d],[d])\\regular expression dot search |
| 110 | +[m]=re.sub([d],[d],[d])\\regular expression dot sub |
| 111 | +A-Z\\regular expression uppercase letter range |
| 112 | +a-z\\regular expression lowercase letter range |
| 113 | +A-Za-z\\regular expression letter range |
| 114 | +^A-Za-z\\regular expression not letter range |
| 115 | +0-9\\regular expression digit range |
| 116 | +?P<[d]>\\regular expression named capture group |
| 117 | +?P=[d]\\regular expression named capture group back reference |
| 118 | +?=[[d]]\\regular expression positive look ahead |
| 119 | +?![[d]]\\regular expression negative look ahead |
| 120 | + |
| 121 | + |
| 122 | +#VOICE EDITOR FUNCTIONS |
| 123 | +remove line |
| 124 | +remove lines |
| 125 | +revert file |
| 126 | +save file |
| 127 | +list directory |
| 128 | +remove spaces off |
| 129 | +remove spaces on |
| 130 | +yank lines |
| 131 | +duplicate lines |
| 132 | +insert lines |
| 133 | +comment in lines |
| 134 | +comment out lines |
| 135 | +indent lines right |
| 136 | +indent lines left |
| 137 | +substitute :[line start]:[line end]:[old string]:[new string]:\\substitute template |
| 138 | + |
| 139 | + |
| 140 | +//#SHUTIL FUNCTIONS |
| 141 | +shutil\\shell utility module |
| 142 | +shutil.copyfile([])\\Shell utility dot copy file |
| 143 | + |
| 144 | +#list functions |
| 145 | +[[l]].append([])\\list dot append |
| 146 | +[[l]].index([])\\list dot index |
| 147 | +[[l]].extend([])\\list dot extend |
| 148 | +[[l]].remove([])\\list dot remove |
| 149 | +[[l]].count([])\\list dot Count |
| 150 | +[[l]].pop([])\\list dot pop |
| 151 | +[[l]].reverse([])\\list dot reverse |
| 152 | +[[l]].sort([])\\list dot sort |
| 153 | +[[l]].copy([])\\list dot copy |
| 154 | +[[l]].clear([])\\list dot clear |
| 155 | +[[l]].insert([index],[element])\\list dot insert |
| 156 | + |
| 157 | +#tuple methods |
| 158 | +[[t]].index([])\\tuple dot index |
| 159 | +[[t]].count([])\\tuple dot count |
| 160 | +[[t]][[l]:[u]]\\tuple slice |
| 161 | +[enumerate]([t])\\tuple enumerate |
| 162 | + |
| 163 | +#dictionary functions |
| 164 | +[[d]]={[v]:[v],}\\dictionary initialisation |
| 165 | +del [d][[e]]\\dictionary delete element |
| 166 | +[[d]].get([])\\dictionary dot get |
| 167 | +[[d]].update([e])\\dictionary dot update |
| 168 | +[[d]].pop([])\\dictionary dot pop |
| 169 | +[[d]].keys()\\dictionary dot keys |
| 170 | +[[d]].items([])\\dictionary dot items |
| 171 | +[[d]].values([])\\dictionary dot values |
| 172 | +[[d]].clear()\\dot |
| 173 | +[[d]].copy()\\dictionary dot copy |
| 174 | +[[d]].fromkeys([s][,v])\\dictionary dot from keys |
| 175 | +[[d]].popitem()\\dictionary dot pop item |
| 176 | +[d][[d]]=[d]\\dictionary assignment template |
| 177 | +[[d]].setdefault([key][,default_value])\\dictionary dot set default |
| 178 | + |
| 179 | +#Python functions on to tuples lists and dictionaries |
| 180 | +any([iterable])\\any function template |
| 181 | +all([iterable])\\all function template |
| 182 | +ascii([object])\\ASCII function template |
| 183 | +bool([value])\\Boolean function template |
| 184 | +dict([iterable])\\dictionary function template |
| 185 | +len([s])\\length function template |
| 186 | +filter([function],[iterable])\\filter function template |
| 187 | +iter([object][,sentinel])\\iterator function template |
| 188 | + |
| 189 | +#string functions |
| 190 | +[[str]].split([sep][,maxsplit])\\string dot split |
| 191 | +[[str]].isdigit()\\string dot is digit |
| 192 | +[[str]].replace([[d]])\\string dot is replace |
| 193 | +abs([])\\absolute function |
| 194 | +[[s]]=Template([])\\string constructor |
| 195 | +[[s]].substitute([])\\string dot substitute |
| 196 | +[[s]].endswith([d])\\string dot ends with |
| 197 | +[[s]].startswith([d])\\string dot starts with |
| 198 | + |
| 199 | + |
| 200 | +#Python Built In Functions |
| 201 | +isinstance([object],[class info])\\is instance template |
| 202 | +int([d])\\convert to integer function |
| 203 | +max([v])\\max function template |
| 204 | +min([v])\\min function template |
| 205 | +"[[d]]".join([list])\\join function template |
| 206 | + |
| 207 | +#Voice Editor |
| 208 | +self.statusBox.Text="[]"\\status box text |
| 209 | +self.cmdBox.Text="[]"\\command box text |
| 210 | +self.viewBox.Text="[]"\\view box text |
| 211 | +self.editBox.Text="[]"\\editboxtext |
| 212 | +VOICEEDITORROOT\\voice editor root |
| 213 | + |
| 214 | +#Subprocess module |
| 215 | +[[d]]=subprocess.check_call([args][,shell=True])\\subprocess dot check call |
| 216 | +[[d]]=subprocess.check_output([args][,shell=True])\\subprocess dot check output |
| 217 | +except CalledProcessError as e:\\except called process error as |
| 218 | +some new word |
| 219 | + |
| 220 | +#Keyword module |
| 221 | +keyword.iskeyword([item])\\keyword dot is keyword |
| 222 | + |
| 223 | + |
0 commit comments