Users can control whether file I/O (input and output) is synced from the server to the browser on compatible items within the CodeHS Code Editor.
Teachers will be able to change file I/O settings on any assignment or program for which they have Edit permissions. Students will be able to change these settings only on compatible programs they've created within their own Sandbox. By default, this feature is set to "on" for Sandbox programs.
Note: If you are adjusting this setting for an assignment you've created as a teacher, you'll need to first open the assignment in the Code Editor. You can do this from your Create page by clicking the (. . .) and selecting View, or from your assignments page by clicking the blue eye icon:
Adjusting File I/O Settings
To adjust file I/O settings in your program:
Open the program in the Code Editor.
Click the gear icon (⛭).
Scroll down to Other.
Toggle Enable File I/O to on.
Refresh the page to see the changes take effect.
Demonstration of how to adjust file I/O settings for custom assignments:
Limitations and Compatibility
This feature is only available for program types that run on the servers, such as Python (but not Brython), Java, and C++. Programs such as JavaScript or Brython run in the browser and do not have this feature enabled.
Full Compatibility List
Compatible Program Types | Incompatible Program Types |
All Java program types | All JavaScript program types except Node |
JavaScript Node | Python 3 (turtle); Python 3 Graphics (Brython); Python Karel, Super Karel, and Ultra Karel; |
Python 3, Python 3 (tkinter), Pygame, Python 3 Data Science, Python 3 Data Science (Graphics) | All HTML program types, including WebDev, Firebase, and Virtual Reality with A-Frame |
C | SQL |
Swift | Bit Interpreter |
Scheme | Scratch and Scratch Jr. |
Still have questions? Contact our team at hello@codehs.com to learn more!