Re: [Tutor] pyhook for Linux

2007-06-24 Thread learner404
Hi, You could also use the evdev driver: http://groups.google.com/group/comp.lang.python/browse_thread/thread/2d7e3791381bdeb5/a03d438f64ec5ac8?lnk=gst&q=francois+schnell&rnum=2#a03d438f64ec5ac8 If you successfully use another way I'm interested by your feedback. Thanks. On 6/23/07, Flaper87 <

[Tutor] [Linux] open a file in any home "~" ?

2006-04-19 Thread learner404
Hello, I want to read a configuration file from a small python app (user preferences). The ".myapp.conf" is in the home folder of the user. if I do: f=open("/home/user1/.myapp.conf","r")  #it works obviously I won't know the home user folder name then I wanted to use: f=open("~/.myapp.conf","

Re: [Tutor] [Linux] open a file in any home "~" ?

2006-04-19 Thread learner404
It works great, thanks very much to the three of you for these light-speed answers ... I love this list ! Wesley, I've just pre-order your new edition "Core Python programming" on amazon France, it looks great. :) Thanks   On 19/04/06, w chun <[EMAIL PROTECTED]> wrote: >  f=open("~/.myapp.conf",

[Tutor] WinXP IDLE -> open file : how-to change default directory ?

2006-06-15 Thread learner404
ments and settings" but I don't see how to give IDLE a default directory at startup (or kipping in memory the last one opened). How to do that or is it just not possible ?Thanks learner404 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] WinXP IDLE -> open file : how-to change default directory ?

2006-06-15 Thread learner404
use plain text format. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] OnBehalf Of learner404Sent: 15 June 2006 20:09 To: tutor@python.orgSubject: [Tutor] WinXP IDLE -> open file : how-to change defaultdirectory ?Hello,On WinXP ID

Re: [Tutor] I Give Up.

2006-06-18 Thread learner404
his document, you'll find an implementation of the Solutions of the Perl Cookbook in the Python language." Ooops and I also found that on perl ;)http://mirror5.escomposlinux.org/comic/ecol-13-e.png learner404 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Tkinter: 'explanation text' when the mouse is over an image button ?

2006-09-01 Thread learner404
Hello,With a Tkinter app I have buttons with an image filling each button like this,bu10=Button(frame2, image=picPlay, bg="white", command=play)I want to give a small explanation of each button when the user puts the mouse over the picture (something like the title tag in a hyperlink). I thougth I

Re: [Tutor] Get keyboard input while other program is in focus?

2006-10-16 Thread learner404
On 16/10/06, Jack <[EMAIL PROTECTED]> wrote: What commands can I use to have the program know a certain key has been pressed while another program is in focus?Hello,On windows I use the pyHook module (simple to use and works fine) :http://www.cs.unc.edu/~parente/tech/tr08.shtml On Linux it

[Tutor] Hiding/Killing a DOS window (from a previous os.system call)

2007-03-05 Thread learner404
Hello, I'm launching an external app through an os.system() or os.popen() but I don't want the resulting DOS window to hang-on there forever (my python script is launched with pythonw): I use a sys.exit() to kill the script who launched the external app.Thepython script is killed, the app is laun

Re: [Tutor] Hiding/Killing a DOS window (from a previous os.system call)

2007-03-05 Thread learner404
Thanks a lot Alan ! both solutions work like a charm :) On 3/5/07, Alan Gauld <[EMAIL PROTECTED]> wrote: "learner404" <[EMAIL PROTECTED]> wrote > I'm launching an external app through an os.system() or os.popen() > but I > don't want the resulting

Re: [Tutor] Tutor Digest, Vol 37, Issue 15

2007-03-05 Thread learner404
but the one resulting from the os.systemor os.popen commands. The two solutions that Alan gave are perfect for these :) Message: 6 Date: Mon, 5 Mar 2007 16:51:42 +0100 From: learner404 <[EMAIL PROTECTED]> Subject: [Tutor] Hiding/Killing a DOS window (from a previous os.system call) To:

[Tutor] White spaces in a path (from a string variable) and os.popen on Windows

