Python Forum
Can anyone help me successfully run this code?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can anyone help me successfully run this code?
#6
(Jun-21-2023, 02:41 PM)TheMouseAvenger Wrote: 2. But what about my changes to the environment variable paths I showed in my first picture? Were they made correctly, or do I need to start over?
Just need to add Scripts folder (where pip.exe is) in System Variables.
C:\Users\User\AppData\Local\Programs\Python\Python311
C:\Users\User\AppData\Local\Programs\Python\Python311\Scripts
It easier if you make folder that has shorther Path eg C:\div_code.
Here a quick run with virtual enviromnet,and rember restore-the-great-suspender-urls it's a command line tool.
So now need to run it with python.
G:\div_code
λ python -V
Python 3.11.3

G:\div_code
λ pip -V
pip 23.1.2 from C:\python311\Lib\site-packages\pip (python 3.11)

# Make enviroment
G:\div_code
λ python -m venv suspender_env

G:\div_code
λ cd suspender_env\

G:\div_code\suspender_env
λ G:\div_code\suspender_env\Scripts\activate.bat

# Install
(suspender_env) G:\div_code\suspender_env
λ pip install the-great-suspender-restore-urls
Collecting the-great-suspender-restore-urls
  Downloading the_great_suspender_restore_urls-0.4-py3-none-any.whl (5.8 kB)
Installing collected packages: the-great-suspender-restore-urls
Successfully installed the-great-suspender-restore-urls-0.4

# As it's a command line tool --help will work
(suspender_env) G:\div_code\suspender_env
λ restore-the-great-suspender-urls --help
usage: restore-the-great-suspender-urls [-h] --in-file IN_FILE --out-file OUT_FILE [--session-name-suffix SESSION_NAME_SUFFIX]
                                        [--extension-id EXTENSION_ID] [--verbose]

Restore the broken URLs of the Great Suspender browser extension

options:
  -h, --help            show this help message and exit
  --in-file IN_FILE     Input file. Could be relative (to current directory)
  --out-file OUT_FILE   Output file. Could be relative (to current directory)
  --session-name-suffix SESSION_NAME_SUFFIX
                        Session name suffix. Defaults to ` - cleaned`.
  --extension-id EXTENSION_ID
                        ID of ``The Great Suspender`` extension. If left blank, regularexpression match will be used.
  --verbose             Verbose output.
Now would i need to have tabs.json in this folder the run command and it will work.
Reply


Messages In This Thread
RE: Can anyone help me successfully run this code? - by snippsat - Jun-21-2023, 07:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how do I successfully use PDO with my ODBC for MSSQL? cyberion1985 3 6,719 Jun-26-2018, 04:44 PM
Last Post: Maverick494
  Cannot successfully install NumPy aniketmone2017 3 7,477 Dec-29-2016, 02:14 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020