472,958 Members | 2,051 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

sys.arg whitespace problem

Hi,

Basically I want to get sys.argv[1: ] but the problem is that actually
the argument should maintain whitespace. Thus if the arguments are
something something with only one space between them, or something
something with three spaces between them I should be able to maintain
the exact whitespace between arguments.

Cheers,
Bryan Rasmussen
Nov 18 '07 #1
1 5580
bryan rasmussen schrieb:
Hi,

Basically I want to get sys.argv[1: ] but the problem is that actually
the argument should maintain whitespace. Thus if the arguments are
something something with only one space between them, or something
something with three spaces between them I should be able to maintain
the exact whitespace between arguments.

That has nothing to do with python - it's a question of your shell.
Because the shell is responsible for parsing the arguments, possibly
instantiating variables or even executing subcalls. The resulting
argument list is then passed to the C-main of python.

So to pass arguments containing whitespace to python, do

python myscript.py "an argument with whitespac in it" "another one"

Diez
Nov 18 '07 #2

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

Similar topics

16
by: qwweeeit | last post by:
In analysing a very big application (pysol) made of almost 100 sources, I had the need to remove comments. Removing the comments which take all the line is straightforward... Instead for the...
0
by: Curtiss Howard | last post by:
I'm using Xerces 2.4.0 and I've got a schema (converted from a DTD) for my XML documents. However, Xerces will NOT ignore the whitespace between elements. These are the options I've set for the...
2
by: Andy Fish | last post by:
Hi, I was wondering if there is any way to control the whitespace (specifically line breaks) that are generated using Xalan XSLT processor with output method=html. I find it sometimes...
4
by: dld_id | last post by:
Hi; I've got an intermittent whitespace problem between IE6 and this page: http://www.cooperforidaho.com Under firefox & moz, everything's fine. Under IE6, certain window sizes cause the...
11
by: Brian W | last post by:
Yet another editor problem To reproduce do the following 1) Open a Webform and switch to HTML edit mode 2) Enter the Following (include spaces) This is some text before <asp:hyperlink...
56
by: infidel | last post by:
Where are they-who-hate-us-for-our-whitespace? Are "they" really that stupid/petty? Are "they" really out there at all? "They" almost sound like a mythical caste of tasteless heathens that "we"...
3
by: Nick B | last post by:
I'm trying to do a select on a column where the cell values in the column are padded with whitespace, is there a simple way to have the select expression ignore the whitespace? Thanks in...
10
by: Mason Barge | last post by:
I have a standard POST form consisting of two types of input: text input and textarea. The form downloads current settings from a mysql database. The user can update the information by modifying...
8
by: DotNetNewbie | last post by:
Hi, I have text in a file that looks like this: What kind of regex could get the '2' ?
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.