Re: mmap resizing macosx unix

2009-04-05 Thread David Pratt
new location, then inserting the replacement text. Not quite as smooth as doing a resize(), moving text and inserting if this had worked. Regards, David On 5-Apr-09, at 11:34 AM, Philip Semanchuk wrote: On Apr 5, 2009, at 10:28 AM, David Pratt wrote: Hi. I have been experimenting with mmap re

Re: mmap resizing macosx unix

2009-04-05 Thread David Pratt
documentation for mmap if this is an issue for OSX. I have vmware installed so might try on CentOS to see what happens there. Many thanks Regards, David On 5-Apr-09, at 11:34 AM, Philip Semanchuk wrote: On Apr 5, 2009, at 10:28 AM, David Pratt wrote: Hi. I have been experimenting with

mmap resizing macosx unix

2009-04-05 Thread David Pratt
Hi. I have been experimenting with mmap recently. I determined how to read and write properly from it and so search and replace on large files. The problem I am having is with replaces that are larger than the mmap. In this instance I need to * rewind * resize the mmap to accomodate the tex

mmap regex search replace

2009-04-03 Thread David Pratt
Hi. I have a circumstance where I have to search and replace a block of text in a very large file. I have written some psuedo code to locate the text and print the span of text to be removed and replaced by new block. Can someone advise what to do to remove the text span and insert with the

Re: Ordering attributes for dynamically generated class

2009-01-19 Thread David Pratt
Hi Aaron, this worked out fine. Using an ordered dict to subclass dict. Many thanks. David On Jan 18, 2009, at 11:57 AM, Aaron Brady wrote: On Jan 18, 9:52 am, David Pratt wrote: Hi list. I use 'type' to generate classes but have a need to order the attributes for the generated

Re: Ordering attributes for dynamically generated class

2009-01-18 Thread David Pratt
that works out. Many thanks. Regards, David On Jan 18, 2009, at 11:57 AM, Aaron Brady wrote: On Jan 18, 9:52 am, David Pratt wrote: Hi list. I use 'type' to generate classes but have a need to order the attributes for the generated class. Of course a dict is not going to maintain or

Ordering attributes for dynamically generated class

2009-01-18 Thread David Pratt
Hi list. I use 'type' to generate classes but have a need to order the attributes for the generated class. Of course a dict is not going to maintain ordering. Is there any way to dynamically generate a class with attributes in specific order? my_new_class = type( 'MyNewClass', tuple_of_base

Re: 'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Hey Christian. Many thanks for explanation. Clears that up :-) Regards, David On Nov 29, 2008, at 1:52 PM, Christian Heimes wrote: David Pratt wrote: Hi Mike. Many thanks for your reply and thank you for reference. I have code that looks like the following so initially looking at what

Re: 'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Rob. Sweet! Many thanks. Regards, David On Nov 29, 2008, at 1:46 PM, Rob Williscroft wrote: David Pratt wrote in news:mailman.4664.1227980181.3487.python- [EMAIL PROTECTED] in comp.lang.python: import new class FirstBase(object): foo = 'bar' biz = 'baz' cla

Re: 'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Yeah, can just use types.ClassType instead of new.classobj, but still wonder what happens when we get to python 3. Regards, David On Nov 29, 2008, at 1:04 PM, Michael Crute wrote: On Sat, Nov 29, 2008 at 11:52 AM, David Pratt <[EMAIL PROTECTED]> wrote: Can someone tell me why &#x

Re: 'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
buz = 'brr' attr = { 'fiz': 'An attribute', 'fuz': 'Another one'} Test = new.classobj( 'Test', (FirstBase, SecondBase), attr) class MyNewClass(Test): pass a = MyNewClass() print a.foo, a.buz, a.fiz, type(a) O

'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Can someone tell me why 'new' has been deprecated in python 2.6 and provide direction for code that uses new for the future. I find new is invaluable for some forms of automation. I don't see a replacement for python 3 either. Many thanks. -- http://mail.python.org/mailman/listinfo/python-list

Conditionally subclassing based on Import

2008-10-02 Thread David Pratt
Hi, just want to conditionally base a class on another if it can be imported, otherwise base it on object. Does the following look ok for this? try: import foo.bar except ImportError: MyBase = foo.bar.Baz else: MyBase = object class Something(MyBase): -- http://mail.python.or

Selective importing and package dependencies

2008-09-28 Thread David Pratt
Hi. I am in the midst of preparing a package to convert between various schemas including orms. The issue is I don't want django, slqalchemy, storm, rdflib etc. as hard dependencies of the package. Each module is a schema to schema conversion. As an example, I have imports for sqlalchemy wi

Re: Help replacing os.system call with subprocess call

2008-04-07 Thread David Pratt
essentially equivalent in execution time to original call :-). This has got me smiling. Many thanks Matt for your help, particularly working through the second example that provided equivalent speed. Regards, David David Pratt wrote: > Hi Matt. Many thanks. Sorry I had not seen your second p

Re: Help replacing os.system call with subprocess call

2008-04-07 Thread David Pratt
Hi Matt. Many thanks. Sorry I had not seen your second post. I'll give this a try and time the completion to compare the differences and post back later today to show os.system, buffered imput and using a file directly for stdout. Regards, David Matt Nordhoff wrote: > David Pratt wrot

Re: Help replacing os.system call with subprocess call

2008-04-07 Thread David Pratt
works fine. The speed of this solution is slower than os.system. Would a queue of some kind be needed to speed this up? Has anyone implemented something like this? Many thanks. Regards, David Matt Nordhoff wrote: > David Pratt wrote: >> Hi. I am trying to replace a system call with a s

Help replacing os.system call with subprocess call

2008-04-06 Thread David Pratt
Hi. I am trying to replace a system call with a subprocess call. I have tried subprocess.Popen and subprocess.call with but have not been successful. The command line would be: svnadmin dump /my/repository > svndump.db This is what I am using currently: os.system('svnadmin dump %s > %s' % (svn

cProfile for python 2.4

2008-03-29 Thread David Pratt
I'd like to compile cProfile for python 2.4. Where can I get it to do this? I realize it is part of python 2.5. Many thanks. -- http://mail.python.org/mailman/listinfo/python-list

Python universal build, OSX 10.3.9 and undefined symbols when linking

2007-04-08 Thread David Pratt
Hi. I am on a PPC and have been getting the same undefined symbols traceback when linking applications after compiling. A few weeks back I posted on a problem to pythonmac-sig@python.org after attempting to build mod_python, today its pylucene - same problem. I initially shrugged off the proble

Re: Collecting list of module dependencies

2007-01-01 Thread David Pratt
Hi skip. Many thanks for this. Exactly what I need :-) Regards, David [EMAIL PROTECTED] wrote: > David> Hi. Is anyone aware of any code to create a list of dependent > David> modules for a python module. > > modulefinder: http://docs.python.org/lib/module-modulefinder.html > > Added to

Collecting list of module dependencies

2007-01-01 Thread David Pratt
Hi. Is anyone aware of any code to create a list of dependent modules for a python module. Ideally am looking for something with a method to create a unique list of imported modules that excludes imports from the module being analyzed. Many thanks. Regards, David -- http://mail.python.org/mail

Re: Initializing an attribute that needs the object

2006-06-03 Thread David Pratt
Hi John. Thank you for the tips and the link. This is helpful. Many thanks. Regards David > A new-style class is one which inherits ultimately from the type that is > called "object". > > class NewStyleClass(object): > pass > > class OldStyleClass(): > pass > > Docs are a bit u

Re: Initializing an attribute that needs the object

2006-06-02 Thread David Pratt
Desthuilliers wrote: > David Pratt a écrit : >> Hi. I want to have different handlers to do perform logic. The problem >> is the Handler requires an instance of the factory since it will use its >> own methods in conjunction with methods of the factory. >> >> Once I

Re: Initializing an attribute that needs the object

2006-06-02 Thread David Pratt
My apologies. What I meant to write was this class Factory def __init__(self, handler): David Pratt wrote: > Hi Marco. Thanks for your reply. I am providing the handler with the > factory instance as I have shown. This is how my code currently works. > What I am trying to f

Re: Initializing an attribute that needs the object

2006-06-02 Thread David Pratt
better flexibility. ie. class Factory def __init__(self, factory): At this point I don't have self. Would super help me? Regards, David Marco Giusti wrote: > On Fri, Jun 02, 2006 at 06:15:28PM -0300, David Pratt wrote: >> Hi. I want to have different handlers

Initializing an attribute that needs the object

2006-06-02 Thread David Pratt
Hi. I want to have different handlers to do perform logic. The problem is the Handler requires an instance of the factory since it will use its own methods in conjunction with methods of the factory. Once I have got a Factory instance I can give it a new handler (see below). It would be more fl

Re: Package that imports with name of dependent package

2006-05-13 Thread David Pratt
Hi Peter. Thank you for this warning. I'll document this in the code. I plan on importing only from dependentpackage for portability. Also, much in the framework relies upon it. This approach is primarily for maintenance purposes and would also allow me to package the modified dependentpackage

Re: Package that imports with name of dependent package

2006-05-13 Thread David Pratt
Hi Peter. I'd like to fix the imports, but this would impact the portability of portions of the code that currently work with the existing package from the framework. This solution does the trick and allows me to create the package I want using a good amount of new material. I don't have to wor

Package that imports with name of dependent package

2006-05-13 Thread David Pratt
Hi. I have code that currently depends on a particular package of a framework. I have decided I want to create my own package because I have made many changes and it is getting too difficult to maintain each time I retrieve an updated version of the framework from svn. The problem is, that ther

Re: Removing .DS_Store files from mac folders

2006-03-02 Thread David Pratt
Hi Ben. I hadn't realize that walk was just giving the file name so the join did the job just great. Many thanks for helping me out with this. Regards, David Ben Cartwright wrote: > David Pratt wrote: > >>OSError: [Errno 2] No such file or directory: '.DS_Store'

Re: WxPython question re: embedded activex internet explorer and excel

2006-03-01 Thread David Pratt
Hi jojoba. I work with wxPython too but cannot answer this question. There is an active and friendly community of wxPython users on [EMAIL PROTECTED] Robin Dunn, the lead person behind wxPython and others provide excellent advice and support on this list. Regards, David jojoba wrote: > Hi > I

Re: Removing .DS_Store files from mac folders

2006-03-01 Thread David Pratt
do other things with the files, I though I would do remove while walking the folders instead. I can always go back to this but I am hoping someone can advise a way of deleting a hidden file. I am admin on the mac so permissions is not an issue. Regards, David Ben Cartwright wrote: > David P

Re: Removing .DS_Store files from mac folders

2006-03-01 Thread David Pratt
e: %s' % current_file # Clean mac .DS_Store if current_file == '.DS_Store': print 'a DS_Store item encountered' os.remove(f) Ben Cartwri

Removing .DS_Store files from mac folders

2006-03-01 Thread David Pratt
Hi. I'm trying to clean files for packaging on mac using os.path.walk and want to clean the .DS_Store files that are hidden from view but could end up in code that I produce. # Clean mac .DS_Store if current_file == '.DS_Store': print 'a DS_Store item encountered' os.remove

Re: Recursive tree list from dictionary

2006-01-14 Thread David Pratt
Hi Bengt! I have been banging my head on this one all day! This is brilliant (and recursive through each level which is exactly what I was trying to work out)! Only part I needed to modify is else: return title to else: return [title] I tell you, you've made my day! I was getting a bit discou

Re: Recursive tree list from dictionary

2006-01-14 Thread David Pratt
Hi Allan, Max, and bearophile Many thanks for your replies to this. The number of levels can be deeper than two for creating child, sibling relationships. This can lead to futher nesting as shown in my sample result list (the result I am attempting to acheive) which is reason that I believe thi

Re: Pythonic wrappers for SQL?

2006-01-14 Thread David Pratt
Hi Kenneth. Try SQLAlchemy. Regards, David Kenneth McDonald wrote: > I need to do some data manipulation, and SQLite is a nice little > product for it, except of course that I'd need to write SQL. Are > there any good libraries out there that let one write (basic) queries > in a Pythonic s

Recursive tree list from dictionary

2006-01-14 Thread David Pratt
Hi. I am wanting to create a tree list result structure from a dictionary to categorize results. The dictionary contains elements that identify its parent. The levels of categorization is not fixed, so there is a need for the code to be recursive to drill down to the lowest level. I have contri

Re: Unicode Question

2006-01-09 Thread David Pratt
Hi Max. Many thanks for helping to realize where I was missing the point and making this clearer. Regards, David Max Erickson wrote: > The encoding argument to unicode() is used to specify the encoding of the > string that you want to translate into unicode. The interpreter stores > unicode as

Re: Unicode Question

2006-01-09 Thread David Pratt
Hi Erik. Thank you for your reply. The advice I has helped clarify this for me. Regards, David Erik Max Francis wrote: > David Pratt wrote: > > >>This is not working for me. Can someone explain why. Many thanks. > > > Because '\xbe' isn't UTF-8 for th

Re: Unicode Question

2006-01-09 Thread David Pratt
Hi Martin. Many thanks for your reply. What I am reall after, the following accomplishes. > > If you are looking for "at the same time", perhaps this is also > interesting: > > py> unicode('\xbe', 'windows-1252').encode('utf-8') > '\xc2\xbe' > Your answer really helped quite a bit to clarify t

Unicode Question

2006-01-09 Thread David Pratt
Hi. I am working through some tutorials on unicode and am hoping that someone can help explain this for me. I am on mac platform using python 2.4.1 at the moment. I am experimenting with unicode with the 3/4 symbol. I want to prepare strings for db storage that come from normal Windows machin

Datetime, pytz and strange offset

2005-12-13 Thread David Pratt
Hi. I am creating a couple of small methods to help me manage time from UTC as standard but I am getting strange results. If I start with a datetime of 2005-12-12 14:30:00 in timezone 'America/Halifax' and I want to turn this into a UTC representation. from datetime import datetime from pytz.re

Re: Efficient lookup in list of dictionaries

2005-12-05 Thread David Pratt
This is a lot less clumsy and can easily be used in a class which is very nice! Many thanks bruno and Rob E for this good advice. Regards, David On Monday, December 5, 2005, at 05:31 AM, bruno at modulix wrote: > David Pratt wrote: > (snip) >> Can someone advise a more efficient

Efficient lookup in list of dictionaries

2005-12-04 Thread David Pratt
Hi. I like working with lists of dictionaries since order is preserved in a list when I want order and the dictionaries make it explicit what I have got inside them. I find this combination very useful for storing constants especially. Generally I find myself either needing to retrieve the valu

Re: Whitespace test after string.split

2005-11-26 Thread David Pratt
Hi Fredrik. Good to know. Many thanks for your replies. Regards David On Saturday, November 26, 2005, at 12:27 PM, Fredrik Lundh wrote: > David Pratt wrote: > >> Also thanks for heads up for changes with method. I am >> still using 2.3 but will move to 2.4 as soon a

Re: Whitespace test after string.split

2005-11-26 Thread David Pratt
Hi Fredrik and Peter. Many thanks for this helpful advice :-) These are very nice solutions and much better than what I had been contemplating. Also thanks for heads up for changes with method. I am still using 2.3 but will move to 2.4 as soon as this is formally approved for use in Zope. Re

Whitespace test after string.split

2005-11-26 Thread David Pratt
Hi. I am splitting a string on a non whitespace character. One or more whitespace characters can be returned as items in the list. I do not want the items in the list that are only whitespace (can be one or more characters of whitespace) and plan to use string.strip on those items that are not

Re: Dictionary of tuples from query question

2005-11-14 Thread David Pratt
Thanks Fredrik for your help. Really short and efficient - very nice! Regards, David On Monday, November 14, 2005, at 12:12 PM, Fredrik Lundh wrote: > I meant to write > > d = {} > for index, record in enumerate(cursor.fetchall()): > d[index+1] = tuple(record) > > which can be sh

Re: Dictionary of tuples from query question

2005-11-14 Thread David Pratt
Hi Fredrik. Many thanks for your reply and for the tuple tip. The cursor.fetchall returns a list of lists in this instance with each list in the main list containing the field values. With the tip, I simplified my code to: vlist_dict = {} record_count = 0 for record in cursor.fetchall():

Dictionary of tuples from query question

2005-11-13 Thread David Pratt
Hi. I am interested in having results from a db query in the following form. {1: (value0, value1, value2,), 2: (value0, value1, value2,), 3: (value0, value1, value2,)} so I generate a dictionary of tuples (field values) dynamically so if I queried a table with five fields I would have five field

Re: sqlite3 decode error

2005-11-08 Thread David Pratt
raise Exception(msg) In an unrelated question, it appears SQLite is also extremely flexible about what types of data it can contain. When writing SQL in Postgres I use timestamp type and can use this also in SQLite. With my work with Django, the same information is mapped to datetime type.

sqlite3 decode error

2005-11-08 Thread David Pratt
Recently I have run into an issue with sqlite where I encode strings going into sqlite3 as utf-8. I guess by default sqlite3 is converting this to unicode since when I try to decode I get an attribute error like this: AttributeError: 'unicode' object has no attribute 'decode' The code and dat

Re: Stripping ASCII codes when parsing

2005-10-17 Thread David Pratt
perform these other processes it should be uniform and then it will go into database as unicode. I think this should be ok. Regards, David On Monday, October 17, 2005, at 01:48 PM, Tony Nelson wrote: > In article <[EMAIL PROTECTED]>, > David Pratt <[EMAIL PROTECTED]> wrote: >

Re: Stripping ASCII codes when parsing

2005-10-17 Thread David Pratt
ntrol characters, and check for SQL strings in the data to prevent any stupid things from happening if someone wanted to be malicious. Regards, David On Monday, October 17, 2005, at 12:49 PM, Steve Holden wrote: > David Pratt wrote: > [about ord(), chr() and stripping control characte

Re: Stripping ASCII codes when parsing

2005-10-17 Thread David Pratt
'\a','\b','\e','\f','\n','\r','\t','\v','|' Regards, David On Monday, October 17, 2005, at 06:04 AM, Steve Holden wrote: > David Pratt wrote: >> I am working with a text format that advises to stri

Stripping ASCII codes when parsing

2005-10-17 Thread David Pratt
I am working with a text format that advises to strip any ascii control characters (0 - 30) as part of parsing data and also the ascii pipe character (124) from the data. I think many of these characters are from a different time. Since I have never seen most of these characters in text I am no

Re: CSV module and Mac excel format problem

2005-10-13 Thread David Pratt
Many thanks Andrew for this excellent piece of knowledge :-). 4 characters of code and everything is great! Regards, David On Friday, October 14, 2005, at 12:11 AM, Andrew McNamara wrote: >> Hi. I have had good success with CSV module but recently came across >> problem with reading excel from

