Re: [Ironpython-users] Working Directory

2011-08-26 Thread Slide
On Fri, Aug 26, 2011 at 9:40 AM, Paul Grenyer wrote: > Hi > > > What does your if __name__ == "__main__": look like? Or, if you don't > have > > that, can you share your entry script? > > Yep: > > if __name__ == '__main__': >unittest.main() > > -- > Thanks > Paul > > You'd probably want t

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Paul Grenyer
Hi > I don't regard that as a hack. Each to their own. :-) If nothing else, it's not very portable. > It is quite unusual for a program to have a > command line switch for setting the working directory, at least for > non-GUI-programs. Usually the working directory is set in the context of the

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Paul Grenyer
Hi > What does your if __name__ == "__main__": look like? Or, if you don't have > that, can you share your entry script? Yep: if __name__ == '__main__': unittest.main() -- Thanks Paul Paul Grenyer e: paul.gren...@gmail.com b: paulgrenyer.blogspot.com t: pjgrenyer _

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Peter Schwalm
Am 26.08.2011 16:56, schrieb Paul Grenyer: Yeah, that feels like quite a hack. It's odd you can't set the working directory for the python executable. Hi Paul, I don't regard that as a hack. It is quite unusual for a program to have a command line switch for setting the working directory

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Jeff Hardy
On Fri, Aug 26, 2011 at 7:56 AM, Paul Grenyer wrote: > Yeah, that feels like quite a hack. It's odd you can't set the working > directory for the python executable. It's not that odd - very few console programs let you set their working directory from the command line. If you need temporarily swi

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Slide
On Fri, Aug 26, 2011 at 8:09 AM, Paul Grenyer wrote: > Hi > > > Can you show the console output that makes you think it's pulling the > second > > argument as a python file to execute? > > Sure! > > Here's my commandline that works: > > DirList\3rdparty\IronPython\ipy.exe > DirList\AcceptanceTests

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Paul Grenyer
Hi > Can you show the console output that makes you think it's pulling the second > argument as a python file to execute? Sure! Here's my commandline that works: DirList\3rdparty\IronPython\ipy.exe DirList\AcceptanceTests\acceptance_tests.py Then if I add a parameter: DirList\3rdparty\IronPyt

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Slide
On Fri, Aug 26, 2011 at 7:56 AM, Paul Grenyer wrote: > Hi Peter > > > if you are running windows: > > > > if you end up in the wrong directory after failure you could use > > sub-batch-files (call .bat ) and in that sub-batch-files you > could > > use the command setlocal. Then environment

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Paul Grenyer
Hi Peter > if you are running windows: > > if you end up in the wrong directory after failure you could use > sub-batch-files (call .bat ) and in that sub-batch-files you could > use the command setlocal. Then environment and working directory are > restored on return from the batch file.

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Peter Schwalm
Hi Paul, if you are running windows: if you end up in the wrong directory after failure you could use sub-batch-files (call .bat ) and in that sub-batch-files you could use the command setlocal. Then environment and working directory are restored on return from the batch file. Peter

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Paul Grenyer
HI Ok, I'm trying a different approach where I pass in the path the to file I want to work on. However, I can't get the command line syntax right: ipy.exe acceptance_test.py ../bin/release/DirList It keeps treating the second parameter as python file. What's the correct syntax? -- Thanks Paul

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Markus Schaber
Hi, Paul, Von: ironpython-users-bounces+m.schaber=3s-software@python.org > On Fri, Aug 26, 2011 at 8:42 AM, Markus Schaber software.com> wrote: > > Von: ironpython-users-bounces+m.schaber=3s-software@python.org > >> Is it possible to set the working directory at the command line? > >> Goo

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Paul Grenyer
Hi On Fri, Aug 26, 2011 at 8:42 AM, Markus Schaber wrote: > Hi, > > Von: ironpython-users-bounces+m.schaber=3s-software@python.org >> Is it possible to set the working directory at the command line? >> Google isn't helping me. What I want is: >> >> ipy.exe mypy.py. > > Why don't you use the

Re: [Ironpython-users] Working Directory

2011-08-26 Thread Markus Schaber
Hi, Von: ironpython-users-bounces+m.schaber=3s-software@python.org > Is it possible to set the working directory at the command line? > Google isn't helping me. What I want is: > > ipy.exe mypy.py. Why don't you use the command line methods for changing the directory? e. G. in bash, you co

[Ironpython-users] Working Directory

2011-08-26 Thread Paul Grenyer
Hi All Is it possible to set the working directory at the command line? Google isn't helping me. What I want is: ipy.exe mypy.py. -- Thanks Paul Paul Grenyer e: paul.gren...@gmail.com b: paulgrenyer.blogspot.com t: pjgrenyer ___ Ironpython-users mai