Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Python] pathlib: Improve compatibility with python

Đang mở
#20,482 2 bình luận 1 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@vepadulano đang làm issue này rồi.

Từ ngày 24/11/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
C++
Star
3.3k
Fork
1.6k
Merge trung bình
2 ngày 8 giờ
Pull request đã merge (30 ngày)
179

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của root-project/root

Tất cả issue của root-project/root

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.