Skip to content

Commit 8ce0314

Browse files
authored
fix get_file_dirname for pyinstaller (fix microsoft#342) (microsoft#345)
1 parent 89516e9 commit 8ce0314

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

playwright/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import asyncio
16+
import inspect
1617
import os
1718
import subprocess
1819
import sys
@@ -21,17 +22,17 @@
2122

2223
from greenlet import greenlet
2324

25+
import playwright
2426
from playwright.async_api import Playwright as AsyncPlaywright
2527
from playwright.connection import Connection
2628
from playwright.helper import Error
2729
from playwright.object_factory import create_remote_object
28-
from playwright.path_utils import get_file_dirname
2930
from playwright.playwright import Playwright
3031
from playwright.sync_api import Playwright as SyncPlaywright
3132

3233

3334
def compute_driver_executable() -> Path:
34-
package_path = get_file_dirname()
35+
package_path = Path(inspect.getfile(playwright)).parent
3536
platform = sys.platform
3637
if platform == "win32":
3738
return package_path / "driver" / "playwright-cli.exe"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy