473,387 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

question on python syntax

If I type this in shell

$ ./yourfile.py 12:34 PM &

What does '$', '.', '/' and '& means in this succession? Note: 12:34
PM is a argument to the yourfile.py.

Sep 10 '07 #1
2 907
a.m. wrote:
If I type this in shell

$ ./yourfile.py 12:34 PM &

What does '$', '.', '/' and '& means in this succession? Note: 12:34
PM is a argument to the yourfile.py.
This not python syntax but Unix shell.

$ = shell prompt
../ = look for the program in my current working directory
yourfile.py = the program name
12:34 = argument 1
PM = argument 2
& = run in background
Sep 11 '07 #2
a.m. wrote:
If I type this in shell

$ ./yourfile.py 12:34 PM &

What does '$', '.', '/' and '& means in this succession? Note: 12:34
PM is a argument to the yourfile.py.
"$" is the shell prompting you to let you know it's ready for you to
type a command.

"./" says "look in the current directory for a file called ...".

Since the first token in the command contains a path separator ("/") the
normal mechanism of looking for the executable in each of the
directories in the current $PATH is not used [if you don't understand
this sentence, ignore it].

"&" says "run this command in the background and immediately prompt for
another command, instead of waiting for the command to finish like you
usually do".

Technically, by the way, 12:34 PM is *two* arguments to the yourfile.py,
not one.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------

Sep 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
75
by: David MacQuigg | last post by:
Seems like we need a simple way to extend Python syntax that doesn't break existing syntax or clash with any other syntax in Python, is easy to type, easy to read, and is clearly distinct from the...
14
by: Uwe Mayer | last post by:
Hi, I know the python community is not very receptive towards extending the python syntax. Nevertheless I'd like to make a suggestion and hear your pro and cons. I want so suggest a...
2
by: yaffa | last post by:
dear python gurus, quick question on syntax. i have a line of code like this for incident in bs('tr', {'bgcolor' : '#eeeeee'}): what i want it to do is look for 'bgcolor' : '#eeeeee'...
2
by: waltbrad | last post by:
Hello. Been studying Python for about a week now. I did a quick read of the tutorial in the manual and I'm reading Programming Python by Mark Lutz. I'm still getting used to the Python syntax,...
2
by: neerashish | last post by:
Is there a good Python Syntax and mis-spelled variable and method name checker available. I have been programming in python for last 6 months and misspelled variables and method names have been...
3
by: Kinokunya | last post by:
Hi guys, My group and I will be working on our final year project, the scope to do a program/web-based application similar areas of functionalities like the PyLint and PyChecker; a Python syntax...
6
by: Daniel | last post by:
I hope this question is OK for this list. I've downloaded Rpyc and placed it in my site packages dir. On some machines it works fine, on others not so much. Here is one error I get when I try...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.