pythonnet / pythonnet/pythonnet

Add ability to set python module file string instead of it always being None

Open
#2,043 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
5.5k
Forks
780
PR merge metrics
No merged PRs in 30d

Description

Environment
  • Pythonnet version: Latest
  • Python version: 3.7+
  • Operating System: All
  • .NET Runtime: All
Details
  • Describe what you were trying to get done.

    When creating a python module from a string (PyModule FromString) the file parameter is always set to None. If I want to create a virtual package structure in memory I need to be able to set file to a specified file structure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the PyModule.FromString entry point and tracing how its file parameter is currently assigned. Check for nearby tests covering module creation, then confirm completion by allowing callers to provide a file string and observing that the created module retains it instead of None.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.