[python 2.7]
I need to use a configparser that is case-sensitive for option names, but does
not do magical interpolation of percent sign.
I.e.:
[Mapping0]
backupHost = eng%26
dbNode = v_br_node0001
should be read (and later written) as is, including capitalization and the
percent sign.
I f
On Friday, May 22, 2015 at 1:13:39 PM UTC-4, Ian wrote:
> On Fri, May 22, 2015 at 10:59 AM, gy wrote:
> > [python 2.7]
> > I need to use a configparser that is case-sensitive for option names, but
> > does not do magical interpolation of percent sign.
> > I.e.:
> >
> > [Mapping0]
> > backupHost =
[python 2.7, linux]
I have a python app. I cannot modify the file. But I can import it and mess
with it. I need to perform brief tasks before and after some of the member
functions.
I'd like to do this in as clear and maintainable way as possible (no third
party imports). Here's what I have
A couple of times recently I've come across this problem: I have a
large list to sort and I need to the the "key=function" argument to
sort appropriately. But I actually have the key mapping in a big
dictionary. Now I have to make an intermediary function:
def key_fn(key):
return key_dict[ke
On Oct 17, 3:37 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > A couple of times recently I've come across this problem: I have a
> > large list to sort and I need to the the "key=function" argument to
> > sort appropriately. But I actually have the key mapping in a b
On Oct 18, 2:42 am, Ron Adam <[EMAIL PROTECTED]> wrote:
> I put together the following module today and would like some feedback on any
> obvious problems. Or even opinions of weather or not it is a good approach.
,,,
def __call__(self, a, b):
""" This allows the Collate class work
Colin J. Williams wrote:
> Is there some way that the user can access the docstring specified for a
> property?
Do keep in mind that the docstring is not guaranteed to be available.
If
the application is run with optimization turned on, docstrings are
usually
optimized out. Docstrings are handy
I'm starting to read about twisted and I keep seeing things like:
[from twisted/internet/app.py]
def __init__(self, name, uid=None, gid=None, authorizer=None,
authorizer_=None):
"""Initialize me.
If uid and gid arguments are not provided, this application
will
default t
On Oct 31, 4:01 pm, John Salerno <[EMAIL PROTECTED]> wrote:
> What is the best way to check if a file already exists in the current
> directory? I saw os.path.isfile(), but I'm not sure if that does more
> than what I need.
>
> I just want to check if a file of a certain name exists before the user
On Nov 5, 2:26 pm, avidfan <[EMAIL PROTECTED]> wrote:
> Can someone offer some advice as to how the best way to approach this
> might be?
>
> I am trying to write a generic python script to build out some
> applications, so the python script will be generic enough to work for
> all of them, but it
SpreadTooThin wrote:
> How does one get the process id?
> Is there a method for windows and unix (mac os x etc...)
under linux, do:
import os
os.getpid()
--
http://mail.python.org/mailman/listinfo/python-list
sam wrote:
> i am starting to experiment with recursion, and decided to write a
> fairly trivial little program which took a float as input, then called
> a function to halve it recursively until it was less than 1:
>
> import recu
12 matches
Mail list logo