CSV module and Mac excel format problem

2005-10-13 Thread David Pratt
Hi. I have had good success with CSV module but recently came across problem with reading excel from Mac Office. The trouble is with line endings. Instead of \r\n you have just \r and the file as a whole appears as a single line. CSV coughs and provides this exception: _csv.Error: newline ins

Re: Python based unacceptable language filter

2005-10-03 Thread David Pratt
entirely. You can also choose between a weak setting for exact word matches or a strong setting that will filter spelling variations." Well I know this thread is a On Sunday, October 2, 2005, at 10:45 PM, Nigel Rowe wrote: > David Pratt wrote: > >> Hi. Is anyone aware of any

Python based unacceptable language filter

2005-10-02 Thread David Pratt
Hi. Is anyone aware of any python based unacceptable language filter code to scan and detect bad language in text from uploads etc. Many thanks. David -- http://mail.python.org/mailman/listinfo/python-list

Re: Sniffing Text Files

2005-09-26 Thread David Pratt
Hi Steven. Thank you for your detailed response. The code will be executed on a web server with limited memory so the desire to keep file loading in check. I like the approach you have suggested to score to give the best guess. It leaves it fairly modular in respect to how detailed you want to

Re: Sniffing Text Files

2005-09-23 Thread David Pratt
Thanks Mike this is really great! Regards, David On Friday, September 23, 2005, at 11:55 AM, Mike Meyer wrote: > David Pratt <[EMAIL PROTECTED]> writes: >> Thanks Mike for your reply. I am not aware of libmagic and will look >> to see what it provides. > > and ...

Re: Sniffing Text Files

2005-09-23 Thread David Pratt
Hi Skip. Thank you for your reply. This is helpful and I am glad I put this to the list. There are some really good ideas that will help me come up with something good to use. Regards, David On Friday, September 23, 2005, at 11:14 AM, [EMAIL PROTECTED] wrote: > > David> I realize CSV modu

Re: Sniffing Text Files

2005-09-23 Thread David Pratt
o the file. As it stands I am filtering mime types to the importing process to attempt to limit the possibilities. Regards, David On Friday, September 23, 2005, at 02:01 AM, Mike Meyer wrote: > David Pratt <[EMAIL PROTECTED]> writes: > >> Hi. I have files that I will b

Sniffing Text Files

2005-09-22 Thread David Pratt
Hi. I have files that I will be importing in at least four different plain text formats, one of them being tab delimited format, a couple being token based uses pipes (but not delimited with pipes), another being xml. There will likely be others as well but the data needs to be extracted and re

Re: Example of signaling and creating a python daemon

2005-09-15 Thread David Pratt
Hi jepler! This is a nice example. I will study it so I can better see what each part is doing. I may have a couple of questions once I have done this because I have not yet daemonized a process and I want to be sure I understand before I attempt to run anything I create. Many thanks. David

Example of signaling and creating a python daemon

2005-09-15 Thread David Pratt
Hi. I am running a zope server. Zope runs 4 threads and I have a document processing method that can require minutes to run so I do not want to run out of threads. A solution to this is to run this process asynchronously. What I am hoping to do is send a signal to a python deamon to run a p

setup install question

