Re: permuting over nested dicts?

2007-11-06 Thread Paddy
On Nov 1, 10:51 am, Christian Meesters <[EMAIL PROTECTED]> wrote: > Thanks everyone, > > I knew there must be a snippet somewhere, just couldn't find one! (Just for > the sake of completeness: Order doesn't matter and I hope that with my data > I won't reach the recursion depth limit.) > > Christia

Re: how to filter files by creation date

2007-11-06 Thread Marc 'BlackJack' Rintsch
On Mon, 05 Nov 2007 23:33:16 -0800, awel wrote: > I am trying to to make a script to move all the files that has been > created at today's to another folder but my problem is the date format > that I receive from the 'os.stat [stat.ST_CTIME]' is different from > the one that I receive from the 'd

What can I do with DLL?

2007-11-06 Thread jane janet
Hello all, I'm a student. I wanna know how to do about my project. I implemented aplication using Ironpython because I have to use .NET library and c# code but I also have to use this application with another Python implemented application. My teacher want me to create DLL file of IronPython i

Re: how to filter files by creation date

2007-11-06 Thread Neil McCallum
> On Mon, 05 Nov 2007 23:33:16 -0800, awel wrote: > > > I am trying to to make a script to move all the files that has been > > created at today's to another folder but my problem is the date format > > that I receive from the 'os.stat [stat.ST_CTIME]' is different from > > the one that I recei

Re: How to use list as key of dictionary?

2007-11-06 Thread Davy
Hi Matimus and Boris, Thank you :) And a further question about vector above rank 1, how can I use it as the key of dictionary? For example, if I have list like L=[[1,2,3],[4,5,6,7]], Then I do L_tuple = tuple(L) >>> L_tuple = ([1,2,3],[4,5,6,7]) But {L_tuple:'hello'} cause an error? Best regar

Re: achieving performance using C/C++

2007-11-06 Thread Palindrom
Thanks to everybody ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python good for data mining?

2007-11-06 Thread Hendrik van Rooyen
"D.Hering" wrote: > > [1] Anything/everything that is physical/virtual, or can be conceived > is hierarchical... if the system itself is not random/chaotic. Thats a > lovely revelation I've had... EVERYTHING is hierarchical. If it has > context it has hierarchy. Do I hear Echoes of What Was Said

Re: How can i find the form name without "nr=0"

2007-11-06 Thread thebjorn
On Nov 5, 6:05 pm, scripteaze <[EMAIL PROTECTED]> wrote: [...] > Well, i wasnt sure if you could have a form without a form name, i was > just thinking that it had one but maybe hidden and that i could > retrieve it I see you've got the answer you wanted already, but just for completeness: the fol

Re: How to use list as key of dictionary?

