[IronPython] Request for Info
J. Merrill
jvm_cop at spamcop.net
Tue Jul 4 05:30:41 CEST 2006
I'm a batch file guy too but not a Python (or IronPython) expert. You need to make a key decision: are you planning to re-write a particular batch file as a single Python program, or are you hoping to be able to simplify your batch file by invoking Python to do something that's a pain in batch-land?
For example, the ability to get a string of the form YYYY-MM-DD with today's date in it (and put that string into a batch file variable) is useful, but it's painful in batch language, at least in part because you can't know what format the user's PC uses for dates. (Is 2/3/2006 Feb 3 or March 2?) You might have a batch file that has a collection of statements to do that work and want to replace them with a call to the Python interpreter. However, if your purpose in getting such a string is so that you can (e.g.) rename a bunch of files by sticking the date at the end of the current filename (before the extension), and you're doing so with a "for each do" loop in batch-language, it might make sense to do it all in Python.
Are your batch files simple & non-proprietary enough that you can post one and we can help you look at your options?
At 12:43 PM 7/3/2006, Stephen Goodman wrote
>Greetings all,
>
>As a new user of IronPython, but an old programmer of batch files, I'd like
>to find some kind of equivalency of sorts to aid in the conversion of an old
>batch file to scripting, so I can bring an old app into the present.
>Thanks!
>
>Stephen Goodman
J. Merrill / Analytical Software Corp
More information about the Ironpython-users
mailing list