Thanks Chris and JM, I will explore how much work it's going to take
to change the various scripts to _always_ starting the logger from
main().
As further explanation - this code predates the logging module, and
many of the functions/classes had an optional argument for the home-
made
logger - and
I've been trying to migrate some code to using the standard python
logging classes/objects. And they seem quite capable of doing what I
need them to do. Unfortunately there's a problem in my unit tests.
It's fairly common to have to create quite a few entities in the
course of a series of tests.
On Mar 25, 8:07 am, wrote:
> Just curious how others view the 2 examples below for creating and
> writing to a file in Python (in OS X). Is one way better than the other?
> If it was a large amount of text, would the 'os.system' call be a bad
> way to do it?
>
> Thanks.
>
> Jay
>
>
>
> >>> f =
On Dec 10, 6:06 am, Jean-Michel Pichavant
wrote:
> Dirk Nachbar wrote:
> > I want to take a copy of a list a
>
> > b=a
>
> > and then do things with b which don't affect a.
>
> > How can I do this?
>
> > Dirk
>
> In [1]: a = [1,2,3]
>
> In [2]: b = a[:]
>
> In [3]: b[0] = 5
>
> In [4]: a
> Out[4]:
On Jun 1, 2:58 pm, Terry Reedy wrote:
> On 6/1/2010 2:18 PM, robert somerville wrote:
>
> > Hi;
> > this is an airy question.
>
> > does anybody have some code or ideas on how to calculate the optimal "S"
> > transform of user specified order (wanting the coefficients) for a
> > published filter
On May 7, 7:32 am, utabintarbo wrote:
> Until now, I have used the UNC under Windows (XP) to allow my program
> to access files located on a Samba-equipped *nix box (eg.
> os.path.normpath(r"\\serverFQDN\sharename\dir\filename")). When I try
> to open this file under Linux (Red Hat 5), I get a fil
On Apr 25, 10:19 pm, Chris Rebert wrote:
> On Sun, Apr 25, 2010 at 9:42 PM, Keith wrote:
> > On Apr 26, 12:02 am, Chris Rebert wrote:
> >> On Sun, Apr 25, 2010 at 8:36 PM, Keith wrote:
> >> > I am considering writing a PEP for the inclusion of an engineering
> >> > format specifier, and would a
On Mar 25, 5:45 am, Johny wrote:
> Does anyone know if there is a tiny Python distribution available
> running in a Linux environment?
Debian has a package: "python-minimal".
HTH...
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 5, 10:58 am, Nobody wrote:
> On Mon, 04 Jan 2010 21:30:31 -0800, cassiope wrote:
> > One more tidbit observed: my last note, that it works when using
> > seteuid/setegid?
> > Well - that only applies if the daemon is running under strace (!).
> > It fails
>
One more tidbit observed: my last note, that it works when using
seteuid/setegid?
Well - that only applies if the daemon is running under strace (!).
It fails
if started directly by root, or if the strace session has ended,
leaving the
main body of the daemon running in its normal headless manner.
On Jan 4, 4:23 pm, Cameron Simpson wrote:
> On 04Jan2010 09:16, cassiope wrote:
> | To Cameron: the file doesn't (yet) exist; and it has the correct full
> | path.
>
> Can you show us the strace output of the failing open() call?
Ah...presumably you mean:
[pid 1976]
On Jan 4, 7:46 am, Nobody wrote:
> On Sun, 03 Jan 2010 13:56:24 -0800, cassiope wrote:
> > I'm changing the uid and gid in the daemon (which runs with root
> > permissions
> > until the fork and uid/gid change). The uid and gid are confirmed by
> > printing os
On Jan 3, 3:00 pm, Cameron Simpson wrote:
> On 03Jan2010 14:20, cassiope wrote:
> | On Jan 2, 8:02 pm, Cameron Simpson wrote:
> | > Can you show us:
> | > - the directory user and group ownership and permissions
> | > - the daemon's user and group values?
>
On Jan 2, 8:02 pm, Cameron Simpson wrote:
> On 02Jan2010 15:21, cassiope wrote:
> | [...] I want
> | to save a copy of the email in a particular directory which is
> | accessible to the Windows clients via samba.
> |
> | The strange thing is that even with the right user
On Jan 2, 6:40 pm, Christian Heimes wrote:
> cassiope wrote:
> > The strange thing is that even with the right user-id, I cannot seem
> > to write to the directory, getting an IOError exception. Changing the
> > directory to world-writable fixes this. I can confirm the ui
On Jan 2, 3:46 pm, Steve Holden wrote:
> cassiope wrote:
> > I have a daemon on a Linux system that supports a number of Windows
> > clients. Among the functions is to send e-mails, which is
> > sufficiently complicated that I fork() a separate process which gets
> > s
I have a daemon on a Linux system that supports a number of Windows
clients. Among the functions is to send e-mails, which is
sufficiently complicated that I fork() a separate process which gets
setuid to a lesser user, and calls a python script which does the
actual formatting and emailing (the d
On Dec 3, 7:45 am, perlsyntax wrote:
> On 12/03/2009 09:28 AM, exar...@twistedmatrix.com wrote:> On 02:52 pm,
> fasteliteprogram...@gmail.com wrote:
> >> Is there away in python i can connect to a server in socket to two
> >> servers at the same time or can't it be done?
>
> > I'm not sure what y
On Jun 25, 1:33 am, Francesco Bochicchio wrote:
> Hi all,
>
> as many - I think - python programmers, I find muself debugging my
> scripts by placing print statements in strategic places rather than
> using the python debugger, and commenting/uncommenting them according
> to myy deugging needs. A
On Apr 9, 6:55 pm, Soumen banerjee wrote:
> Hello,
> I am writing a little program where i have an array the elements of
> which i want to display upon keypresses by the user. The only way on
> linux seems like using getch() from the curses library. I wanted a
> simpler solution than having to use
On Mar 27, 11:29 am, a...@pythoncraft.com (Aahz) wrote:
> [posted & e-mailed, please respond to newsgroup]
>
> In article ,
>
>
>
> cassiope wrote:
>
> >In attempting to diagnose the cause, I tried directly executing the
> >lines inside the python2.5 i
A hard drive failure forced me to rebuild my main system. Just a few
things haven't been restored; one of them is a python script which is
used to email users of important events.
In attempting to diagnose the cause, I tried directly executing the
lines inside the python2.5 interpreter:
22 matches
Mail list logo