Restarting a daemon

2011-04-26 Thread Jeffrey Barish
it sends the terminate signal to the old myserver. If so, what is the correct way to restart the daemon? Will it work to run the restart command in a subprocess rather than a subshell or will a subprocess also terminate when its parent terminates? -- Jeffrey Barish -- http://mail.python.org

Re: Problem with multithreading

2009-06-25 Thread Jeffrey Barish
Lou Pecora wrote: In article h20d7k$nih$0...@news.t-online.com, larudwer larud...@freenet.de wrote: Jeffrey Barish jeff_bar...@earthlink.net schrieb im Newsbeitrag news:mailman.2091.1245902997.8015.python-l...@python.org... Jeffrey Barish wrote: I have a program that uses

Problem with multithreading

2009-06-24 Thread Jeffrey Barish
, but the test program works perfectly. I could post it, though, if it would help to understand what I am doing -- and what might be wrong in the real program. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with multithreading

2009-06-24 Thread Jeffrey Barish
Jeffrey Barish wrote: I have a program that uses multithreading to monitor two loops. When something happens in loop1, it sends a message to loop2 to have it execute a command. loop2 might have to return a result. If it does, it puts the result in a queue. loop1, meanwhile, would have

Threads and daemon processes

2009-05-08 Thread Jeffrey Barish
a thread? -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Beep

2008-12-22 Thread Jeffrey Barish
Tobias Andersson wrote: Jeffrey Barish skrev: Chris Rebert wrote: Is the 'pcspkr' kernel module built and loaded? Yes. And I should have mentioned that I get sound from Ubuntu applications that produce sound. Also, is the terminal bell set to visual? If so chr(7) only produces a brief

Beep

2008-12-21 Thread Jeffrey Barish
I use sys.stdout.write('\a') to beep. It works fine on Kubuntu, but not on two other platforms (one of which is Ubuntu). I presume that the problem is due to a system configuration issue. Can someone point me in the right direction? Thanks. -- Jeffrey Barish -- http://mail.python.org/mailman

Re: Beep

2008-12-21 Thread Jeffrey Barish
Chris Rebert wrote: Is the 'pcspkr' kernel module built and loaded? Yes. And I should have mentioned that I get sound from Ubuntu applications that produce sound. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Multiprocessing vs. [Pyro, RPyC]

2008-11-14 Thread Jeffrey Barish
With the release of multiprocessing in Python 2.6, is there any reason to use Pyro or RPyC? -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing vs. [Pyro, RPyC]

2008-11-14 Thread Jeffrey Barish
, but then I saw this statement in the documentation: It is possible to run a manager server on one machine and have clients use it from other machines (assuming that the firewalls involved allow it). -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Single-instance daemons

2008-11-12 Thread Jeffrey Barish
the name of the daemon and the pid and give the executable suid root, but that's a lot of bother. Has anyone else dealt with this problem? -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Single-instance daemons

2008-11-12 Thread Jeffrey Barish
root at cleanup as it's stored as your saved UID. Nice. One thing: how do I get the uid and gid for the target user? In general, I know the name of the target user, but the uid/gid assigned by the OS to that user could be different on different systems. -- Jeffrey Barish -- http

Re: Single-instance daemons

2008-11-12 Thread Jeffrey Barish
, I like your suggestion, so I'll remember it for another occasion. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Regular expressions and Unicode

2008-10-02 Thread Jeffrey Barish
) m.groups() ('Dvo\xc5',) I suppose that there is an encoding problem, but I don't understand Unicode well enough to know what to do to digest properly the Unicode characters in the surname. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem using copy.copy with my own class

2008-04-24 Thread Jeffrey Barish
to reproduce the problem in a simple test program. Thanks to all for your comments. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem using copy.copy with my own class

2008-04-23 Thread Jeffrey Barish
return _reconstruct(x, rv, 0) File /usr/lib/python2.5/copy.py, line 322, in _reconstruct y = callable(*args) File /usr/lib/python2.5/copy_reg.py, line 92, in __newobj__ return cls.__new__(cls, *args) TypeError: __new__() takes exactly 3 arguments (2 given) -- Jeffrey Barish -- http

Problem using copy.copy with my own class

2008-04-22 Thread Jeffrey Barish
copy. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: __init__.py file

2008-04-09 Thread Jeffrey Barish
or from dirA.dirB import my_object. I use the technique only with objects that are legitimately global. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: for-else

