-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python3Packages.playwright: Add PLAYWRIGHT_BROWSERS_PATH to build env…
…ironment This allows writing self-contained Python scripts (using a nix-shell shebang), without requiring a separate shell.nix which sets PLAYWRIGHT_BROWSERS_PATH to pkgs.playwright-driver.browsers.
- Loading branch information
1 parent
682e3b7
commit a1952a6
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import os | ||
import sys | ||
|
||
from playwright.sync_api import sync_playwright | ||
|
||
with sync_playwright() as p: | ||
browser = p.chromium.launch() | ||
context = browser.new_context() | ||
with open(os.environ["out"], "w") as f: | ||
f.write("OK") |