I have written a Python script with a wxPython GUI that uses subprocess.Popen
to open a list of files that the user provides. One of my users would like to
be able to run a Python script with my application. The Python script he is
trying to run uses the command line and gets keyboard input from
Sorry for not being explicit enough. I am aware that this would work if I
called python.exe path-to-script.py with shell=False.
In my Python program, I parse an XML file like the one I have included below.
Then I loop through the paths of the apps listed in it and run them by calling
something
Thank you for your reply.
I think I'll use PyWin32 if it's available on the user's system, and otherwise
fall back to using subprocess.Popen, since I want my script to be
cross-platform. os.startfile won't work for me because you can't pass arguments
to the file being started. (When I first ask
Thank you for your replies. I tried what you suggested in your second post and
it worked.
That was actually a mistake in the app_list.xml file. As you said:
%ProgramFiles%\LibreOffice 4\program\swriter.exe
"C:\Users\Timothy\Documents\myfile.odt"
should instead be:
"%ProgramFiles%\LibreOffice
That's interesting, now I learned something else too. As I said before, though,
I want users to be able to enter paths in the XML file exactly the way they
would be entered in a Windows shortcut.
(Actually, my program currently only has one Windows user, for whom I develop
it [I don't even use i
Thanks again for your help. I tried something similar to what you suggested:
def run_app(self, app_path):
args = shlex.split(app_path.replace("\\", ""))
args = [arg.replace("", "\\") for arg in args]
args[0] = os.path.expandvars(args[0])
try:
if pywin32:
I'm completely new to SQL, and recently started using SQLite in one of my
Python programs. I've gotten what I wanted to work, but I'm not sure if I'm
doing it in the best/most efficient way. I have attached some sample code and
would appreciate any (polite) comments about how the SQL (or Python)
According to the message box that appears when it is run, w9xpopen.exe is only
used on Windows 95/98. If that is the case, why it is still included in Python
2.7, since Python 2.5.4 is the last version that works on Windows 9x?
I've been excluding w9xpopen.exe in my py2exe setup script for my Py
On Friday, August 29, 2014 8:54:47 PM UTC-4, Terry Reedy wrote:
> Please be more specific as to python installer source, python version,
>
> and location. I do not see it in my 2.7.8 directory installed by the psf
>
> .msi installer.
I'm also using the Python 2.7.8 MSI installer from the PSF,
Thanks, that's interesting. It seems odd to me that w9xpopen.exe (because of
its name) is still used on Windows 7, so I can see why it was removed in Python
3.4.
Since I don't use the popen function at all in my application, I think it
should be OK to exclude w9xpopen.exe in my py2exe setup scri
10 matches
Mail list logo