2005-08-22 Thread David Pratt
I have two versions of python running - 2.4.1 and 2.3.5. Python 2.4.1 is most current and will execute from 'python' at command line where 2.3.5 will execute from 'python2.3'. A recent problem I have is installing rdflib. It installed and works fine on 2.4.1. rdflib uses 'python setup insta

Re: Splitting string into dictionary

2005-06-30 Thread David Pratt
Thanks George! You guys are great! I am always learning. Python is awesome!! On Friday, July 1, 2005, at 02:33 AM, George Sakkis wrote: > "Robert Kern" wrote: > >> Ignore the last message. >> >> translations = [x.strip(" '") for x in line.split('|')] >> d = dict(zip(translations[::2], transla

Re: Splitting string into dictionary

2005-06-30 Thread David Pratt
Pretty amazing Devan! Great regex! Thank you. Regards, David On Friday, July 1, 2005, at 02:29 AM, Devan L wrote: > One line solution. > dict(re.findall(r"'(.+?)' \| '(.+?)'(?:\s\||$)",yourtexthere)) > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mai

Re: Splitting string into dictionary

2005-06-30 Thread David Pratt
, 2005, at 02:11 AM, Robert Kern wrote: > David Pratt wrote: >> I have string text with language text records that looks like this: >> >> 'en' | 'the brown cow' | 'fr' | 'la vache brun' >> >> Two or more language records ca

Splitting string into dictionary

2005-06-30 Thread David Pratt
I have string text with language text records that looks like this: 'en' | 'the brown cow' | 'fr' | 'la vache brun' Two or more language records can exist in each string (example above shows 2 - but could contain more) The second vertical line character in the example above is the record break

Python JavaScript solution to hold vertical scroll bar

2005-06-27 Thread David Pratt
Hi. I am putting together a database application on Zope. I have built a pager for my records (20 per page) but do not want the browser scroll bars to reset to the top of the browser each time the pager is advanced to the previous or next page. The normal behavior is fine for everything but

Re: Iterate through a list calling functions

2005-06-05 Thread David Pratt
Cool! Many thanks George. Yes this is the way to go - objects. Much better :-) On Sunday, June 5, 2005, at 02:49 PM, George Sakkis wrote: > David Pratt wrote: >> Hi. I am creating methods for form validation. Each validator has its >> own method and there quite a number of t

Re: Iterate through a list calling functions

2005-06-05 Thread David Pratt
s Regards, David On Sunday, June 5, 2005, at 02:03 PM, Kent Johnson wrote: > David Pratt wrote: >> Hi. I am creating methods for form validation. Each validator has its >> own method and there quite a number of these. For each field, I want >> to >> evaluate errors us

Iterate through a list calling functions

2005-06-05 Thread David Pratt
Hi. I am creating methods for form validation. Each validator has its own method and there quite a number of these. For each field, I want to evaluate errors using one or more validators so I want to execute the appropriate validator methods from those available. I am iterating over each va

Re: Max files in unix folder from PIL process

2005-03-28 Thread David Pratt
Hi Jason. Many thanks your reply. This is good to know about ls - what did it do? Was it just slow or did the server or machine die? My images will be going into the path of a web server. This is unchartered territory for me and I don't know whether there will be speed and access problems o

Max files in unix folder from PIL process

2005-03-28 Thread David Pratt
Hi. I am creating a python application that uses PIL to generate thumbnails and sized images. It is beginning to look the volume of images will be large. This has got me to thinking. Is there a number that Unix can handle in a single directory. I am using FreeBSD4.x at the moment. I am thinki

pythonwx with database starting point

2005-03-11 Thread David Pratt
Hi, I am looking for some example code or open source project that involves pythonwx and a database. I am wanting to store images and data on the filesystem and transmit thumbnailed images and subsets of records to the web using xmlrpc preferably. I am wanting the application to be able to be

Re: Secondary list sorting comparison expression

2005-03-08 Thread David Pratt
Hi Raymond. I appreciate your reply. Yes, this is exactly what I was looking for. The syntax I had been trying to work out myself was not correct and not giving me the right thing. Many thanks for your help - this works just the way I wanted. David On Tuesday, March 8, 2005, at 03:46 PM, Raymo

Secondary list sorting comparison expression

2005-03-08 Thread David Pratt
I have been using the following for sorting a list of dictionaries. This works but only provides sorting on a single key. I am wanting to extend this with a better comparison expression so that it would sort on one key as primary, a second key as secondary sort , and maybe even a third as ter