MindMaster32 wrote:
>I am writing a script that has to read data from an ASCII file of
>about 50 Mb and do a lot of searches and calculations with that data.
>That would be a classic problem solved by the use of a database
>(SQLite would suit just fine), but that would require the user to
>install
MindMaster32 wrote:
> I am writing a script that has to read data from an ASCII file of
> about 50 Mb and do a lot of searches and calculations with that data.
> That would be a classic problem solved by the use of a database
> (SQLite would suit just fine), but that would require the user to
> ins
On 3 oct, 22:01, MindMaster32 <[EMAIL PROTECTED]> wrote:
Hi,
Maybe PyDbLite (http://quentel.pierre.free.fr/PyDbLite/index.html) is
what you need : a single Python module, compatible with Python 2.3+,
that lets you manipulate data in memory
You can manage a database like this :
import PyDbLite
d
Michael Bentley wrote:
>
> On Oct 3, 2007, at 1:01 PM, MindMaster32 wrote:
>
>> I am writing a script that has to read data from an ASCII file of
>> about 50 Mb and do a lot of searches and calculations with that data.
>> That would be a classic problem solved by the use of a database
>> (SQLite
On Oct 3, 2007, at 1:01 PM, MindMaster32 wrote:
> I am writing a script that has to read data from an ASCII file of
> about 50 Mb and do a lot of searches and calculations with that data.
> That would be a classic problem solved by the use of a database
> (SQLite would suit just fine), but that w
"Steve Holden" wrote:
> Steven D'Aprano wrote:
> [...]
> >
> > Forth method: create identical gazelles, then modify them:
> >
> > list_of_beasties = [Gazelle(defaults) for i in xrange(1000)]
> > for i, beastie in enumerate(xrange(1000)):
> > list_of_beasties[i] = modify(beastie)
> >
> N
On Apr 19, 9:18 pm, Paddy <[EMAIL PROTECTED]> wrote:
>
> # create a list of instances
> gazelles= [ Gazelle() for x in range(5)]
>
Nice. I knew there had to be a way to use a list comprehension, but I
couldn't figure it out.
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
[...]
>
> Forth method: create identical gazelles, then modify them:
>
> list_of_beasties = [Gazelle(defaults) for i in xrange(1000)]
> for i, beastie in enumerate(xrange(1000)):
> list_of_beasties[i] = modify(beastie)
>
Nope, 'sorry, that's Python a's well. Forth u'se
<[EMAIL PROTECTED]> wrote:
> Howdy, a (possibly) quick question for anyone willing to listen.
> I have a question regarding lists and Classes; I have a class called
It looks you don't really want what you're saying: you appear to want a
list of INSTANCES of one class, *NOT* a list of CLASSES. E.
These methods work. I didn't think I could create a list of objects
like that, however, I stand corrected.
Thanks for your quick (and helpful) responses!
On Apr 19, 11:22 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Thu, 19 Apr 2007 19:58:35 -0700, datamonkey.ryan wrote:
> > Howdy, a (poss
[EMAIL PROTECTED] wrote:
> Howdy, a (possibly) quick question for anyone willing to listen.
> I have a question regarding lists and Classes; I have a class called
> "gazelle" with several attributes (color, position, etc.) and I need
> to create a herd of them. I want to simulate motion of individu
On Thu, 19 Apr 2007 19:58:35 -0700, datamonkey.ryan wrote:
> Howdy, a (possibly) quick question for anyone willing to listen.
> I have a question regarding lists and Classes; I have a class called
> "gazelle" with several attributes (color, position, etc.) and I need
> to create a herd of them. I
On Thursday 19 April 2007, [EMAIL PROTECTED] wrote:
> Howdy, a (possibly) quick question for anyone willing to listen.
> I have a question regarding lists and Classes; I have a class called
> "gazelle" with several attributes (color, position, etc.) and I need
> to create a herd of them. I want to
On Apr 20, 3:58 am, [EMAIL PROTECTED] wrote:
> Howdy, a (possibly) quick question for anyone willing to listen.
> I have a question regarding lists and Classes; I have a class called
> "gazelle" with several attributes (color, position, etc.) and I need
> to create a herd of them. I want to simulat
[EMAIL PROTECTED] wrote:
>
> However, Python doesn't support pointers
As I understand it, every name in Python is a pointer.
class Gazelle(object):
def __init__(self):
self.x = 0
g_list =[]
for x in range(10):
g_list.append(Gazelle())
for g in g_list:
g.x = 10
print g_list[
15 matches
Mail list logo