Is echo an actual executable on your system, or just a command built-in to the shell program? If the latter then you would need to construct a command that runs the shell executable and passes the command line you want to execute to it as CLI parameters.
Have you looked at the Process sample in the demo?
Finally, in almost all cases using Python’s subprocess module will probably be at least a good enough solution, if not better that using wx.Process/wx.Execute.
Hi, I am using Python 3.7.5 with wxPython 4.1.0 on Windows 10. “echo” is a builtin command of the Command Window (it behaves as print).
I didn’t use Process because I wanted to show here the simplest case possible (and yet valid).
Finally, regarding subprocess, the main goal is to adapt a very long program written in Python 2 and old wx 2.8, to Python 3 and new wx. I would like to change as few parts as possible to avoid unwanted side effects in a code that I do not fully understand.
The same applies to “dir”, “cd”, “set” and all the others shell commands. On the other hand, if you have the name (absolute/relative path, or just the name, really, if it is already in your system path) of a real executable program…
>>> wx.Execute('calc') # this will open calc.exe
8628
The same would apply to Python’s subprocess, of course. Shell commands can be executed only by a shell instance.
Yes. If I set things up correctly, you should be able to send a message to {category-name}@wxpython.org, like newbie-help@wxpython.org. The message needs to be from the email address that is registered in your account here. Also, IIRC, the incoming email mailboxes are polled every five minutes, and the system is more aggressive on flagging messages that need moderator approval when they come from email, so messages may not end up on the site right away.
Yes. If I set things up correctly, you should be able to send a message to {category-name}@wxpython.org, like newbie-help@wxpython.org. The message needs to be from the email address that is registered in your account here. Also, IIRC, the incoming email mailboxes are polled every five minutes, and the system is more aggressive on flagging messages that need moderator approval when they come from email, so messages may not end up on the site right away.
Sorry, by {category-name} I meant the list of discussion categories you can see on the left side of this page: https://discuss.wxpython.org/categories. Discourse uses the term “Topic” for the individual message threads in the categories. The email subject should be used as the topic when the message is imported.
Sorry, by {category-name} I meant the list of discussion
categories you can see on the left side of this page: Categories - Discuss wxPython. Discourse uses the
term “Topic” for the individual message threads in the
categories. The email subject should be used as the topic
when the message is imported.
Hi Robin,
thanks for the explanation. I tried, but got this:
Yep, it looks like Discourse is truncating the message, probably because the quoted portion includes the email headers and so it’s guessing that it is the end of the incoming message. I was able to access the original incoming email, for the record here is the relevant text:
We're sorry, but your email message to ["wxpython-users@wxpython.org"]
(titled test) didn't work.
Your account does not have the required trust level to post new topics to
this email address. If you believe this is an error, [contact a staff member]
(https://discuss.wxpython.org/about).
So it’s basically part of the spam protection functionality. There are a bunch of site interaction metrics which will automatically bump you up from level 1 (basic user) to level 2 (member) but If you are mostly using just email then you will likely not ever trigger that bump. (The metrics are things like number of minutes reading posts, number of days active on the site, number of topics read, likes given and received, etc.)
I’ll go ahead and manually set your trust level since I’m pretty sure that you are not a bot so it should work for you now.