About 272,000 results
Open links in new tab
  1. Reading a binary file with python - Stack Overflow

    Jan 3, 2012 · Also, see answers to the question reading binary file in python. – Chris. Commented Jan 3, 2012 at 10:46. 1.

  2. python - Reading JSON from a file - Stack Overflow

    If you are reading the data from the Internet instead, the same techniques can generally be used with the response you get from your HTTP API (it will be a file-like object); however, it is …

  3. How should I read a file line-by-line in Python? - Stack Overflow

    Jul 19, 2012 · @thebjorn: perhaps, but the Python 2.1 example you cited were not safe from unclosed file handler in alternate implementations. A Python 2.1 file reading that is safe from …

  4. python - Read file content from S3 bucket with boto3 - Stack …

    Mar 24, 2016 · How do I read a file if it is in folders in S3. So for eg my bucket name is A. Now A has a folder B. B has a folder C. C contains a file Readme.csv. How to read this file. Your …

  5. How to read HDF5 files in Python - Stack Overflow

    Jan 27, 2015 · import h5py # Open the HDF5 file in read mode file_path = 'your_file.h5' with h5py.File(file_path, 'r') as file: # Function to recursively print the HDF5 dataset hierarchy def …

  6. python - How to read pickle file? - Stack Overflow

    The following is an example of how you might write and read a pickle file. Note that if you keep appending pickle data to the file, you will need to continue reading from the file until you find …

  7. Reading binary file and looping over each byte [duplicate]

    Reading binary file in Python and looping over each byte. New in Python 3.5 is the pathlib module, which has a convenience method specifically to read in a file as bytes, allowing us to iterate …

  8. python - How to find out whether a file is at its `eof ... - Stack …

    Apr 13, 2012 · When reading a file in chunks rather than with read(), you know you've hit EOF when read returns less than the number of bytes you requested. In that case, the following …

  9. Reading a file using a relative path in a Python project

    Say I have a Python project that is structured as follows: project /data test.csv /package __init__.py module.py main.py __init__.py: from .module import test ...

  10. Reading/parsing Excel (xls) files with Python - Stack Overflow

    May 31, 2010 · with open(csv_filename) as file: data = file.read() with open(xl_file_name, 'w') as file: file.write(data) You can turn CSV to excel like above with inbuilt packages. CSV can be …

Refresh