Title: By default its not considering current working directory as source directory · Issue #8 · codehz/bun_python · GitHub
Open Graph Title: By default its not considering current working directory as source directory · Issue #8 · codehz/bun_python
X Title: By default its not considering current working directory as source directory · Issue #8 · codehz/bun_python
Description: create a file foo.py and define a function def greet(name: str): return 'greet ' + name then within js file import { python } from "bun_python"; const foo = python.import('foo') console.log(foo.greet('yourself')) This will throw an error...
Open Graph Description: create a file foo.py and define a function def greet(name: str): return 'greet ' + name then within js file import { python } from "bun_python"; const foo = python.import('foo') console.log(foo.gre...
X Description: create a file foo.py and define a function def greet(name: str): return 'greet ' + name then within js file import { python } from "bun_python"; const foo = python.import('foo...
Opengraph URL: https://github.com/codehz/bun_python/issues/8
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"By default its not considering current working directory as source directory","articleBody":"create a file `foo.py`\n\nand define a function\n```py\ndef greet(name: str):\n return 'greet ' + name\n```\nthen within js file\n\n```js\nimport { python } from \"bun_python\";\n\nconst foo = python.import('foo')\nconsole.log(foo.greet('yourself'))\n```\n\nThis will throw an error.\nI checked in sys.path, current working directory was not their.\nFor now the only possible way to use this by a workaround like this\n\n```ts\nimport { python } from \"bun_python\";\n\n// +++++++manually add current working directory into sys path++++++\nconst sys = python.import('sys');\nsys.path.append(__dirname);\n\nconst foo = python.import('foo')\nconsole.log(foo.greet('yourself'))\n```","author":{"url":"https://github.com/rdev06","@type":"Person","name":"rdev06"},"datePublished":"2025-04-11T13:09:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/8/bun_python/issues/8"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:28ae9f55-39a3-62e9-f24c-2cb145222fcc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A06E:1B8E26:92B92F6:BE55416:697613E1 |
| html-safe-nonce | db1f900e87a7c60bbe8664aa1bfe58ac42c1a488ff1ca484b2fda2e42d84fbad |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDZFOjFCOEUyNjo5MkI5MkY2OkJFNTU0MTY6Njk3NjEzRTEiLCJ2aXNpdG9yX2lkIjoiMzQ4NjI2Nzk5MTUwNDg1MTkzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dca2df08843dd056169ddfe226302715ea10a09a193f7f4c11dfe4bd6b79a3e0 |
| hovercard-subject-tag | issue:2988637873 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codehz/bun_python/8/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c2a61acba294f3db5889e9a989775ef34748de094228f867de63d77e4ad5a1db/codehz/bun_python/issues/8 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c2a61acba294f3db5889e9a989775ef34748de094228f867de63d77e4ad5a1db/codehz/bun_python/issues/8 |
| og:image:alt | create a file foo.py and define a function def greet(name: str): return 'greet ' + name then within js file import { python } from "bun_python"; const foo = python.import('foo') console.log(foo.gre... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rdev06 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/codehz/bun_python git https://github.com/codehz/bun_python.git |
| octolytics-dimension-user_id | 13158903 |
| octolytics-dimension-user_login | codehz |
| octolytics-dimension-repository_id | 681174080 |
| octolytics-dimension-repository_nwo | codehz/bun_python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 681174080 |
| octolytics-dimension-repository_network_root_nwo | codehz/bun_python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4ea235bfed58ef16c8a5642b3ac64b74f10c9f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width