Windows: Jython: Subprocess.Popen does not accept / in some cases

Asked by Artem Koval on 2020-06-07

Hello. This may not be a Sikuli specific question, but I'd really appreciate your input. I'm trying to open a file with specific application and for some reason files that start with 'p' do not open. For example:

import subprocess
app = 'C:/Program Files/Application/App.exe'
file = 'C:/test/p.qwe'
subprocess.Popen([ftm, file])

And nothing happens. If I rename the file in Explorer (add any character before 'p') then it opens successfully. If, instead of my application, I use 'notepad.exe' everything works fine too. I am completely puzzled.

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-06-07
Last reply:
2020-06-08
Artem Koval (gunmad) said : #1

Sorry, I think the issue was in slashes. Works after replacing them with '\\'. Funny how it doesn't want to work with '/' and 'p'.

RaiMan (raimund-hocke) said : #2

to keep it open.

What SikuliX version? What Java?

Java itself accepts / as \\ on Windows, but it seems that parts of Jython does not.

About the p - I guess, that /p has a special meaning internally !?

I will check with the latest Jython 2.7.2 and report here.

Artem Koval (gunmad) said : #3

Sikuli ver - 2.0.1
Java - 8 (251)

I just tested it in PyCrharm Python IDE and got the same results.

Can you help with this problem?

Provide an answer of your own, or ask Artem Koval for more information if necessary.

To post a message you must log in.