On Dec 2, 6:36 pm, Carl Banks wrote:
> For the record, I don't really agree that a lot of parameters is code
> smell. It's maybe a red flag that you are doing too much in one
> function and/or class, but nothing inherently shady.
>
> One thing to ask yourself: are there a lot of combinations of
> >>> Is there a better way to do this?
> >> class MyOb(object):
> >> def __init__(self, **kwargs):
> >> self.__dict__.update(kwargs)
>
> >> ob1 = MyOb(p1="Tom", p3="New York")
> >> ob2 = MyOb(p1="Joe", p2="j...@host", p3="New Jersey")
>
> > I've tried this, but have found two issues:
> > Is there a better way to do this?
>
> class MyOb(object):
> def __init__(self, **kwargs):
> self.__dict__.update(kwargs)
>
> ob1 = MyOb(p1="Tom", p3="New York")
> ob2 = MyOb(p1="Joe", p2="j...@host", p3="New Jersey")
I've tried this, but have found two issues:
1) I can't set de
Hello,
I've got a bunch of code that looks something like:
class MyOb(object):
def __init__(self, p1=None, p2=None, p3=None, ...):
self.p1 = p1
self.p2 = p2
self.p3 = p3
self.pN = ...
ob1 = MyOb(p1="Tom", p3="New York")
ob2 = MyOb(p1="Joe", p2="j...@host", p3="New Jersey")
..
Hello,
I have many WMV files with bad embedded author/title/date information.
However, the correct information is correctly encoded in the file
name.. i.e. "title-author-date.wmv"
I am about to conver these fiiles to MP$ for use on an iPod. The video
software I am using will, I think, transfer t
>
> One CGI question - since all of my CGIs are spitting out HTML is their
> source code safe? wget and linking to the source deliver the output
> HTML. Are there any other methods of trying to steal the source CGI I
> need to protect against?
>
> Thank you.
Not sure I fully understand the questi
CherryPy looks nice... though I am just looking to generate static
reports.
Thanks anyway... I'll keep it in mind for the future.
On Oct 15, 4:38 am, "Ciprian Dorin Craciun"
<[EMAIL PROTECTED]> wrote:
> Have you tried CherryPy?http://www.cherrypy.org/
>
> It's not a template engine, but a
On Oct 15, 1:26 am, John Nagle <[EMAIL PROTECTED]> wrote:
> allen.fowler wrote:
> > Hello,
>
> > Can anyone recommend a simple python template engine for generating
> > HTML that relies only on the Pyhon Core modules?
>
> > No need for caching, template compi
On Oct 15, 1:26 am, John Nagle <[EMAIL PROTECTED]> wrote:
> allen.fowler wrote:
> > Hello,
>
> > Can anyone recommend a simple python template engine for generating
> > HTML that relies only on the Pyhon Core modules?
>
> > No need for caching, template compi
CherryPy looks nice... though I am just looking to generate static
reports.
Thanks anyway... I'll keep it in mind for the future.
On Oct 15, 4:38 am, "Ciprian Dorin Craciun"
<[EMAIL PROTECTED]> wrote:
> Have you tried CherryPy?http://www.cherrypy.org/
>
> It's not a template engine, but a
Hello,
Can anyone recommend a simple python template engine for generating
HTML that relies only on the Pyhon Core modules?
No need for caching, template compilation, etc.
Speed is not a major issue.
I just need looping and conditionals. Template inheritance would be a
bonus.
I've seen Genshi
> Two possibilieies:
>
> You will need to determine ALL the exceptions that the 3rd party party modules
> can raise. If they are custom exceptions you will need to import them into
> your
> application from their modules.
>
> example:
>
> say that 3rd party modules raise TransientError, IOError,
Hi,
My code looks like this:
for item in bigset:
self.__sub1(item)
self.__sub2(item)
self.__sub3(item)
# the subX functions, in turn, use various 3rd party modules.
Now, I would like to do this:
for item in bigset:
try:
self.__sub1(item)
self.__sub2(item)
self.__sub3(item)
13 matches
Mail list logo