A one-liner. No reason to do this.
with open('x.py') as f: s = f.read()
More Related Contents:
- How do “and” and “or” act with non-boolean values?
- What is the most efficient way to loop through dataframes with pandas?
- How do I blit a PNG with some transparency onto a surface in Pygame?
- Start a Function at Given Time
- How can I add a background thread to flask?
- Process list on Linux via Python
- What’s the difference between __builtin__ and __builtins__?
- Proxy awareness with pip
- How to set the default color cycle for all subplots with matplotlib?
- Rotating a two-dimensional array in Python
- Use index in pandas to plot data
- Display image stored as binary blob in template
- Python – Using regex to find multiple matches and print them out [duplicate]
- How to plot line (polygonal chain) with numpy/scipy/matplotlib with minimal smoothing
- Why is the cmp parameter removed from sort/sorted in Python3.0?
- When to use Shell=True for Python subprocess module [duplicate]
- Pygame make sprite walk in given rotation
- Execute .exe file embedded in Python script
- Faithfully Preserve Comments in Parsed XML
- Limiting number of processes in multiprocessing python
- Dynamically creating classes – Python
- Python 3 sqlite parameterized SQL-query
- Python Syntax Errors with Python Anywhere
- Why does max() sometimes return nan and sometimes ignores it?
- How to fill the missing record of Pandas dataframe in pythonic way?
- Python : How to add vertical scroll in RecycleView
- How to prevent UUID primary key for new SQLAlchemy objects being created with the same value
- Can I “fake” a package (or at least a module) in python for testing purposes?
- Keras: How to save model and continue training?
- How can the built-in range function take a single argument or three?