How to open a code or text file online
Three steps, a few seconds, no software.
Open your .PY file
Drop it on the box, choose it from your device, or paste the text straight in.
View it instantly
Your .PY file opens neatly formatted with line numbers.
Search, copy or download
Search the text, jump to any line, then copy what you need or download a clean copy.
What is a .PY file?
Plain text that programs, servers and people write every day.
A .py file is a Python source code file, plain text containing a program or script written in the Python language. To read the code, open it in any text editor. To run it, install Python from python.org, then type python file.py in a terminal. Never run a .py file from an untrusted source without reading it first, since it executes with your full user permissions.
Programs that open .PY files
| Full name | Python Source Code File |
|---|---|
| Developer | Python Software Foundation (language created by Guido van Rossum) |
| First released | 1991 (Python 0.9.0); language steward: Python Software Foundation since 2001 |
| Category | Text & Code |
| MIME type | text/x-python |
Related viewers
Every viewer is free to use.
Frequently asked questions
Is my .PY file uploaded anywhere?
No. The file is read and highlighted for you.
Why do some characters look wrong (é, ł)?
That usually means the file was saved in one encoding and opened in another. We detect UTF-8, UTF-16 and the Windows-1250/1252 code pages automatically and show which one was used.
Can it handle huge log files?
Yes, up to 50 MB. Only the lines on screen are drawn, so scrolling stays smooth. Syntax colours are switched off for files over 1.5 MB to keep things fast.
How do the log level filters work?
We find levels like ERROR, WARN, INFO and DEBUG on each line. Lines without a level, such as stack traces, stay with the entry above them, so filtering to errors keeps the full trace.
Can I edit the file?
This is a viewer. To change code, download it or copy it into your editor. Converting encodings and line endings is planned.
Was this tool helpful?
Your rating helps us decide which tools to improve next.