2007-11-06 Thread Wildemar Wildenburger
Davy wrote: > Hi Matimus and Boris, > > Thank you :) > > And a further question about vector above rank 1, how can I use it as > the key of dictionary? > > For example, if I have list like L=[[1,2,3],[4,5,6,7]], > Then I do L_tuple = tuple(L) L_tuple = ([1,2,3],[4,5,6,7]) > But {L_t

Trouble with for loop

2007-11-06 Thread Shriphani
Hello, I want to try something like: for (a, b, c, d, e, f) in [1, 2, 3, 4, 5, 6, 7, 8, 9]: When I do that I get an error: TypeError: unpack non-sequence My main intention is to state that each of the variables namely a, b, c, ## can take value from 1 to 9. How do I go about this ? Regards

Re: How to use list as key of dictionary?

2007-11-06 Thread Duncan Booth
Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > maybe something like this could help: > > def tupleize(non_tuple): > try: > return tuple(tupleize(thing) for thing in non_tuple) > except TypeError: > # non_tuple is not iterable > return non_tuple > Just do

Re: how to filter files by creation date

2007-11-06 Thread awel
On 6 nov, 09:00, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 05 Nov 2007 23:33:16 -0800, awel wrote: > > I am trying to to make a script to move all the files that has been > > created at today's to another folder but my problem is the date format > > that I receive from the 'os.s

Re: How to use list as key of dictionary?

2007-11-06 Thread Michael Wronna
On Tue, 6 Nov 2007, Boris Borcic wrote: >> We know that list cannot be used as key of dictionary. > Yeah, but do we know why ? I think, because lists are mutable and a key of a dictionary MUST be unmutable, not to crash the dictionary by accidently changing one of its keys! Mike -- http://mai

Re: Trouble with for loop

2007-11-06 Thread Shriphani
On Nov 6, 3:09 pm, Ant <[EMAIL PROTECTED]> wrote: > On Nov 6, 9:59 am, Shriphani <[EMAIL PROTECTED]> wrote: > ... > > > My main intention is to state that each of the variables namely a, b, > > c, ## can take value from 1 to 9. > > How do I go about this ? > > It sounds like you are after something

Re: Trouble with for loop

2007-11-06 Thread Amit Khemka
On 11/6/07, Shriphani <[EMAIL PROTECTED]> wrote: > Hello, > I want to try something like: > > for (a, b, c, d, e, f) in [1, 2, 3, 4, 5, 6, 7, 8, 9]: > > > When I do that I get an error: > TypeError: unpack non-sequence > > My main intention is to state that each of the variables namely a, b, >

Re: Trouble with for loop

2007-11-06 Thread Paul Hankin
Shriphani wrote: > Hello, > I want to try something like: > > for (a, b, c, d, e, f) in [1, 2, 3, 4, 5, 6, 7, 8, 9]: > > > When I do that I get an error: > TypeError: unpack non-sequence > > My main intention is to state that each of the variables namely a, b, > c, ## can take value from 1 to

Re: Trouble with for loop

2007-11-06 Thread Ant
On Nov 6, 9:59 am, Shriphani <[EMAIL PROTECTED]> wrote: ... > My main intention is to state that each of the variables namely a, b, > c, ## can take value from 1 to 9. > How do I go about this ? It sounds like you are after something like: for var in (a, b, c, d, e, f): assert var in [1, 2, 3,

Re: How to use list as key of dictionary?

2007-11-06 Thread Dustan
On Nov 6, 3:58 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > > maybe something like this could help: > > > def tupleize(non_tuple): > > try: > > return tuple(tupleize(thing) for thing in non_tuple) > > except TypeError: > >

Re: How to use list as key of dictionary?

2007-11-06 Thread Davy
And there may be more complex list(vector like 3 or 4 dimentional data structure), is there any easy method to tackle this problem? Any suggestions are welcome! Best regards, Davy On Nov 6, 4:50 pm, Davy <[EMAIL PROTECTED]> wrote: > Hi Matimus and Boris, > > Thank you :) > > And a further questi

Re: how to filter files by creation date

2007-11-06 Thread Marc 'BlackJack' Rintsch
On Tue, 06 Nov 2007 01:45:02 -0800, awel wrote: > On 6 nov, 09:00, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Mon, 05 Nov 2007 23:33:16 -0800, awel wrote: >> > I am trying to to make a script to move all the files that has been >> > created at today's to another folder but my proble

Re: How to use list as key of dictionary?

