# \#io

**URL:** https://discourse.julialang.org/tag/io/553.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Reading in Excel Data from GitHub](https://discourse.julialang.org/t/reading-in-excel-data-from-github/58055)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 9\
**Last updated:** [August 30, 2026, 8:01am UTC](https://discourse.julialang.org/t/reading-in-excel-data-from-github/58055 "2026-08-30T08:01:14Z")

</div>

I am preparing a Minimal Reproducible Example which involves reading in some data contained in an Excel file. I’m trying to figure out the best way to make the data easily accessible for anyone who wants to run my code. …

---

## [Reading compressed csv gzopen cuts file short](https://discourse.julialang.org/t/reading-compressed-csv-gzopen-cuts-file-short/137885)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 4\
**Last updated:** [July 1, 2026, 5:31pm UTC](https://discourse.julialang.org/t/reading-compressed-csv-gzopen-cuts-file-short/137885 "2026-07-01T17:31:48Z")

</div>

I seem to have stumbled into some kind of bug. I am working with large compressed CSV files. I’m loading the data with: mydata = gzopen(x-\>CSV.read(x, DataFrame), mydatafile) Then I just get this warning: ┌ Warning: t…

---

## [Reading Fortran-style Complex Numbers From File](https://discourse.julialang.org/t/reading-fortran-style-complex-numbers-from-file/137453)

<div class="topic-metadata">

**Author:** [@ducksoverip](https://discourse.julialang.org/u/ducksoverip)\
**Replies:** 14\
**Last updated:** [June 7, 2026, 2:56am UTC](https://discourse.julialang.org/t/reading-fortran-style-complex-numbers-from-file/137453 "2026-06-07T02:56:47Z")

</div>

Part of my inherited research code is a highly parallelized Fortran90 program that produces, as its primary output, a large text file (~1 GB) of complex numbers in the following format: (1.014631909321741E-002,-1.82546…

---

## [Filtering Array Rows By Matching Element Value](https://discourse.julialang.org/t/filtering-array-rows-by-matching-element-value/137320)

<div class="topic-metadata">

**Author:** [@ducksoverip](https://discourse.julialang.org/u/ducksoverip)\
**Replies:** 7\
**Last updated:** [May 28, 2026, 7:05pm UTC](https://discourse.julialang.org/t/filtering-array-rows-by-matching-element-value/137320 "2026-05-28T19:05:25Z")

</div>

I’m a Julia newbie working with some inherited Fortran 90 code for research purposes. One of the things the Fortran code does is write a list of parameters to file for future use, eg: 0 0 0 1 1 0 1 1 2 0 Say the column…

---

## [Proposal to add method \`Base.read(io::IO, ::Type{T}) where T \<: IO\`](https://discourse.julialang.org/t/proposal-to-add-method-base-read-io-io-type-t-where-t-io/137044)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 4\
**Last updated:** [May 8, 2026, 4:11pm UTC](https://discourse.julialang.org/t/proposal-to-add-method-base-read-io-io-type-t-where-t-io/137044 "2026-05-08T16:11:12Z")

</div>

Currently Base.read() does support read(src, String) read(src, Int32) but the following signatures are failing read(src, IOBuffer) read(src, Base.SecretBuffer) What do you think about introducing """ read(io::IO…

---

## [How to get file encoding?](https://discourse.julialang.org/t/how-to-get-file-encoding/72325)

<div class="topic-metadata">

**Author:** [@mathdeep](https://discourse.julialang.org/u/mathdeep)\
**Replies:** 5\
**Last updated:** [March 24, 2026, 9:54am UTC](https://discourse.julialang.org/t/how-to-get-file-encoding/72325 "2026-03-24T09:54:46Z")

</div>

Hi there, Is there a way to find out how a file is encoded with functions? I’m getting a text file and want to do sume stuff. In order to do right stuff, I have to know how the file is encoded, but I can’t find how to …

---

## [Why writing to closed stream doesn't error](https://discourse.julialang.org/t/why-writing-to-closed-stream-doesnt-error/136301)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [March 20, 2026, 9:03pm UTC](https://discourse.julialang.org/t/why-writing-to-closed-stream-doesnt-error/136301 "2026-03-20T21:03:20Z")

</div>

I have been tracking down a bug which where a stream as not open when write happened. MWE: io = open("/tmp/test", "w") close(io) print(io, "test") # why no error? Though the docstrings do not explicitly s…

---

## [\[ANN\] GeoIO.jl - Load/save geospatial data in Julia](https://discourse.julialang.org/t/ann-geoio-jl-load-save-geospatial-data-in-julia/106031)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 14\
**Last updated:** [March 13, 2026, 5:11pm UTC](https://discourse.julialang.org/t/ann-geoio-jl-load-save-geospatial-data-in-julia/106031 "2026-03-13T17:11:10Z")

</div>

GeoIO.jl uses various backend packages spread across different Julia organizations to load a universal representation of geospatial data as discussed in the book Geospatial Data Science with Julia. The current list of s…

---

## [Stdio tee (copy without redirection)](https://discourse.julialang.org/t/stdio-tee-copy-without-redirection/134794)

<div class="topic-metadata">

**Author:** [@hadrien.theveneau](https://discourse.julialang.org/u/hadrien.theveneau)\
**Replies:** 6\
**Last updated:** [December 31, 2025, 8:51am UTC](https://discourse.julialang.org/t/stdio-tee-copy-without-redirection/134794 "2025-12-31T08:51:33Z")

</div>

Dear all, I would like to make something like Base.redirect\_stdio, but which copies elsewhere the stdout and stderr without suppressing them, like the tee command. Would you know how to do this ? Thanks a lot,

---

## [ANN: BufIO: New I/O interfaces for Julia](https://discourse.julialang.org/t/ann-bufio-new-i-o-interfaces-for-julia/132347)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 6\
**Last updated:** [December 22, 2025, 10:16am UTC](https://discourse.julialang.org/t/ann-bufio-new-i-o-interfaces-for-julia/132347 "2025-12-22T10:16:34Z")

</div>

I’m pleased to announce a new package BufIO.jl. Overview of BufIO.jl BufIO provides new and improved I/O interfaces for Julia inspired by Rust, and designed around exposing buffers to users in order to explicitly copy b…

---

## [Does writing in parallel block the whole process?](https://discourse.julialang.org/t/does-writing-in-parallel-block-the-whole-process/134620)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 4\
**Last updated:** [December 19, 2025, 8:37pm UTC](https://discourse.julialang.org/t/does-writing-in-parallel-block-the-whole-process/134620 "2025-12-19T20:37:43Z")

</div>

Say I have a large piece of data data that I want to write or serialize (for speed) to a file file with serialize("path/to/file", data). Done naively, this will block the rest of the program from executing. So it’s simp…

---

## [Int -\> Str -\> print(io,\_) without allocations](https://discourse.julialang.org/t/int-str-print-io-without-allocations/134626)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 16\
**Last updated:** [December 19, 2025, 11:53am UTC](https://discourse.julialang.org/t/int-str-print-io-without-allocations/134626 "2025-12-19T11:53:12Z")

</div>

I have billions of Ints that I wish to write to a file. Something similar to mmwrite() in MatrixMarket.jl. I am already using IOBuffer with a large enough sizehint. When I do print(io, n::Int), behind the scenes, a conve…

---

## [JuliaC feature request: strip off libuv when there's no IO](https://discourse.julialang.org/t/juliac-feature-request-strip-off-libuv-when-theres-no-io/134043)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 4\
**Last updated:** [November 22, 2025, 12:43pm UTC](https://discourse.julialang.org/t/juliac-feature-request-strip-off-libuv-when-theres-no-io/134043 "2025-11-22T12:43:16Z")

</div>

Using a shared libraries compiled by JuliaC seems to cause unexpected interactions with the IO of a host program, even when the shared library is purely numerical and does not perform IO. I think this is caused by Juila’…

---

## [Save a DataFrame preserving a column of matrices](https://discourse.julialang.org/t/save-a-dataframe-preserving-a-column-of-matrices/133895)

<div class="topic-metadata">

**Author:** [@contradict](https://discourse.julialang.org/u/contradict)\
**Replies:** 4\
**Last updated:** [November 17, 2025, 4:59pm UTC](https://discourse.julialang.org/t/save-a-dataframe-preserving-a-column-of-matrices/133895 "2025-11-17T16:59:02Z")

</div>

I have a DataFrame with a column of 3x3 Float32 matrices. I would like to save this to a file and later read it back, preserving this column. I tried this round trip with several tools: CSV =\> converts to String JSONTab…

---

## [Wait for a keypress](https://discourse.julialang.org/t/wait-for-a-keypress/20218)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 12\
**Last updated:** [November 15, 2025, 7:13pm UTC](https://discourse.julialang.org/t/wait-for-a-keypress/20218 "2025-11-15T19:13:55Z")

</div>

Absolutely stupid question - and yes RTFM. How do I make a Julia program pause until a key is pressed?

---

## [Backup 1 line when using readline()](https://discourse.julialang.org/t/backup-1-line-when-using-readline/133826)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 1\
**Last updated:** [November 12, 2025, 12:38pm UTC](https://discourse.julialang.org/t/backup-1-line-when-using-readline/133826 "2025-11-12T12:38:16Z")

</div>

I am going through a mixed binary/ASCII file implementing UFF58b file format in UFFFiles.jl. It will make my life easier if I can read a line using readline(), call a subroutine and then read the same line again. So I …

---

## [Can I define a custom IO wrapper type that works with all IO functions like print?](https://discourse.julialang.org/t/can-i-define-a-custom-io-wrapper-type-that-works-with-all-io-functions-like-print/133652)

<div class="topic-metadata">

**Author:** [@BYH-1](https://discourse.julialang.org/u/BYH-1)\
**Replies:** 4\
**Last updated:** [November 4, 2025, 2:29pm UTC](https://discourse.julialang.org/t/can-i-define-a-custom-io-wrapper-type-that-works-with-all-io-functions-like-print/133652 "2025-11-04T14:29:53Z")

</div>

I’d like to define a new type that wraps an existing IO object, for example: struct MyIOWrapper \<: IO inner::IO end Base.write(io::MyIOWrapper, x) = # custom write logic here #Base.unsafe\_write is also define…

---

## [Simple Python Program with Juliacall Segfaults](https://discourse.julialang.org/t/simple-python-program-with-juliacall-segfaults/133517)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 4\
**Last updated:** [October 31, 2025, 8:28pm UTC](https://discourse.julialang.org/t/simple-python-program-with-juliacall-segfaults/133517 "2025-10-31T20:28:24Z")

</div>

This simple Python program calling a Julia function crashes sporadically with segfault. # juliacall\_compute\_square.py from juliacall import Main as jl print(f"julia version : {jl.VERSION}") numstring = input("Enter a nu…

---

## [C program embedding Julia - works in terminal but breaks in pipes](https://discourse.julialang.org/t/c-program-embedding-julia-works-in-terminal-but-breaks-in-pipes/86973)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 8\
**Last updated:** [October 30, 2025, 2:43pm UTC](https://discourse.julialang.org/t/c-program-embedding-julia-works-in-terminal-but-breaks-in-pipes/86973 "2025-10-30T14:43:19Z")

</div>

I’d like to write a C program which embeds Julia code, and call this C program from an unrelated program using two-way pipes. While the C program works fine in the terminal, it breaks when called from pipes. Here’s a min…

---

## [Disable memory alignment inside struct](https://discourse.julialang.org/t/disable-memory-alignment-inside-struct/132942)

<div class="topic-metadata">

**Author:** [@Yotam\_Ohad](https://discourse.julialang.org/u/Yotam_Ohad)\
**Replies:** 2\
**Last updated:** [October 8, 2025, 3:37pm UTC](https://discourse.julialang.org/t/disable-memory-alignment-inside-struct/132942 "2025-10-08T15:37:24Z")

</div>

I have a (somewhat old) file that was created from a Fortran script and contains a struct without any padding. I try to read the file as follows struct Foo id::UInt32 Value::Int64 end io = open(filepath, "r") ro…

---

## [Thread-safe alternative to \`redirect\_stdio\`?](https://discourse.julialang.org/t/thread-safe-alternative-to-redirect-stdio/132749)

<div class="topic-metadata">

**Author:** [@StevenWhitaker](https://discourse.julialang.org/u/StevenWhitaker)\
**Replies:** 3\
**Last updated:** [September 29, 2025, 10:36pm UTC](https://discourse.julialang.org/t/thread-safe-alternative-to-redirect-stdio/132749 "2025-09-29T22:36:07Z")

</div>

I’m confused at why the following code throws an error. I don’t see any obvious race conditions, especially since each task should have its own Pipe to work with. (I’m assuming Julia’s logging is thread-safe, which I thi…

---

## [\`IOStream\` buffering pitfalls when communicating to a device file](https://discourse.julialang.org/t/iostream-buffering-pitfalls-when-communicating-to-a-device-file/130071)

<div class="topic-metadata">

**Author:** [@Yuan-Ru-Lin](https://discourse.julialang.org/u/Yuan-Ru-Lin)\
**Replies:** 1\
**Last updated:** [August 4, 2025, 9:26pm UTC](https://discourse.julialang.org/t/iostream-buffering-pitfalls-when-communicating-to-a-device-file/130071 "2025-08-04T21:26:32Z")

</div>

I was talking to an ADS1115 ADC over I²C via /dev/i2c-1 on a Raspberry Pi 4. My first attempt was using high-level IOStream APIs like write(io, bytes) and read(io, n), and it worked but only for the first value. Every v…

---

## [Testing User Input in GitHub CI/Test Suites?](https://discourse.julialang.org/t/testing-user-input-in-github-ci-test-suites/130210)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 8\
**Last updated:** [June 28, 2025, 5:13pm UTC](https://discourse.julialang.org/t/testing-user-input-in-github-ci-test-suites/130210 "2025-06-28T17:13:47Z")

</div>

Hi folks! How do you test user input for readline() in GitHub CI or your local test suite? I have a snippet of code that asks for user input in my package and am trying to test the input – kinda like this: function fin…

---

## [Method to unsafely close a mmap](https://discourse.julialang.org/t/method-to-unsafely-close-a-mmap/129900)

<div class="topic-metadata">

**Author:** [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Replies:** 1\
**Last updated:** [June 16, 2025, 7:41am UTC](https://discourse.julialang.org/t/method-to-unsafely-close-a-mmap/129900 "2025-06-16T07:41:38Z")

</div>

Currently the Mmap.mmap function uses a finalizer to handle calling munmap or UnmapViewOfFile when the array is garbage collected. It is useful to be able to do this finalization eagerly despite the potential risks if t…

---

## [Read!( ) not working for HDF5 file](https://discourse.julialang.org/t/read-not-working-for-hdf5-file/129722)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 1\
**Last updated:** [June 15, 2025, 11:46am UTC](https://discourse.julialang.org/t/read-not-working-for-hdf5-file/129722 "2025-06-15T11:46:24Z")

</div>

I have an HDF5 file. I want to read or allocate its data in variable r repeatedly instead of allocating in different places :seat: in memory. using HDF5 fname = tempname(); # temporary file fid = h5open(fname, "w") cre…

---

## [How do you like to save your data and how much customizability do you like/need?](https://discourse.julialang.org/t/how-do-you-like-to-save-your-data-and-how-much-customizability-do-you-like-need/129707)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 5\
**Last updated:** [June 8, 2025, 2:39pm UTC](https://discourse.julialang.org/t/how-do-you-like-to-save-your-data-and-how-much-customizability-do-you-like-need/129707 "2025-06-08T14:39:01Z")

</div>

I’m making an application that controls a spectrometer (among other things). The program is likely to be saving dozens if not hundreds of spectra, each being about 0.5MB. There’s also some positional metadata that comes…

---

## [How can the Julia language write a structure to a file and read that structure from the file?](https://discourse.julialang.org/t/how-can-the-julia-language-write-a-structure-to-a-file-and-read-that-structure-from-the-file/129436)

<div class="topic-metadata">

**Author:** [@dk-zen](https://discourse.julialang.org/u/dk-zen)\
**Replies:** 5\
**Last updated:** [May 30, 2025, 4:57am UTC](https://discourse.julialang.org/t/how-can-the-julia-language-write-a-structure-to-a-file-and-read-that-structure-from-the-file/129436 "2025-05-30T04:57:50Z")

</div>

How can the Julia language write a structure to a file and read that structure from the file? I tried it myself. Although I could read it correctly, when there are dozens of keywords in the structure, the reading process…

---

## [Eachline function and more than one line](https://discourse.julialang.org/t/eachline-function-and-more-than-one-line/128205)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 4\
**Last updated:** [April 20, 2025, 6:24am UTC](https://discourse.julialang.org/t/eachline-function-and-more-than-one-line/128205 "2025-04-20T06:24:23Z")

</div>

Hello, Can I use the eachline function to read multiple lines? Thank you.

---

## [Reading from either stdout or stderr of spawned process](https://discourse.julialang.org/t/reading-from-either-stdout-or-stderr-of-spawned-process/127690)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 3\
**Last updated:** [April 4, 2025, 11:24am UTC](https://discourse.julialang.org/t/reading-from-either-stdout-or-stderr-of-spawned-process/127690 "2025-04-04T11:24:57Z")

</div>

My code runs an external process (in this case, Pari/GP) which might produce output on either its stdout or stderr file descriptors. I communicate with the process in the following way: pin, pout = Pipe(), Pipe() proces…

---

## [What image formats do you use within Julia?](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 18\
**Last updated:** [March 8, 2025, 11:00am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333 "2025-03-08T11:00:20Z")

</div>

Hello all! I often use SVG images without using Cairo.jl or Luxor.jl. I am probably in the “minority”. For raster images, I tend to use PNG. So, what image formats do you use within Julia? While the question does not …

[Next page](https://discourse.julialang.org/tag/io/553.md?match_all_tags=true&page=1&tags%5B%5D=io)
