Using IronPython To Run Bat Files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using IronPython To Run Bat Files

Asim Jalis

Hi,

 

I want to use IronPython to replace some Perl scripts that we have that we run as bat files.

 

It’s possible to embed Perl in bat files using syntax such as this:

 

@echo off

perl.exe -w -x %~f0 %*

goto :EOF

 

#! -*- perl script start -*-

print "Hello World\n";

 

Does IronPython support something like a -x option that automatically strips off the initial bat part of a file and then runs the rest of it as a Python script.

 

If there is nothing like this I can roll out my own. However, the issue I have right now is that every time I run IronPythonConsole.exe on a foo.py file, it generates foo.exe and foo.pdb. Is it possible to turn off this file generation?

 

Thanks.

 

Asim


_______________________________________________
users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: Using IronPython To Run Bat Files

Martin Maly

IronPython doesn’t support the ‘embedding in the bat files’ option that you described.


IronPython generates the files for debugging purposes, given that we are still in Beta. However as we approach final release, this will change.

 

Martin

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Asim Jalis
Sent: Friday, January 20, 2006 6:23 PM
To: [hidden email]
Subject: [IronPython] Using IronPython To Run Bat Files

 

Hi,

 

I want to use IronPython to replace some Perl scripts that we have that we run as bat files.

 

It’s possible to embed Perl in bat files using syntax such as this:

 

@echo off

perl.exe -w -x %~f0 %*

goto :EOF

 

#! -*- perl script start -*-

print "Hello World\n";

 

Does IronPython support something like a -x option that automatically strips off the initial bat part of a file and then runs the rest of it as a Python script.

 

If there is nothing like this I can roll out my own. However, the issue I have right now is that every time I run IronPythonConsole.exe on a foo.py file, it generates foo.exe and foo.pdb. Is it possible to turn off this file generation?

 

Thanks.

 

Asim


_______________________________________________
users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com