2007-03-08 Thread learner404
Hello, I'm getting crazy with white spaces on Windows. :( I'm aware of the three paths gotchas on Windows well explained here: http://www.freenetpages.co.uk/hp/alan.gauld/tutfiles.htm But my problem is with white spaces in windows paths (very common with "program files", "documents and settings

Re: [Tutor] White spaces in a path (from a string variable) and os.popen on Windows

2007-03-08 Thread learner404
On 3/8/07, Jerry Hill <[EMAIL PROTECTED]> wrote: > result=os.popen("dir "+dirPath).read() to this: result=os.popen('dir "%s"' % dirPath).read() That worked fine with all the directories I threw at it. Thanks a lot Jerry ! :) I didn't think of doing it this way.

[Tutor] [OSX] "Executable" .py or pyc script (stuck at Applescript)

2011-11-10 Thread learner404
Hello list! - myapp.py is in a "myfolder" folder that the "users" will be able to download and put anywhere on their Mac. - users don't have any Python knowledge and I have no idea if there's a python launcher on their mac => trying to make an applescript file in the folder right next to myapp.p

Re: [Tutor] [OSX] "Executable" .py or pyc script (stuck at Applescript)

2011-11-10 Thread learner404
On Thu, Nov 10, 2011 at 2:14 PM, Steven D'Aprano wrote: > learner404 wrote: > >> Hello list! >> >> - myapp.py is in a "myfolder" folder that the "users" will be able to >> download and put anywhere on their Mac. >> > [...] > &

Re: [Tutor] [OSX] "Executable" .py or pyc script (stuck at Applescript)

2011-11-10 Thread learner404
On Thu, Nov 10, 2011 at 4:33 PM, Rich Lovely wrote: > > It looks like your script is being found fine, meaning the problem lies > elsewhere - unless your actual app is called "avcOsxLinux.py, and you > missed renaming it in the error message. Try adding a print statement as > the very first line

Re: [Tutor] [OSX] "Executable" .py or pyc script (stuck at Applescript)

2011-11-14 Thread learner404
On Fri, Nov 11, 2011 at 12:02 AM, Prasad, Ramit wrote: It is probably easiest to keep myapp.py in the home directory (or > subdirectory of it) and say "python ~/myapp.py" (or "python > ~/.roadierich/myapp.py) from the applescript > > I will go with that for now. My python script is using a bunch

[Tutor] Pydev + Remote System Explorer (RSE) : problems with local imports when working localy

2012-07-31 Thread learner404
Hello List, I'm very happy with PyDev plugin for Eclipse as a Python IDE (I'm on Eclipse 3.7, WinXP with latest Pydev). Recently I've installed the Remote System Explorer plugin for Eclipse which adds the ability to edit remote files on a server when I need it (awesome). Unfortunately it's messin

Re: [Tutor] Pydev + Remote System Explorer (RSE) : problems with local imports when working localy

2012-07-31 Thread learner404
hmmm ... menu "window">"Reset perspective" and "close all perspectives" seems to have fix the problem. Sorry for unnecessary mail. On Tue, Jul 31, 2012 at 2:02 PM, learner404 wrote: > Hello List, > > I'm very happy with PyDev plugin for Eclipse as

[Tutor] os.system vs subprocess.Popen args problems

2013-09-02 Thread learner404
Hello, I can't understand why the command below works with os.system but not with subprocess.Popen (on windows, recording video with FFMPEG.exe) cmd=('ffmpeg -f dshow -i video="%s" -f dshow -i audio="%s" -q 5 "%s"')%(videoinputName, audioinputName, videoFileOutput) os.system(cmd) *works* subpro

Re: [Tutor] os.system vs subprocess.Popen args problems

2013-09-04 Thread learner404
Thanks a lot Oscar and Eryksun for all the explanations and answers, I really appreciate. "So the extra quotes used for the video and audio arguments do actually get passed through to ffmpeg causing confusion." Yes, this worked :) subprocess.Popen(["ffmpeg","-f","dshow","-i","video="+videoinputNa