Troubles making scite behave like a simplified IDE

92 views
Skip to first unread message

sogpotato

unread,
Apr 2, 2017, 5:19:50 PM4/2/17
to scite-interest
My problem

The current issue: Running python scripts displays a command prompt (cmd.exe).

What I want

To use my custom command.go to run python scripts and not show the windows command prompt.
To set the PATH variable via .bat file from command.go for each scite session.
To work around having to set the PATH variable in the Windows GUI before running scite.

What I've tried

If prior to running scite I set the PATH variable to include the path to pythonw.exe , and use python.properities, then the command prompt window doesn't show.

The issue arises when I try to use a custom `command.go.*.py=` I end up with a command prompt window. This is the command I use:

command.go.*.py="$(SciteDefaultHome)\python.run.bat" "$(SciteDefaultHome)" "$(FilePath)"

And the python.run.bat file is this:

@ECHO OFF
CD
%1
CD
..\Python
SET
Path=%CD%\32bit;%CD%\64bit;%Path%
REG QUERY
"HKLM\Hardware\Description\System\CentralProcessor\0" | FIND /i "x86" > NUL && SET OS=32BIT || SET OS=64BIT
IF
%OS%==32BIT (32Bit\pythonw.exe -u %2)
IF
%OS%==64BIT (64Bit\pythonw.exe -u %2)

My system configuration

Windows 10 Pro 64bit 10.0.14393
Scite 3.7.4 Sc1 (single file executable)
Python 3.6 embedabble zip
AutoHotkey 1.1.25.01 zip
g++ 5.3.0

CPU Intel 6700k
RAM 16 GB
SSD 512 GB

My project

I'm facing many issues with a project I'm developing. It is an all-in-one toolkit for beginner programmers. It includes three languages and one text editor:
    1) Python
    2) AutoHotkey
    3) C++

I chose scite for the text editor for several reasons:
    1) It is customizable.
    2) Build and Go features
    3) Ouput pane can take user input.

Those are the main reasons. I couldn't find another editor that checks all those boxes.

Here is a summary of the file and folder structure in the toolkit:

Programming-Toolkit\
├──  AutoHotkey\
   ├── Compiler\
   └── AutoHotkey.exe
├──  C++\
   └── g++.exe

├──  Editor\
   ├── ahk.run.bat
   ├── c++.run.bat
   ├── c++.build.bat
   ├── python.run.bat
   ├── scite.exe
   └── SciTEGlobal.properties
└── Python\
   
├── 32bit\
   
   ├── ppython.exe
   
   └── ppythonw.exe
   
└── 64bit\
       
├── python.exe
       
└── pythonw.exe


Neil Hodgson

unread,
Apr 3, 2017, 7:06:39 PM4/3/17
to scite-interest
sogpotato:

> The current issue: Running python scripts displays a command prompt (cmd.exe).

The provided settings don’t display cmd for me. The most likely issue is that the subsystem for the command is being set. Read the "Command subsystem” and “command.go.subsystem” documentation. Next most likely is that the executable is set to display a console window: see the difference between python.exe and pythonw.exe. Another possibility is that the command you are using is deliberately invoking cmd.exe to set its options.

> And the python.run.bat file is this:
>
> @ECHO OFF

When debugging, leave echo on.

Neil

sogpotato

unread,
Apr 3, 2017, 7:21:24 PM4/3/17
to scite-interest, nyama...@me.com
> The current issue: Running python scripts displays a command prompt (cmd.exe).

   The provided settings don’t display cmd for me. The most likely issue is that the subsystem for the command is being set. Read the "Command subsystem” and “command.go.subsystem” documentation. Next most likely is that the executable is set to display a console window: see the difference between python.exe and pythonw.exe. Another possibility is that the command you are using is deliberately invoking cmd.exe to set its options.

Thank you! I really needed an assist on this. I've been working on this problem for days with no signs of improvement. I just needed someone more knowledgeable to point me in a direction where the problem is most likely.

I tried `command.subsystem.*.py=0` and put it one line above `command.go.*.py` and it's working. I have no idea why it's doing this. I still have no idea what's happening or what's going on behind the scenes.


> And the python.run.bat file is this:
>
> @ECHO OFF

   When debugging, leave echo on.

True, I do this as well. I just wanted to post the final version of the code. Thanks for the heads up.
Reply all
Reply to author
Forward
0 new messages