2008-03-10 Thread Jeffrey Barish
solution. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: for-else

2008-03-06 Thread Jeffrey Barish
. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Sending Python statement over socket in chunks

2008-02-11 Thread Jeffrey Barish
of Things delimited by Thing( at one end and ),\nThing( at the other (or )]\n at the end of the list). Did I just answer my own question? Of course, I need to balance the complexity of any alternative solution against simply executing the statement on the server. -- Jeffrey Barish -- http

Re: Sending Python statement over socket in chunks

2008-02-11 Thread Jeffrey Barish
I have to carve up the list as source. Using Pyro to send the chunks once I have them should work fine. Note that I am avoiding the use of the term slice. It is not possible to slice the list in the way that we normally do in Python because it is still in the form of a string. -- Jeffrey Barish

Re: Biased random?

2007-08-31 Thread Jeffrey Barish
Robert Kern wrote: Ivan Voras wrote: Jeffrey Barish wrote: If you take the difference between two uniformly distributed random variables, the probability density function forms an isosceles triangle centered at 0. Take the absolute value of that variable and the pdf is a straight line

Re: Biased random?

2007-08-31 Thread Jeffrey Barish
I'm sorry that I took the time to respond. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Biased random?

2007-08-28 Thread Jeffrey Barish
function forms an isosceles triangle centered at 0. Take the absolute value of that variable and the pdf is a straight line with maximum value at 0 tapering to 0 at max. Thus, z = abs(randint(0, max) - randint(0, max)) ought to do the trick. -- Jeffrey Barish -- http://mail.python.org/mailman

Moving class used in pickle

2007-05-15 Thread Jeffrey Barish
have is to read all the data with the old class module, store the data in some nonpickle format, and then, with another program, read the nonpickle-format file and rewrite the pickle with the class module in the new location. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Using DCOP from Python

2006-12-18 Thread Jeffrey Barish
korganizer.CalendarIface.openJournalEditor(QString text, QDate date) but I'm having trouble figuring out how to call this function from Python. And will it become clear how to control whether I am reading or writing the journal? -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Adding a comment to an image using PIL

2006-10-30 Thread Jeffrey Barish
: im.app['COM'] = 'New comment' im.save('newfilename.jpg') However, when I open newfilename.jpg, I find that key 'COM' does not exist -- the comment is not being written. Presumably, I am doing something wrong. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Record Audio Analysis

2006-08-24 Thread Jeffrey Barish
. Frank. Or try PySonic (http://pysonic.sourceforge.net/) if you prefer a package that actually works. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Controlling Windows Media Player from Python

2006-07-03 Thread Jeffrey Barish
Is there a way to interact with Windows Media Player from Python? I would like to be able to do things like tell WMP to play a given sound file or to ask WMP for metadata about a sound file. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Popen3 on Windows

2006-06-17 Thread Jeffrey Barish
see os.popen2 and os.popen3, but they provide only file objects for stdin, stdout, and stderr so I don't see a way to kill the auxiliary program that I start. Is there a way to do this on Windows? -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging a pickle

2006-06-08 Thread Jeffrey Barish
the file in binary mode either for input or output. I am amazed that it worked at all. Thanks for the suggestion. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Debugging a pickle

2006-06-07 Thread Jeffrey Barish
-- or that the dump did not write as much data as it should have. Is that assumption correct? Are there any debugging techniques I can use to figure out what is going wrong? -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Name conflict in class hierarchy

2006-05-20 Thread Jeffrey Barish
that this must be a common problem in OOP, so I'm wondering whether there is a simple solution that I am missing. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Multithreading and Queue

2006-04-25 Thread Jeffrey Barish
bunch of code between the point where a thread releases a lock and then actually returns to the calling program) and so despite the locks in Queue it is still possible for values to change before a thread acts on them. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser: writes a list but reads a string?

2006-01-22 Thread Jeffrey Barish
desirable. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Import DiscID on Windows

2005-04-25 Thread Jeffrey Barish
it is in the search path, so I presume that there is something wrong with the dll. Any suggestions? Can Python import a file with a dll extension? -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 and Tkinter

2004-12-02 Thread Jeffrey Barish
. If that still fails, try a fresh reconfigure and rebuild from scratch, now that the Tcl/Tk libs are there. Start with ./configure per the instructions in the README file, run make clean etc.. /Jean Brouwers In article [EMAIL PROTECTED], Jeffrey Barish [EMAIL PROTECTED] wrote