Skip to content

Conversation

Aminsed
Copy link

@Aminsed Aminsed commented Oct 12, 2025

except (OSError, TypeError):
# Handle interactive mode (e.g., Python shell, Jupyter) where source file doesn't exist
file_name = "<interactive>"
lines = [textwrap.dedent(inspect.getsource(function_pointer))]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getsource does not work for functions defined in interactive shell.

@Aminsed Aminsed force-pushed the fix-dsl-interactive-mode branch from c327295 to 602d5d3 Compare October 13, 2025 02:04
@Aminsed
Copy link
Author

Aminsed commented Oct 13, 2025

Thanks for the feedback! You're absolutely right. Updated to show a warning message instead and skip preprocessing for interactive mode.

@Aminsed Aminsed requested a review from anakinxc October 13, 2025 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Cutlass Python DSL: could not get source code

2 participants