---
title: "Discussion on \"VS Code: Run currently opened Python script as a module\" | Hashnode"
description: "Discussion on \"VS Code: Run currently opened Python script as a module\". TLDR;\nI'm lazy and want to start all open Python scripts by hitting F5 and expect absolute and relative imports to work fine, no matter where the script resides within the folder structure.\nSkip to the end to access a ready-made launch.json configura..."
url: "https://hashnode.com/posts/vs-code-run-currently-opened-python-script-as-a-module/62ece58fe3a3793580dfcb8b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [VS Code: Run currently opened Python script as a module](https://blog.stefanrickli.dev/vs-code-run-currently-opened-python-script-as-a-module?utm_source=hashnode&utm_medium=feed)

TLDR; I'm lazy and want to start all open Python scripts by hitting F5 and expect absolute and relative imports to work fine, no matter where the script resides within the folder structure. Skip to the end to access a ready-made launch.json configura...

Aug 5, 2022 · 3 min read · blog.stefanrickli.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#vscode](https://hashnode.com/tag/vscode)

## Written by

[Stefan Rickli](https://hashnode.com/@stefanrickli)

@stefanrickli

  
[View profile](https://hashnode.com/@stefanrickli)

Embedded Electrical Engineer @ ETH Zürich

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
