Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7506863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:22:14+00:00 2026-05-29T22:22:14+00:00

I am rewriting a python script at work and part of what it does

  • 0

I am rewriting a python script at work and part of what it does is searched inside a folder that I right-click on for image sequences.. The python side of things I think I’m good on, but the right click not so much. I can create a right click button in the regedit but I am unsure of how to pass an argument from where I right-clicked on the folder to my python script. I want the argument to have the path to the folder. I found a post about this but it is not working for me.. maybe because they were making it on xp?? I’m unsure.(Link below)

Copy as path in windows context menu

I also found this snip-it of code which is what I think was being used before as the richt-click command..

@=”\”C:\Python26\python.exe\” \”L:\HAL\Func\search\search.py\” %L”

Can anyone explain this to me? I understand it first is going to run python then run the script.. but what is the @= and the %L for? I really want to understand this and I spent all day yesterday trying to figure it out but I’m just not finding much.
Thanks in advance for your help 🙂

This is the python script I want to pass the argument too

import sys
import os


def __main__(argv = sys.argv):

    fileName = argv[1]
    print argv
    print fileName
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:22:16+00:00Added an answer on May 29, 2026 at 10:22 pm

    The %L should probably be %1. That is, you are taking the first argument passed to this command, and passing it as an argument to your Python script. This will be the name of the file you right-clicked.

    If your Python script is prepared to accept multiple arguments (i.e. more than one selected file) you could use %* there.

    @ at the beginning of the line means the command line won’t be displayed on the screen, so it won’t open a console window just to run the command. (If the Python script generates any output, the window will still appear, however.)

    Not sure about the = sign following that; I haven’t seen it and it’s fiendishly hard to Google it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm rewriting a Bash script I wrote into Python. The crux of that script
I've got a noisy python script that I want to silence by directing its
I'm rewriting a data-driven legacy application in Python. One of the primary tables is
I'm rewriting a PHP+MySQL site that averages 40-50 hits a day using Django. Is
I am rewriting a project so that it uses getters and setters to reference
I'm (re)writing a program that does generic unit test scheduling. The current program is
I have this bash script on the server that runs every hour, via cron.
I`m rewriting an application that use MS Access as the database. I was able
I am rewriting a C wrapper around a C Python API (Python 1.5) and
SHORT: my python code generates a webpage with a table. i'm considering rewriting it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.