File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,19 @@ my_program.save("HELLO.8xp", model=TI_83P)
117117> [ !IMPORTANT]
118118> ` .save() ` uses the var's name as the filename, saving to the current working directory.
119119
120- Any input data type can also be exported to:
120+ To package an entry into a var file, use ` .export ` :
121+
122+ ``` python
123+ my_var = my_program.export()
124+
125+ # This is just the entry's data
126+ my_program.bytes()
127+
128+ # This is a complete var file
129+ my_var.bytes()
130+ ```
131+
132+ You can also export entries to any of their input data types:
121133
122134``` python
123135assert my_program.string() == " Disp \" HELLO WORLD!\" "
@@ -191,13 +203,20 @@ with open("HELLO.8xp", 'rb') as file:
191203```
192204
193205An entry can be exported to a var, with an optional attached header; likewise, a var is made up of its header and entries:
206+
194207``` python
195208my_var = my_program.export(header = my_header)
196209
197210assert my_header = my_var.header
198211assert my_program == my_var.entries[0 ]
199212```
200213
214+ Pipe syntax is supported for forming a var with multiple entries:
215+
216+ ``` python
217+ my_big_var = TIHeader(comment = " muy grande" ) | [TIEntry(name = " A" ), TIEntry(name = " B" )]
218+ ```
219+
201220Export a var as bytes or straight to a file:
202221
203222``` python
You can’t perform that action at this time.
0 commit comments