Re: Length of command line input [message #49543] |
Thu, 03 August 2006 13:22  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
R.G. Stockwell wrote:
> "R.G. Stockwell" <no@email.please> wrote in message
> news:44d250f2$0$6448$815e3792@news.qwest.net...
>
>> "TimLS" <tlsmith@qinetiq.com> wrote in message
>> news:1154624404.138340.291020@i42g2000cwa.googlegroups.com.. .
>>
>>> I couldn't find the answer to this in the online documentation but
>>> perhaps someone has seen this before, or can suggest a good work
>>> around.
>>>
>>> I have a procedure which takes lots and lots of keywords, many of which
>>> are really long filenames, e.g.
>>> test_program,input1='really_long_filename1',input2='really_l ong_filename2',....
>
>
> [ WTF??
> Some bizarro formatting there in my reply, sorry!
> Let's try that again ]
I'm glad you reposted. The maximum line length allowed on my newsreader was exceeded and
half your message was lost. :o)
paulv
--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|
|
|
|
Re: Length of command line input [message #49546 is a reply to message #49545] |
Thu, 03 August 2006 12:39   |
news.qwest.net
Messages: 137 Registered: September 2005
|
Senior Member |
|
|
"TimLS" <tlsmith@qinetiq.com> wrote in message
news:1154624404.138340.291020@i42g2000cwa.googlegroups.com.. .
> I couldn't find the answer to this in the online documentation but
> perhaps someone has seen this before, or can suggest a good work
> around.
>
> I have a procedure which takes lots and lots of keywords, many of which
> are really long filenames, e.g.
> test_program,input1='really_long_filename1',input2='really_l ong_filename2',....
Change this to:
test_program,input1='really_short_filename1',input2='really_ short_filename2',....but seriously,1) make an array and pass the array as a keywordor2) write a function called "get_really_long_filenames" and callthat function from inside test_programor3) programatically create the filenames on the flyor4) get the filenames from a directory listing (assuming these files exist)or......or8671) increase the length of the text that the IDL command line willaccept.:)Cheers,bob
|
|
|
Re: Length of command line input [message #49548 is a reply to message #49546] |
Thu, 03 August 2006 12:13   |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Thu, 03 Aug 2006 10:00:04 -0700, TimLS wrote:
> I couldn't find the answer to this in the online documentation but
> perhaps someone has seen this before, or can suggest a good work
> around.
>
> I have a procedure which takes lots and lots of keywords, many of which
> are really long filenames, e.g.
> test_program,input1='really_long_filename1',input2='really_l ong_filename2',....
>
> Eventually IDLDE running under linux decides that it has had enough and
> essentially only accepts the first 500 characters (approximately) that
> have been typed into the command line. (Trying to run it as a batch
> file has the same effect).
>
> Is there a limit on the length of the command line, and is it possible
> to extend it anyhow?
Yes, there is a limit, and I believe it's 512 characters, depending on
device. You can turn off IDL command line editing with !EDIT_INPUT=0,
which should make the limit "infinite", but this also disables command
line "background" processing of widget events. You can always compile it
to a main level routine as well.
JD
|
|
|
Re: Length of command line input [message #49551 is a reply to message #49548] |
Thu, 03 August 2006 10:51   |
larkn10
Messages: 10 Registered: July 2006
|
Junior Member |
|
|
TimLS wrote:
> I couldn't find the answer to this in the online documentation but
> perhaps someone has seen this before, or can suggest a good work
> around.
>
> I have a procedure which takes lots and lots of keywords, many of which
> are really long filenames, e.g.
> test_program,input1='really_long_filename1',input2='really_l ong_filename2',....
>
> Eventually IDLDE running under linux decides that it has had enough and
> essentially only accepts the first 500 characters (approximately) that
> have been typed into the command line. (Trying to run it as a batch
> file has the same effect).
>
> Is there a limit on the length of the command line, and is it possible
> to extend it anyhow?
>
> Thanks, Tim
I think there is a limit to the length of the command line (I thought
256 characters
but I could be wrong.)
To solve your problem, how about
f1 = 'really_long_filename1'
f2 = 'really_long_filename2'
f3 = 'really_long_filename3'
etc.
test_program,input1=f1,input2=f2,....
-Larry
|
|
|
Re: Length of command line input [message #49552 is a reply to message #49551] |
Thu, 03 August 2006 10:47   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
TimLS wrote:
> I couldn't find the answer to this in the online documentation but
> perhaps someone has seen this before, or can suggest a good work
> around.
>
> I have a procedure which takes lots and lots of keywords, many of which
> are really long filenames, e.g.
> test_program,input1='really_long_filename1',input2='really_l ong_filename2',....
>
> Eventually IDLDE running under linux decides that it has had enough and
> essentially only accepts the first 500 characters (approximately) that
> have been typed into the command line. (Trying to run it as a batch
> file has the same effect).
>
> Is there a limit on the length of the command line, and is it possible
> to extend it anyhow?
Hello,
Dunno about answers to your actual questions (sorry), but in batch mode, can't you recast
things as:
input1='really_long_filename1'
input2='really_long_filename2'
...etc...
test_program,input1=input1,input2=input2,...etc...
Another approach (assuming your other arguments are also similar, i.e. filenames) would be
to do:
input_files=strarr(nfiles) ; however many files you want to process this time
input_files[0]='really_long_filename1'
input_files[1]='really_long_filename2'
...etc...
test_program,input_files=input_files
and then, in your program, test for the size of the input_files keyword after you've
verified it's existence.
?
I am impressed that you've testing the too-long-command-line issue on the command line
itself (500 chars! Cripes.) -- but I think addressing the problem you're having by
modifying your code is a path of much lower resistance.
And, another thing to consider; if you do figure out how to increase the available length
of the command line, is there any guarantee that it will work on a different platform? Or
even a different version of IDL/IDLDE?
paulv
--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|
|
|
Re: Length of command line input [message #49637 is a reply to message #49548] |
Fri, 04 August 2006 01:01  |
TimLS
Messages: 5 Registered: August 2006
|
Junior Member |
|
|
Thanks JD that's what I was trying to find out. !edit_input=0
I think in practice I'll use the approach Paul and Larry and others
suggested, i.e. have a batch file with the filenames set to variables
that are passed in
>
> input1='really_long_filename1'
> input2='really_long_filename2'
> ...etc...
> test_program,input1=input1,input2=input2,...etc...
>
Thanks, Tim
|
|
|