t;
> I guess stripogram would be more pythonic :
> http://sourceforge.net/project/showfiles.php?group_id=1083
>
> Regards,
>
> Laurent
>
> Diez B. Roggisch wrote:
>
> > Ksenia Marasanova wrote:
> >
> >> Hi,
> >>
> >> I am looking for a li
Hi,
I am looking for a library that will give me very simple text
representation of HTML.
For example
TitleThis is a test
will be transformed to:
Title
This is a
test
i want to send plain text alternative of html email, and would prefer
to do it automatically from HTML source.
Any hints?
Tha
Hi,
I have python2.3, installed from port /lang/python long time ago. The
current version is 2.4, but I'd rather have two python versions,
instead of upgrading.
Is there maybe a way to somehow link installed python to
/lang/python2.3 port, and then upgrade ports and install /lang/python
as a new (
Thanks to all, especially to Stuart, for very informative answers.
It's clear to me now that there is no need in my case to use
functions / stored procedures (yes, with typical MVC app I meant a
webapp on the same server with database, administered by the same
persons). However it can be a useful
18 Sep 2005 09:11:51 -0700, Alex <[EMAIL PROTECTED]>:
> Rossum's tutorial on Python states:
it's "Van Rossum's" :)
"van" in a part of the last name, you can't just cut it away in Dutch :)
--
Ksenia
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I wonder if anyone on this list is using Python as Postgres
procedural language. I can't find a place for it i my mind. How would
a typical MVC web application benefit from it (besides performance)?
I understand from the docs that Postgres 7.4 has PL/PythonU -
unlimited functionality. It sou
2005/9/9, Peter Otten <[EMAIL PROTECTED]>:
> Ksenia Marasanova wrote:
>
> > class BasemethodMeta(type):
> > def__new__(cls,class_name,bases,new_attrs):
> > cls=type.__new__(cls,class_name,bases,new_attrs)
> > new_attrs['__me
2005/9/9, Ksenia Marasanova <[EMAIL PROTECTED]>:
> class BasemethodMeta(type):
> def __new__(cls, class_name, bases, new_attrs):
> cls = type.__new__(cls, class_name, bases, new_attrs)
> new_attrs['__metaclass__'].cls = cls
> return
Hi all,
I am creating some library, and want use "declarative" style in the
subclasses as much as possible, while the actual use will be more
method-like.
Just to give an impression, the library would be something like this:
class Baseclass(object):
# lot's of code goes here...
class Baseme
2005/9/8, Sokolov Yura <[EMAIL PROTECTED]>:
> Django Model is wonderfull. But SQLObject more flexible (and powerfull,
> as i think, and has already more db interfaces).
> But Django Model is tied with Django, and using Django with another OO
> mapping is not comfortable.
> Why do not working togeth
> return [(node.id, node.ord_number) for node in self.get_path()]
I meant:
> return [(node.ord_number, node.id) for node in self.get_path()]
--
Ksenia
--
http://mail.python.org/mailman/listinfo/python-list
2005/8/10, Peter Otten <[EMAIL PROTECTED]>:
> I think you cannot get away with your first rule, but have to operate on the
> full path instead. Otherwise the position of inner nodes would sometimes be
> determined by their url and sometimes by their ord_number *during* *the*
> *same* *sort*.
Rrr.
Example of the wrong sort:
class Node:
def __init__(self, name, url, order, pid, id):
self.name = name
self.url = url
self.order = order
self.pid = pid
self.id = id
def __repr__(self):
return '%s [order: %s]' % (self.url, self.order)
def
> class Node:
> def __init__(self, name, url, order, pid, id):
> self.name = name
> self.url = url
> self.order = order
> self.pid = pid
> self.id = id
> def __repr__(self):
> return self
Hi,
I have a list that contains nodes from a tree. Each node is a class
instance, but I'll use dictionary here to simplify the example.
So the list looks like this:
[
{'id': 1,
'name': 'Parent node',
'ord_number': 1,
'parent_id': 0,
'url': '/parentnode/'},
{'id': 2,
'name': 'My node',
'ord_number'
12 Jun 2005 08:12:14 -0700, Michele Simionato <[EMAIL PROTECTED]>:
> What about doing it yourself?
>
> >>> import inspect, os
> >>> print "%s" % inspect.getsource(os.makedirs)
That's easy, thanks! I guess I'll submit a patch for Epydoc with the
functionality I've mentioned :)
--
Ksenia
--
htt
Hi,
I wonder if there is a tool for generation Python API documentation
that can include source code into HTML output. Example:
http://api.rubyonrails.com/ I really like the possibility to click on
"show source" link and read the source of the method!
AFAIK it is not possible with Epydoc and Pydo
> Ksenia - I recently came across this python web-based FM:
>
> http://snakelets.sourceforge.net/filemgr/index.html
>
> It is by Irmen De Jong, the author of Snakelets.
>
Looks good! Thank you very much :)
--
Ksenia
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I didn't suceed in finding any kind of standard web based file
manager, written in Python. There are quite a lot for PHP (the nicest
I found is phpXplorer: http://www.phpxplorer.org) , but I'd rather use
Python. I don't mind installing one of the millions webframeworks for
this (well, except f
On 4/13/05, James Carroll <[EMAIL PROTECTED]> wrote:
> I've had fantastic results with SimpleTAL
> http://www.owlfish.com/software/simpleTAL/
>
> It uses the Zope Page Templates style markups (which are wysiwyg in
> dreamweaver) and then pulls contents from python functions and
> 'contexts' ve
> In the interests of full disclosure, I'm the author of EmPy.
>
Cool :)
> All I meant by that note was that EmPy was not primarily designed for
> blazing speed; that is, it could easily be made much more efficient in a
> lot of ways. I've never had a need to do so, so it's always been low
> pri
> >
> http://www.reportlab.org/preppy.html
Looks very close to what I was looking for :)
Thanks!
--
Ksenia
--
http://mail.python.org/mailman/listinfo/python-list
> In EmPy, your template would look something like this::
>
>
> @[for record in records]@
> @record.title
> @[end for]@
>
>
> Batch expanding the template would look like something as simple as
> (substituting in your example)::
>
> ...
>
Hi,
I am looking for fast, simple templating system that will allow me to
do the following:
- embed Python code (or some templating code) in the template
- generate text output (not only XML/HTML)
I don't need a framework (already have it), but just simple
templating. The syntax I had in mind is
On 19 Mar 2005 14:16:42 -0800, Tian <[EMAIL PROTECTED]> wrote:
> How can I create an instance of an object from a string?
>
> For example, I have a class Dog:
> class Dog:
> def bark(self):
> print "Arf!!!"
>
> I have a string:
> classname = "Dog"
>
> How can I create a instance of Dog fro
John, Serge, thanks for your help!
utf-16le encoding didn't help. I had however to solve it yesterday,
so I used csv module to create CSV file and then import it in Excel.
Excel still had troubles with accented characters, but this is another
story: it seems that Office 2004 Excel (for Mac, but I
> > There is some amount of data in a database (PG) that must be inserted
> > into Excel sheet and emailed. Nothing special, everything works.
> > Except that non-ascii characters are not displayed properly.
> > The data is stored as XML into a text field.
>
> This sentence doesn't make much sense
Hi,
I have a little problem with encoding. Was hoping maybe anyone can
help me to solve it.
There is some amount of data in a database (PG) that must be inserted
into Excel sheet and emailed. Nothing special, everything works.
Except that non-ascii characters are not displayed properly.
The data
You can also do:
settings = {}
execfile('/path/to/file/myconfig.conf', settings)
myconfig.conf is a Python file. After this all variables from
myconfig.conf are stored in settings dictionary.
--
Ksenia
--
http://mail.python.org/mailman/listinfo/python-list
This is close to what you want:
http://freespace.virgin.net/hamish.sanderson/htmlcalendar.html
You'll also need HTMLTemplate
http://freespace.virgin.net/hamish.sanderson/htmltemplate.html
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I want to show preview of several HTML formatted newsitems on one
page, preserving markup (and images) intact, but showing not more
thatn X first _readable_ words of every page. Is anyone aware of some
Python library that makes programming this easy? I already started to
program it with Beaut
> >
> > I was wondering, is there a general way to escape the string entered
> > by the user, to prevent code injection into command line?
>
> Take a look at the "string-escape" encoding:
>
> >>> evil = "'; rm -rf /;"
> >>> command = "echo '%s'"
> >>> print command % evil.encode('string-escape')
Hi,
I have a simple ecard creation script on a website, where user can add
text to a graphic. I use ImageMagick for it:
# template_file => path to image template file
# new_file => path to generated file
# text => user input
command = '''convert %s -font OfficinaSanITC-BookOS -pointsize 12
-fill
33 matches
Mail list logo