[Eric] Eric5.bat console window

Detlev Offenbach detlev at die-offenbachs.de
Sun Feb 20 15:24:45 GMT 2011


On Sonntag, 20. Februar 2011, Victor Varvariuc wrote:
> Looks like this is the problem:
> > START has a peculiarity involving double quotes around the first
> > parameter. If the first parameter has double quotes it uses that as the
> > optional TITLE for the new window.

This was the right clue. Including a title in quotes as the first argument 
fixed it for me. I've implemented this solution for the latest releases 
(snapshots). Thanks for your help.

> 
> http://stackoverflow.com/questions/154075/using-the-dos-start-command-with-
> parameters-passed-to-the-started-program
> 
> This should work:
> 
> rem Start Eric4 with command line parameters
> cd %~dp0
> start pythonw.exe Lib\site-packages\eric4\eric4.pyw %1 %2 %3 %4 %5 %6 %7 %8
> %9
> 
> 
> On Sun, Feb 20, 2011 at 4:24 PM, Victor Varvariuc <
> 
> victor.varvariuc at gmail.com> wrote:
> > Try this version:
> >> rem Start Eric4 with command line parameters
> >> cd %~dp0
> >> pythonw.exe Lib\site-packages\eric4\eric4.pyw %1 %2 %3 %4 %5 %6 %7 %8 %9
> > 
> > On Sun, Feb 20, 2011 at 4:07 PM, Detlev Offenbach <
> > 
> > detlev at die-offenbachs.de> wrote:
> >> On Sonntag, 20. Februar 2011, Victor Varvariuc wrote:
> >> > I installed Python-2.7.1, PyQt-Py2.7-x86-gpl-4.8.3-1, eric4-4.4.12,
> >> > and
> >> 
> >> and
> >> 
> >> > also could not start Eric without taking out 'start'.
> >> > Looks like it is because of Python several versions installed (maybe
> >> > 'start' uses some extension bindings and is trying to start Python3
> >> > for eric4?). Anyway, i installed the same files on clean WinXp
> >> > without
> >> 
> >> having
> >> 
> >> > Python3 installed, at it worked is supposed.
> >> 
> >> > Also i've got a message from a guy, who says it worked for him:
> >> Meanwhile I modified the install script and added a '-s' option that
> >> cause the
> >> script to leave out the "start " part of the batch file. This way the
> >> user can
> >> choose.
> >> 
> >> > On Sat, Feb 19, 2011 at 12:37 AM, <erik@*brown.com> wrote:
> >> > > Victor,
> >> > > 
> >> > >   Very cool.  I recently started using Eric4 and this has been
> >> > >   bugging me.
> >> > > 
> >> > > Haven't had time to look into this, but I applied your changes to
> >> > > the eric4.bat script and worked like a charm.
> >> > > 
> >> > > Enjoy,
> >> > > 
> >> > > Erik
> >> > 
> >> > On Sun, Feb 20, 2011 at 11:38 AM, Detlev Offenbach
> >> > <detlev at die-offenbachs.de
> >> > 
> >> > > wrote:
> >> > > 
> >> > > Hello Victor,
> >> > > 
> >> > > I implemented your solution. Unfortunately I am observing some
> >> > > strange issues.
> >> > > I have several Python versions installed (2.6, 2.7, 3.1). It works
> >> 
> >> fine
> >> 
> >> > > for eric5 and Python 3.1. However, the same kind of batchfile
> >> > > doesn't work for the
> >> > > Python 2 variants and eric4. If I remove the "start" from the
> >> > > script,
> >> 
> >> it
> >> 
> >> > > is ok. What am I doing wrong?
> >> > > 
> >> > > Regards,
> >> > > Detlev
> >> > > 
> >> > > On Freitag, 18. Februar 2011, Victor Varvariuc wrote:
> >> > > > I would like to suggest changing some of the .bat scripts for Eric
> >> 
> >> on
> >> 
> >> > > > Windows. I am using Eric5, but i think the same applies to Eric4.
> >> > > > 
> >> > > > The problem with the eric5.bat is the following:
> >> > > > > While running a command line program or some GUI initiated from
> >> > > > > command line on Windows, there is always a black console window
> >> > > > > on the screen. This sometime becomes annoying. For example,
> >> > > > > when you start the Eric Python IDE on Windows, normally you
> >> > > > > start it by calling a batch file “eric4.bat” which calls the
> >> > > > > actual eric4.py script sequentially. Since Eric4 is designed to
> >> > > > > be a GUI program, the black console window has no use but it is
> >> > > > > there.
> >> 
> >> http://9rivers.linkka.com/2010/07/29/hide-the-command-console-window-whi
> >> l
> >> 
> >> > > e-
> >> > > 
> >> > > > running-a-guicommand-line-program-on-windows/
> >> > > > 
> >> > > > I found a way to start eric5.bat without the console window:
> >> > > > > @echo off
> >> > > > > rem Start Eric5 with command line parameters
> >> > > > > set CURRDIR=%~dp0
> >> > > > > start "%CURRDIR%\pythonw.exe"
> >> > > > > "%CURRDIR%\Lib\site-packages\eric5\eric5.pyw" %1 %2 %3 %4 %5 %6
> >> > > > > %7
> >> 
> >> %8
> >> 
> >> > > %9
> >> > > 
> >> > > > This is not only hiding console window. It also uses relative
> >> 
> >> pathes.
> >> 
> >> > > > So
> >> > > 
> >> > > it
> >> > > 
> >> > > > makes .bat scripts more portable.
> >> > > 
> >> > > --
> >> > > Detlev Offenbach
> >> > > detlev at die-offenbachs.de
> >> 
> >> --
> >> Detlev Offenbach
> >> detlev at die-offenbachs.de


-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the Eric mailing list