2007-11-06 Thread Paul McGuire
On Nov 6, 4:08 am, Dustan <[EMAIL PROTECTED]> wrote: > On Nov 6, 3:58 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > > > Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > > > maybe something like this could help: > > > > def tupleize(non_tuple): > > > try: > > > return tuple(tupleize(

Re: How to use list as key of dictionary?

2007-11-06 Thread Duncan Booth
Paul McGuire <[EMAIL PROTECTED]> wrote: > On Nov 6, 4:08 am, Dustan <[EMAIL PROTECTED]> wrote: >> On Nov 6, 3:58 am, Duncan Booth <[EMAIL PROTECTED]> wrote: >> >> > Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: >> > > maybe something like this could help: >> >> > > def tupleize(non_tuple): >> >

What about a Python Tree container?

2007-11-06 Thread Roc Zhou
Hello, Recently I'm working on a new data structure written in python: Tree, by operator overloading. I want it can act as a builtin type, such as list and dict, but do something like a tree, to make those things need trees can be more convenient. For example, 1. to create a Tree, there are sever

Re: How to use list as key of dictionary?

2007-11-06 Thread Steven D'Aprano
On Tue, 06 Nov 2007 10:46:48 +0100, Wildemar Wildenburger wrote: > Davy wrote: > > Hi Matimus and Boris, > > > > Thank you :) > > > > And a further question about vector above rank 1, how can I use it as > > the key of dictionary? > > > > For example, if I have list like L=[[1,2,3],[4,5,6,

Re: How to use list as key of dictionary?

2007-11-06 Thread Boris Borcic
You could also index on the repr() of your objects, which is an immutable str value. Davy wrote: > And there may be more complex list(vector like 3 or 4 dimentional data > structure), is there any easy method to tackle this problem? > > Any suggestions are welcome! > > Best regards, > Davy > >

Re: how to filter files by creation date

2007-11-06 Thread Marc 'BlackJack' Rintsch
On Tue, 06 Nov 2007 02:35:46 -0800, awel wrote: >> >> In [438]: !touch test.py >> >> >> In [439]: >> >> datetime.date.fromtimestamp(os.stat('/home/bj/test.py').st_ctime) >> >> Out[439]: datetime.date(2007, 11, 6) >> >> > Could you explain a little more because I am new in scripting? >> >> Not rea

Re: how to filter files by creation date

2007-11-06 Thread awel
On 6 nov, 11:27, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Tue, 06 Nov 2007 01:45:02 -0800, awel wrote: > > On 6 nov, 09:00, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >> On Mon, 05 Nov 2007 23:33:16 -0800, awel wrote: > >> > I am trying to to make a script to move all the

Re: python in academics?

2007-11-06 Thread Nicolas.Chauvat
Le Mon, 29 Oct 2007 20:39:29 -0700, sandipm a écrit : > seeing posts from students on group. I am curious to know, Do they teach > python in academic courses in universities? I am teaching assistant for the course http://www.etudes.ecp.fr/cours/claroline/course/index.php?cid=TI1210 held at http

List to Tuple and Tuple to List?

2007-11-06 Thread Davy
Hi all, I am curious about whether there is function to fransform pure List to pure Tuple and pure Tuple to pure List? For example, I have list L = [[1,2,3],[4,5,6]] something list2tuple() will have T=list2tuple(L)=((1,2,3),(4,5,6)) And the tuple2list() Any suggestions are welcome! Best regar

Re: List to Tuple and Tuple to List?

2007-11-06 Thread Paul Hankin
On Nov 6, 11:18 am, Davy <[EMAIL PROTECTED]> wrote: > Hi all, > > I am curious about whether there is function to fransform pure List to > pure Tuple and pure Tuple to pure List? > > For example, > > I have list L = [[1,2,3],[4,5,6]] > something list2tuple() will have T=list2tuple(L)=((1,2,3),(4,5,

Re: How to use list as key of dictionary?

2007-11-06 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Not quite, because that will also convert strings to tuples, which may > not be what you want for a general solution. I take it you didn't actually try the original code then. Converting strings to tuples is not something it did. > That works for

Pythonic ORM with support for composite primary/foreign keys?

2007-11-06 Thread Wolfgang Keller
Hello, so far it seems to me as if the only ORM module for Python which supports composite primary/foreign keys was SQLAlchemy. Which looks a little bit "overbloated" for my needs: I "just" need to be able to define a "logical model" (à la UML) in Python and have the ORM connect to a database

Re: Python good for data mining?

2007-11-06 Thread Aaron Watters
On Nov 6, 4:19 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "D.Hering" wrote: > > > [1] Anything/everything that is physical/virtual, or can be conceived > > is hierarchical... if the system itself is not random/chaotic. Thats a > > lovely revelation I've had... EVERYTHING is hierarchical

Re: List to Tuple and Tuple to List?

2007-11-06 Thread Boris Borcic
Davy wrote: > Hi all, > > I am curious about whether there is function to fransform pure List to > pure Tuple and pure Tuple to pure List? > > For example, > > I have list L = [[1,2,3],[4,5,6]] > something list2tuple() will have T=list2tuple(L)=((1,2,3),(4,5,6)) > > And the tuple2list() > > An

Re: Trouble with for loop

2007-11-06 Thread Paul Hankin
On Nov 6, 10:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > On Nov 6, 3:09 pm, Ant <[EMAIL PROTECTED]> wrote: > > > On Nov 6, 9:59 am, Shriphani <[EMAIL PROTECTED]> wrote: > > ... > > > > My main intention is to state that each of the variables namely a, b, > > > c, ## can take value from 1 to 9. >

Re: Trouble with for loop

2007-11-06 Thread Boris Borcic
Shriphani wrote: > On Nov 6, 3:09 pm, Ant <[EMAIL PROTECTED]> wrote: >> On Nov 6, 9:59 am, Shriphani <[EMAIL PROTECTED]> wrote: >> ... >> >>> My main intention is to state that each of the variables namely a, b, >>> c, ## can take value from 1 to 9. >>> How do I go about this ? >> It sounds like yo

Re: Pythonic ORM with support for composite primary/foreign keys?

2007-11-06 Thread Marco Mariani
Wolfgang Keller wrote: > so far it seems to me as if the only ORM module for Python which > supports composite primary/foreign keys was SQLAlchemy. Which looks a > little bit "overbloated" for my needs: I "just" need to be able to > define a "logical model" (à la UML) in Python and have the ORM

Re: help

2007-11-06 Thread A.T.Hofkamp
On 2007-11-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > please open this link this is will help you > > http://www.55a.net > This one might help as well: http://www.python.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What about a Python Tree container?

2007-11-06 Thread Boris Borcic
Roc Zhou wrote: > Hello, Hello, This post is too long. The right place for such is as a python reciepe on ActiveState. BTW, I bet you can find 3+ equivalents to you Tree type in the recorded reciepes. Regards, BB -- http://mail.python.org/mailman/listinfo/python-list

Re: Python good for data mining?

2007-11-06 Thread UrsusMaximus
On Nov 6, 7:10 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > On Nov 6, 4:19 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > > > "D.Hering" wrote: > > > > [1] Anything/everything that is physical/virtual, or can be conceived > > > is hierarchical... if the system itself is not random/chaotic

Re: Pythonic ORM with support for composite primary/foreign keys?

2007-11-06 Thread Jeff
Django has a wonderful ORM that can be used separately from the framework, but it is pretty top-heavy as well. I'm afraid that size is the price you pay for abstraction. Your business logic code shrinks, but the supporting libraries grow. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic ORM with support for composite primary/foreign keys?

2007-11-06 Thread jay graves
On Nov 6, 8:29 am, Jeff <[EMAIL PROTECTED]> wrote: > Django has a wonderful ORM that can be used separately from the > framework, but it is pretty top-heavy as well. I'm afraid that size > is the price you pay for abstraction. Your business logic code > shrinks, but the supporting libraries grow.

Drawing charts in Qt

2007-11-06 Thread Michel Albert
I would like to display some charts in a Qt application. But all the docs I find online are rather dusty and talk about Qt3. My application uses Qt4 however. I ran into PyQwt and matplotlib. But the docs of matplotlib are horrid and the example in their wiki covers Qt3, and things look quite crypti

manually cutting a picture

2007-11-06 Thread Joseph king
I have a kinda hard question i am trying to build a jigsaw game with python, i would like to give the option for people to create there own puzzle piece does anyone know how to accomplish this it is becoming increasingly difficult for me -- http://mail.python.org/mailman/listinfo/python-li

Re: Pythonic ORM with support for composite primary/foreign keys?

2007-11-06 Thread Jean-Paul Calderone
On Tue, 06 Nov 2007 12:58:02 +0100, Wolfgang Keller <[EMAIL PROTECTED]> wrote: >Hello, > > [snip] > >So, is there another ORM module for Python besides SQLAlchemy which >supports composite porimary (and foreign) keys, and maybe also other >more "advanced", maybe even some of the PostgreSQL-specific

Please explain collections.defaultdict(lambda: 1)

2007-11-06 Thread metaperl.com
I'm reading http://norvig.com/spell-correct.html and do not understand the expression listed in the subject which is part of this function: def train(features): model = collections.defaultdict(lambda: 1) for f in features: model[f] += 1 return model Per http://docs.python.org/

Parallel Python environments..

2007-11-06 Thread bruce
Hi.. If I wanted to be able to build/test/use parallel python versions, what would I need to do/set (paths/libs/etc...) and where would I need to place the 2nd python version, so as not to screw up my initial python dev env. I'd like to be able to switch back/forth between the different versions

Re: Please explain collections.defaultdict(lambda: 1)

2007-11-06 Thread Paul McGuire
On Nov 6, 8:54 am, "metaperl.com" <[EMAIL PROTECTED]> wrote: > I'm readinghttp://norvig.com/spell-correct.html > > and do not understand the expression listed in the subject which is > part of this function: > > def train(features): > model = collections.defaultdict(lambda: 1) > for f in fe

Re: Pythonic ORM with support for composite primary/foreign keys?

2007-11-06 Thread Jonathan LaCour
jay graves wrote: > On Nov 6, 8:29 am, Jeff <[EMAIL PROTECTED]> wrote: > >> Django has a wonderful ORM that can be used separately from the >> framework, but it is pretty top-heavy as well. I'm afraid that size >> is the price you pay for abstraction. Your business logic code >> shrinks, but the

Re: Please explain collections.defaultdict(lambda: 1)

2007-11-06 Thread Duncan Booth
"metaperl.com" <[EMAIL PROTECTED]> wrote: > Per http://docs.python.org/lib/defaultdict-examples.html > > It seems that there is a default factory which initializes each key to > 1. So by the end of train(), each member of the dictionary model will > have value >= 1 > > But why wouldnt he set the

Re: Drawing charts in Qt

2007-11-06 Thread Jeremy Sanders
Michel Albert wrote: > Has anyone ever successfully used these graphing libraries with PyQt? > Or are there other graphing libraries available? In fact, my needs are > modest. A Line- and Bar-Chart would solve the majority of problems. Veusz does line charts, and stepped charts (which are almost

Re: Is pyparsing really a recursive descent parser?

2007-11-06 Thread Neil Cerutti
On 2007-11-05, Just Another Victim of the Ambient Morality <[EMAIL PROTECTED]> wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I'm not sure one needs to start again with a naive approach >> just to avoid any parser theory. For a user of a parser it is >> qu

Re: How to use list as key of dictionary?

2007-11-06 Thread Steven D'Aprano
On Tue, 06 Nov 2007 11:25:29 +, Duncan Booth wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > > >> Not quite, because that will also convert strings to tuples, which may >> not be what you want for a general solution. > > I take it you didn't actually try the original code then. N

pyuno and calc

2007-11-06 Thread luca72
Hello Can you tell me where i can find some example that's show how to open an existing oocalc document and get some data from it? Thanks Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Drawing charts in Qt

2007-11-06 Thread David Boddie
On Tue Nov 6 15:46:07 CET 2007, Michel Albert wrote: [PyQwt and matplotlib] > PyQwt looks much more interesting, but I have trouble installing it. > On my machine it complains that sipconfig "has no attribute > '_pkg_config'". Is the configuration script finding the sipconfig file for SIP 3 or S

Re: Parallel Python environments..

2007-11-06 Thread Thorsten Kampe
* bruce (Tue, 6 Nov 2007 07:13:43 -0800) > If I wanted to be able to build/test/use parallel python versions, what > would I need to do/set (paths/libs/etc...) nothing > and where would I need to place the 2nd python version, so as not to > screw up my initial python dev env. Anywhere you like (

Re: Parallel Python environments..

2007-11-06 Thread [EMAIL PROTECTED]
In Gentoo Linux you can select between installed python version using python-config script. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is pyparsing really a recursive descent parser?

2007-11-06 Thread asdfjehqwjerhqjwljekrh
On Nov 2, 6:47 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > Well I'll be darned! All this time, I thought "recursive descent" > described the recursive behavior of the parser, which pyparsing > definitely has. I never knew that backing up in the face of parse > mismatches was a required part of

Re: Parallel Python environments..

2007-11-06 Thread Diez B. Roggisch
bruce wrote: > Hi.. > > If I wanted to be able to build/test/use parallel python versions, what > would I need to do/set (paths/libs/etc...) and where would I need to place > the 2nd python version, so as not to screw up my initial python dev env. > > I'd like to be able to switch back/forth bet

python equivalent to heckle

2007-11-06 Thread rustom
heckle in ruby is inspired by jester for java. I quote: Heckle is a mutation tester. It modifies your code and runs your tests to make sure they fail. The idea is that if code can be changed and your tests don't notice, either that code isn't being covered or it doesn't do anything. from http://gl

Re: python equivalent to heckle

2007-11-06 Thread Simon Brunning
On 11/6/07, rustom <[EMAIL PROTECTED]> wrote: > heckle in ruby is inspired by jester for java. I quote: > > Heckle is a mutation tester. It modifies your code and runs your tests > to make sure they fail. The idea is that if code can be changed and > your tests don't notice, either that code isn't

Re: regular expressions

2007-11-06 Thread Paul Hankin
On Nov 6, 4:49 pm, [EMAIL PROTECTED] wrote: > hi i am looking for pattern in regular expreesion that replaces > anything starting with and betweeen http:// until / > likehttp://www.start.com/startservice/yellow/fdhttp://helo/abcdwill > be replaced as > p/startservice/yellow/ fdp/abcd What have you

Re: pyuno and calc

2007-11-06 Thread Rafael Sachetto
Maybe here: http://www.broffice.org/odfpy1 On 11/6/07, luca72 <[EMAIL PROTECTED]> wrote: > > Hello > Can you tell me where i can find some example that's show how to open > an existing oocalc document and get some data from it? > > Thanks Luca > > -- > http://mail.python.org/mailman/listinfo/pytho

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-06 Thread Damjan
>> PyQt and PySDL are AFAIK not much "less weight". > > They don't use X11. That's a _lot_ "less weight". Do you mean the X11 server or the libraries? The kdrive server should be fairly small (depending on features). I think it builds from the main xorg source today?? Isn't that what maemo uses.

Insane crazy question - printing commands

2007-11-06 Thread Donn Ingle
Hi, I'm doing something odd with pycairo and friends and I want to see what commands are coming out of my objects. Here's some code: class Box: def draw() self.context.set_source_rgb(1, 0, 0) self.context.rectangle(0, 00, 50, 50) self.context.fill() Box.draw() draws a red box, all fine. B

Re: *** Will DEVASTATE and BANKRUPT any Brit daring to get out of line ***

2007-11-06 Thread zionist . news
Thanks for the useful info ... appreciate your efforts. On Oct 26, 10:37 am, [EMAIL PROTECTED] wrote: > http://www.ft.com/cms/s/0/56cb5b92-10a7-11dc-96d3-000b5df10621.html?n... > > Harvard legal expert vows to sue lecturers boycotting Israel > > By Jon Boone > > Published: June 2 2007 03:00 > > A

Re: regular expressions

2007-11-06 Thread J. Clifford Dyer
On Tue, Nov 06, 2007 at 08:49:33AM -0800, [EMAIL PROTECTED] wrote regarding regular expressions: > > hi i am looking for pattern in regular expreesion that replaces > anything starting with and betweeen http:// until / > like http://www.start.com/startservice/yellow/ fdhttp://helo/abcd will > be

Re: Insane crazy question - printing commands

2007-11-06 Thread Guilherme Polo
2007/11/6, Donn Ingle <[EMAIL PROTECTED]>: > Hi, > I'm doing something odd with pycairo and friends and I want to see what > commands are coming out of my objects. > > Here's some code: > > class Box: > def draw() > self.context.set_source_rgb(1, 0, 0) > self.context.rectangle(0, 00, 50, 50) >

Re: Insane crazy question - printing commands

2007-11-06 Thread Guilherme Polo
2007/11/6, Donn <[EMAIL PROTECTED]>: > > import inspect > > > > class Box: > > def draw(self): > > print "hi" > > return 3 > > > > x = Box() > > print inspect.getsource(x.draw) > > Tried that, but get this error. I did a dir(inspect) in the command env. and > getsource it definitely there... > > Tr

Re: Insane crazy question - printing commands

2007-11-06 Thread Marc 'BlackJack' Rintsch
On Tue, 06 Nov 2007 19:42:08 +0200, Donn wrote: > Tried that, but get this error. I did a dir(inspect) in the command env. and > getsource it definitely there... > > Traceback (most recent call last): > File "inspect.py", line 1, in ? > import inspect > > File > "/home/donn/Projects/py

Re: Insane crazy question - printing commands

2007-11-06 Thread Donn
> import inspect > > class Box: >     def draw(self): >         print "hi" >         return 3 > > x = Box() > print inspect.getsource(x.draw) Tried that, but get this error. I did a dir(inspect) in the command env. and getsource it definitely there... Traceback (most recent call last): File "i

Re: Insane crazy question - printing commands

2007-11-06 Thread Jean-Paul Calderone
On Tue, 06 Nov 2007 19:09:21 +0200, Donn Ingle <[EMAIL PROTECTED]> wrote: >Hi, >I'm doing something odd with pycairo and friends and I want to see what >commands are coming out of my objects. > >Here's some code: > >class Box: > def draw() > self.context.set_source_rgb(1, 0, 0) > self.context.rec

Bill Gates was never the Richest man on earth

2007-11-06 Thread zionist . news
The world have been after Bill Gates for no reason. The richest group was and remains the Zionist jew Rothschilds family who own HALF the worlds total wealth through numerous frontmen zionists. Mikhail Khodorkovsky, whom Russian President Vladimir I Putin put in jail rose from the Rothschilds mone

Re: Insane crazy question - printing commands

2007-11-06 Thread Donn Ingle
Thanks for the replies -- Python, is there anything it can't do? :D \d -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expressions

2007-11-06 Thread Paul McGuire
On Nov 6, 11:07 am, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: > On Tue, Nov 06, 2007 at 08:49:33AM -0800, [EMAIL PROTECTED] wrote regarding > regular expressions: > > > > > hi i am looking for pattern in regular expreesion that replaces > > anything starting with and betweeen http:// until / >

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-06 Thread Grant Edwards
On 2007-11-06, Damjan <[EMAIL PROTECTED]> wrote: >>> PyQt and PySDL are AFAIK not much "less weight". >> >> They don't use X11. That's a _lot_ "less weight". > > Do you mean the X11 server or the libraries? Both. -- Grant Edwards grante Yow! Bo Derek ruined

Re: Bill Gates was never the Richest man on earth

2007-11-06 Thread David R Tribble
Zionist wrote: > The world have been after Bill Gates for no reason. The richest group > was and remains the Zionist jew Rothschilds family who own HALF the > worlds total wealth through numerous frontmen zionists. > > google video and youtube have many videos on the family. You can set > aside par

Populating huge data structures from disk

2007-11-06 Thread Michael Bacarella
For various reasons I need to cache about 8GB of data from disk into core on application startup. Building this cache takes nearly 2 hours on modern hardware. I am surprised to discover that the bottleneck here is CPU. The reason this is surprising is because I expect something like this to

Rothschilds own half the worlds wealth directly and indirectly thru zionist proxies Re: Bill Gates was never the Richest man on earth

2007-11-06 Thread zionist . news
Rothschilds control half the world's wealth directly and indirectly using zionist proxies, and loyalty based on the zionist racist cult History of the Rothschilds part 1 http://www.youtube.com/watch?v=o_u2MaNg-EQ History of the Rothschilds part 2 http://www.youtube.com/watch?v=o2cw-0N_Unk FBI, W

Re: [Python.NET] What can I do with DLL?

2007-11-06 Thread Christian Heimes
jane janet wrote: > I'm a student. I wanna know how to do about my project. > I implemented aplication using Ironpython because I have to use .NET library > and c# code but I also have to use this application with another Python > implemented application. My teacher want me to create DLL file of

Re: Populating huge data structures from disk

2007-11-06 Thread Chris Mellon
On Nov 6, 2007 12:18 PM, Michael Bacarella <[EMAIL PROTECTED]> wrote: > > > > > For various reasons I need to cache about 8GB of data from disk into core on > application startup. > Are you sure? On PC hardware, at least, doing this doesn't make any guarantee that accessing it actually going to be

Re: Bill Gates was never the Richest man on earth

2007-11-06 Thread William Hughes
On Nov 6, 12:53 pm, [EMAIL PROTECTED] wrote: > The world have been after Bill Gates for no reason. The richest group > was and remains the Zionist jew Rothschilds family who own HALF the > worlds total wealth through numerous frontmen zionists. Everyone should know that the Zionists (among others

How do I get the PC's Processor speed?

2007-11-06 Thread kyosohma
Hi, We use a script here at work that runs whenever someone logs into their machine that logs various bits of information to a database. One of those bits is the CPU's model and speed. While this works in 95% of the time, we have some fringe cases where the only thing returned is the processor nam

Re: How do I get the PC's Processor speed?

2007-11-06 Thread Chris Mellon
On Nov 6, 2007 1:18 PM, <[EMAIL PROTECTED]> wrote: > Hi, > > We use a script here at work that runs whenever someone logs into > their machine that logs various bits of information to a database. One > of those bits is the CPU's model and speed. While this works in 95% of > the time, we have some

Re: How do I get the PC's Processor speed?

2007-11-06 Thread kyosohma
On Nov 6, 1:35 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Nov 6, 2007 1:18 PM, <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > We use a script here at work that runs whenever someone logs into > > their machine that logs various bits of information to a database. One > > of those bits is th

subprocess chokes on spaces in path

2007-11-06 Thread BartlebyScrivener
Using bash on Debian Etch. If word_doc = sys.argv[1] and it's a file name like My\ Word.doc this function reads My and Word as two separate files unless the second '%s' is quoted. Took me a lot of trial and error to discover. Is this the most elegant way to do it? I was using popen originally, th

Re: How do I get the PC's Processor speed?

2007-11-06 Thread kyosohma
On Nov 6, 2:27 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Nov 6, 2007 2:12 PM, <[EMAIL PROTECTED]> wrote: > > > > > On Nov 6, 1:35 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > > On Nov 6, 2007 1:18 PM, <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > We use a script here at work

RE: Populating huge data structures from disk

2007-11-06 Thread Michael Bacarella
> > For various reasons I need to cache about 8GB of data from disk into core on > > application startup. > > Are you sure? On PC hardware, at least, doing this doesn't make any > guarantee that accessing it actually going to be any faster. Is just > mmap()ing the file a problem for some reason? >

Re: subprocess chokes on spaces in path

2007-11-06 Thread Thorsten Kampe
* BartlebyScrivener (Tue, 06 Nov 2007 20:32:33 -) > Using bash on Debian Etch. > > If word_doc = sys.argv[1] and it's a file name like My\ Word.doc this > function reads My and Word as two separate files unless the second > '%s' is quoted. Took me a lot of trial and error to discover. Is this

Re: subprocess chokes on spaces in path

2007-11-06 Thread Gabriel Genellina
En Tue, 06 Nov 2007 17:32:33 -0300, BartlebyScrivener <[EMAIL PROTECTED]> escribió: > Using bash on Debian Etch. > > If word_doc = sys.argv[1] and it's a file name like My\ Word.doc this > function reads My and Word as two separate files unless the second > '%s' is quoted. Took me a lot of tria

Re: How do I get the PC's Processor speed?

2007-11-06 Thread Jeff McNeil
http://www.linuxhardware.org/features/01/10/09/1514233.shtml AMD has historically used model numbers that are slightly higher than the actual clock speed. I have a 2300 that runs at 1.9. -Jeff On Nov 6, 2007, at 3:27 PM, Chris Mellon wrote: > On Nov 6, 2007 2:12 PM, <[EMAIL PROTECTED]> wro

RE: How do I get the PC's Processor speed?

2007-11-06 Thread Michael Bacarella
> On the problem PCs, both of these methods give me the same information > (i.e. only the processor name). However, if I go to "System > Properties" and look at the "General" tab, it lists the CPU name and > processor speed. Does anyone else know of another way to get at this > information? This i

Re: How do I get the PC's Processor speed?

2007-11-06 Thread Chris Mellon
On Nov 6, 2007 2:12 PM, <[EMAIL PROTECTED]> wrote: > On Nov 6, 1:35 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > On Nov 6, 2007 1:18 PM, <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi, > > > > > We use a script here at work that runs whenever someone logs into > > > their machine that log

Re: Populating huge data structures from disk

2007-11-06 Thread Neil Cerutti
On 2007-11-06, Michael Bacarella <[EMAIL PROTECTED]> wrote: > And there's no solace in lists either: > > $ time python eat800.py > > real4m2.796s > user3m57.865s > sys 0m3.638s > > $ cat eat800.py > #!/usr/bin/python > > import struct > > d = [] > f = open('/dev/zero') > for i in xr

RE: Populating huge data structures from disk

2007-11-06 Thread Michael Bacarella
> Note that you're not doing the same thing at all. You're > pre-allocating the array in the C code, but not in Python (and I don't > think you can). Is there some reason you're growing a 8 gig array 8 > bytes at a time? > > They spend about the same amount of time in system, but Python spends 4.7

Wanted: Software Engineers in San Jose, CA

2007-11-06 Thread Peter Hsu
I hope job posting is appropriate on this mailing list. I couldn't find anything indicating otherwise. I'm looking for software engineers of all levels to help create a next-generation spam filtering solution for Abaca Technology. Abaca is located in San Jose, CA. The job posting for the sen

Re: Populating huge data structures from disk

2007-11-06 Thread Paul Rubin
"Michael Bacarella" <[EMAIL PROTECTED]> writes: > Very sure. If we hit the disk at all performance drops > unacceptably. The application has low locality of reference so > on-demand caching isn't an option. We get the behavior we want when > we pre-cache; the issue is simply that it takes so lon

RE: global name is not defined

2007-11-06 Thread Looney, James B
Looks like you forgot to import EMR_globals, EMR_main, etc. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > ] On Behalf Of barronmo > Sent: Tuesday, November 06, 2007 2:57 PM > To: [email protected] > Subject: global name is not defined > > I'm getting

Re: Populating huge data structures from disk

2007-11-06 Thread Chris Mellon
On Nov 6, 2007 3:42 PM, Michael Bacarella <[EMAIL PROTECTED]> wrote: > > > Note that you're not doing the same thing at all. You're > > pre-allocating the array in the C code, but not in Python (and I don't > > think you can). Is there some reason you're growing a 8 gig array 8 > > bytes at a time?

Re: global name is not defined

2007-11-06 Thread Gabriel Genellina
En Tue, 06 Nov 2007 18:57:12 -0300, barronmo <[EMAIL PROTECTED]> escribió: > I'm getting an error msg I don't understand, "global name EMR_globals > is not defined", and could use some help. > > I've separated the application I'm building into several modules. One > of the modules holds variables

  1   2   >