Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Python] pathlib: Improve compatibility with python

Aperta
#20,482 2 commenti 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@vepadulano ci sta già lavorando.

Dal 24/11/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

in:Python Interface new feature
Check duplicate issues.
  • Checked for duplicates
Description

I see all over the place problems when I try to use ROOT with python. This time I see that there is no support for Path objects.

Reproducer
import ROOT
from pathlib import Path
import numpy as np

root_file = ROOT.TFile("example_data.root", "RECREATE")
tree      = ROOT.TTree("myTree", "Example Tree")

x = np.zeros(1, dtype=float)
y = np.zeros(1, dtype=float)
z = np.zeros(1, dtype=float)

tree.Branch("x", x, "x/D")
tree.Branch("y", y, "y/D")
tree.Branch("z", z, "z/D")

for i in range(10):
    x[0] = i
    y[0] = i * 2 + np.random.normal(0, 1)
    z[0] = x[0]**2 + y[0]
    tree.Fill()

tree.Write()
root_file.Close()

file_path = Path("example_data.root")

df = ROOT.RDataFrame("myTree", file_path)
ROOT version

6.36.04

Installation method

mamba

Operating system

almalinux 9

Additional context

Any good out there uses Path, not strings when handling paths.

Lingua principale
C++
Stelle
3.3k
Fork
1.6k
Merge medio
2g 17h
PR unite (30g)
188

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di root-project/root

Tutte le issue di root-project/root

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.