[ANN] TurboGears 1.1rc1 released

2009-09-22 Thread Christopher Arndt
On behalf of the TurboGears Team, I am pleased to announce that TurboGears 1.1rc1 is available for download at http://turbogears.org/ and the Python package index http://pypi.python.org/pypi/TurboGears TurboGears 1.1rc1 is the first release candidate for the upcoming 1.1 release, which

[ANN]: IronPython 2.6 Release Candidate 1

2009-09-22 Thread Dave Fugate
Hello Python Community, We're pleased to announce the release of IronPython 2.6 Release Candidate 1 which can be freely downloaded at http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=30315. Over the development span of IronPython 2.6, exactly 417 bugs have been fixed.

Solved - Python: automate input to MySQL query

2009-09-22 Thread Threader Slash
-- Forwarded message -- From: Philip Semanchuk phi...@semanchuk.com To: Python-list (General) python-list@python.org Date: Mon, 21 Sep 2009 08:49:27 -0400 Subject: Re: Python: automate input to MySQL query On Sep 21, 2009, at 5:18 AM, Threader Slash wrote: Hi Everybody...

Re: easy question, how to double a variable

2009-09-22 Thread Processor-Dev1l
On Sep 20, 10:27 pm, daggerdvm dagger...@yahoo.com wrote:  Write the definition of a function  twice , that receives an  int parameter and returns an  int that is twice the value of the parameter. how can i do this I will stop this theatre... as you should know, you want your function to

[SQL] Pick random rows from SELECT?

2009-09-22 Thread Threader Slash
Here is a simple and quick solution -- Generate a random number random.shuffle(x[, random])¶Shuffle the sequence x in place. The optional argument random is a 0-argument function returning a random float in [0.0, 1.0); by default, this is the function random().

Hi, SOAP lib for Python 3.0

2009-09-22 Thread Ares
Hi, Does anyone have a reccommendation on the best soap library for Python 3.0? The libs I found only support python 2.6 or belove. Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: using python 2.5

2009-09-22 Thread Dave Angel
kunal.k wrote: I have installed python 2.5 for a particular code. Now i have 2.6 already installed. How do i direct this code to use the 2.5 modules?? I can think of two different questions you might be asking. 1) How do I get the add-on modules installed with 2.6 to also work in 2.5? or

Re: easy question, how to double a variable

2009-09-22 Thread Hendrik van Rooyen
On Monday, 21 September 2009 22:50:31 daggerdvm wrote: carl banks.you are a dork No mister_do_my_homework, he is not. He is actually a respected member of this little community. You, however, are beginning to look like one. Why do you not come clean - tell us what you are doing,

Re: where is ctrl+newline handled in pywin editor?

2009-09-22 Thread Roger Upole
C or L Smith wrote: I use the pywin environment on Windows for python code editing and interactive environment. I've been able to find the place in the editor files where the enter key is handled and where the whitespace is stripped from a line and I've been able to get it to not leave any

Re: passing object between classes

2009-09-22 Thread Duncan Booth
daved170 daved...@gmail.com wrote: Is there any existing python Log object that do so? There is. See Jean-Michel Pichavant's reply. I no, I created my own Log object that only open file and write a line to it, how can I make it be global? You could assign it to a global name. Should I

Re: Looking for a pure Python chart drawing module

2009-09-22 Thread Nick Craig-Wood
John Nagle na...@animats.com wrote: I'm looking for something that can draw simple bar and pie charts in Python. I'm trying to find a Python package, not a wrapper for some C library, as this has to run on both Windows and Linux and version clashes are a problem. Here's the list from

Re: easy question, how to double a variable

2009-09-22 Thread Tim Chase
daggerdvm wrote: what are you retarded? this is not a test you moron, i can ask all the questions i want about it. You seem to have forgotten to CC the list. Let me help show the world your mad skillz -- at replying, at programming, at orthography, at interpersonal communication... Sure

Re: recommendation for webapp testing?

2009-09-22 Thread Ryan Kelly
I need to do some basic website testing (log into account, add item to cart, fill out and submit forms, check out, etc.). What modules would be good to use for webapp testing like this? Windmill is an option, but I haven't tried it myself I'll second Windmill as an option, have had good

difficulty in understanding rsplit(None,1)[1]

2009-09-22 Thread hrishy
Hi What does rsplit(None,1)[1] accomplish. Can somebody please decompose that to me. regards -- http://mail.python.org/mailman/listinfo/python-list

Re: easy question, how to double a variable

2009-09-22 Thread daggerdvm
you brain needs error checking! -- http://mail.python.org/mailman/listinfo/python-list

Re: easy question, how to double a variable

2009-09-22 Thread Andreas Waldenburger
On Mon, 21 Sep 2009 13:46:31 -0700 (PDT) daggerdvm dagger...@yahoo.com wrote: u don't want to answerthen why post?...get lost. You're not doing yourself a favor with this attitude, much less displaying it. You asked a question that you could have solved with 1 hour's worth of

problem in encryption

2009-09-22 Thread jayshree
hello , The community members, Using following code : fileHandle = open ('jay1key.py','wb') #fileHandle = open ('jay1key.pem',rb).read() print fileHandle.write (data) #data variable is contains the key fileHandle.close() otp = 'jyshri69' pub_key = M2Crypto.RSA.load_pub_key('jay1key.py')

Re: problem in encryption

2009-09-22 Thread jayshree
On Sep 22, 1:44 pm, jayshree jayshree06c...@gmail.com wrote: hello , The community members, Using following code  : fileHandle = open ('jay1key.py','wb') #fileHandle = open ('jay1key.pem',rb).read() print fileHandle.write (data) #data variable is contains the key fileHandle.close() otp

Re: difficulty in understanding rsplit(None,1)[1]

2009-09-22 Thread Martin P. Hellwig
hrishy wrote: Hi What does rsplit(None,1)[1] accomplish. Can somebody please decompose that to me. regards Sure: test = 'This is a test' help(test.rsplit) Help on built-in function rsplit: rsplit(...) S.rsplit([sep [,maxsplit]]) - list of strings Return a list of the words in

Re: easy question, how to double a variable

2009-09-22 Thread Donn
On Monday 21 September 2009 22:49:50 daggerdvm wrote: you brain needs error checking! try: return response() except Troll,e: raise dontFeed(anymore=True) \d -- home: http://otherwise.relics.co.za/ 2D vector animation : https://savannah.nongnu.org/projects/things/ Font manager :

Re: difficulty in understanding rsplit(None,1)[1]

2009-09-22 Thread hrishy
Hi Martin Many thanks And by the way great way to explain that thing --- On Tue, 22/9/09, Martin P. Hellwig martin.hell...@dcuktec.org wrote: From: Martin P. Hellwig martin.hell...@dcuktec.org Subject: Re: difficulty in understanding rsplit(None,1)[1] To: python-list@python.org Date:

Re: entry widget won't validate

2009-09-22 Thread Peter Otten
Mike wrote: On Sep 21, 12:47 pm, Peter Otten __pete...@web.de wrote: Mike wrote: I'm trying to arrange for an Entry widget to check whether its data is all digits and whether the number represented is small enough. The validate function seem to be called once at startup and not

Combining sets/dictionaries

2009-09-22 Thread Alfons Nonell-Canals
Hello, I have different sets/dictionaries/lists (whatever you want because I can convert them easily) and I would like to combine them. I don't want a consensus and something like it. I'd need to combine all elements of the first one with the all elements of the second one and third,... the

Re: Combining sets/dictionaries

2009-09-22 Thread Peter Otten
Alfons Nonell-Canals wrote: I have different sets/dictionaries/lists (whatever you want because I can convert them easily) and I would like to combine them. I don't want a consensus and something like it. I'd need to combine all elements of the first one with the all elements of the second

Re: easy question, how to double a variable

2009-09-22 Thread koranthala
On Sep 21, 1:27 am, daggerdvm dagger...@yahoo.com wrote:  Write the definition of a function  twice , that receives an  int parameter and returns an  int that is twice the value of the parameter. how can i do this Please note that most mails here are humorous - as should be expected for a

Re: Tkinter - Text - bullets

2009-09-22 Thread eb303
On Sep 22, 7:45 am, Thomas Lehmann iris-und-thomas-lehm...@t- Online.de wrote: This is probably why you had all these alignment problems. But it's weird, because the script I posted is copied and pasted from a really script that I've run, and which doesn't cause any error. What is the

Re: socket send O(N**2) complexity

2009-09-22 Thread Antoine Pitrou
exarkun at twistedmatrix.com writes: To the OP, you can get view-like behavior with the buffer builtin. And, on Python 3 (or even the 2.7 in development), you can use the memoryview builtin for similar effect. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Combining sets/dictionaries

2009-09-22 Thread Adrien
Hi, Did you try the list.update() builtin function ? Regards Peter Otten a écrit : Alfons Nonell-Canals wrote: I have different sets/dictionaries/lists (whatever you want because I can convert them easily) and I would like to combine them. I don't want a consensus and something like it.

Re: easy question, how to double a variable

2009-09-22 Thread Mel
Tim Roberts wrote: daggerdvm dagger...@yahoo.com wrote: carl banks.you are a dork What are you, eleven years old? Look, you asked us to answer for you what is CLEARLY a homework question. It is unethical for you to ask that, and it is unethical for us to answer it. Forget

Re: Combining sets/dictionaries

2009-09-22 Thread Mel
Alfons Nonell-Canals wrote: Hello, I have different sets/dictionaries/lists (whatever you want because I can convert them easily) and I would like to combine them. I don't want a consensus and something like it. I'd need to combine all elements of the first one with the all elements of the

Re: Not this one the other one, from a dictionary

2009-09-22 Thread Sion Arrowsmith
Vlastimil Brom vlastimil.b...@gmail.com wrote: other_key = (set(data_dict.iterkeys()) - set([not_wanted_key,])).pop() other_key = set(data_dict.iterkeys()).difference([not_wanted]).pop() saves you the construction of an unnecessary set instance. At the cost of a bit more verbosity, you can get

Re: easy question, how to double a variable

2009-09-22 Thread Ben Finney
Mel mwil...@the-wire.com writes: Tim Roberts wrote: Look, you asked us to answer for you what is CLEARLY a homework question. It is unethical for you to ask that, and it is unethical for us to answer it. Forget ethical. We can do his homework for him, we can perhaps pass exams for him,

Re: problem in encryption

2009-09-22 Thread Piet van Oostrum
jayshree jayshree06c...@gmail.com (j) wrote: j hello , j The community members, j Using following code : j fileHandle = open ('jay1key.py','wb') j #fileHandle = open ('jay1key.pem',rb).read() j print fileHandle.write (data) #data variable is contains the key j fileHandle.close() j otp =

Re: Substitute for KConfig in Qt4

2009-09-22 Thread David Boddie
On Sat Sep 19 12:18:40 CEST 2009, nusch wrote: On Sep 19, 3:53 am, David Boddie da... at boddie.org.uk wrote: On Thursday 17 September 2009 13:04, nusch wrote: I want to remove pyKDE dependencies from my app to make it pure PyQt. What will be the best substitute for KConfig? What

Re: Combining sets/dictionaries

2009-09-22 Thread Carl Banks
On Sep 22, 3:08 am, Alfons Nonell-Canals alfons.non...@upf.edu wrote: Hello, I have different sets/dictionaries/lists (whatever you want because I can convert them easily) and I would like to combine them. I don't want a consensus and something like it. I'd need to combine all elements of the

Re: easy question, how to double a variable

2009-09-22 Thread Mahmoud Abdelkader
http://codingforums.com/showthread.php?s=e26b8b0aabc69745ef24a855b1a0fc83t=177529 It seems that this dude really is looking for how to double a variable... hi looking for help catching up in a class and overall to get me better than i am now. I can pay you by the week or per hour. everything

Re: easy question, how to double a variable

2009-09-22 Thread Grant Edwards
On 2009-09-22, Mel mwil...@the-wire.com wrote: Tim Roberts wrote: daggerdvm dagger...@yahoo.com wrote: carl banks.you are a dork What are you, eleven years old? Look, you asked us to answer for you what is CLEARLY a homework question. It is unethical for you to ask that, and it

Re: Combining sets/dictionaries

2009-09-22 Thread Alfons Nonell-Canals
Hello, finally I've solved it using a combinatorics library which allows to do this kind of things. Here, here is an example: http://automatthias.wordpress.com/2007/04/28/cartesian-product-of-multiple-sets/ Thanks for your suggestions. Regards, Alfons. Carl Banks wrote: On Sep 22, 3:08

Re: Finding application data after install - a solution?

2009-09-22 Thread Aahz
In article mailman.232.1253597842.2807.python-l...@python.org, Wolodja Wentland wentl...@cl.uni-heidelberg.de wrote: I want to: 1. Give administrators the freedom to install the data wherever they want 2. Adhere to the FHS (installing data within modules breaks it) 3. Be able

Dynamic Form

2009-09-22 Thread Victor Subervi
Hi; I have a dynamic form in which I do the following: 1) Request two fields (company name, number of entries). That is sent back to the form. 2) If the two fields are not None, the form requests other data. That, too, is sent back to the form. 3) That new data is then entered into a MySQL table.

Re: OK to memoize re objects?

2009-09-22 Thread Hyuga
On Sep 21, 11:02 am, Nobody nob...@nowhere.com wrote: On Mon, 21 Sep 2009 07:11:36 -0700, Ethan Furman wrote: Looking in the code for re in 2.5: _MAXCACHE = 100 On the other hand, I (a re novice, to be sure) have only used between two to five in any one program... it'll be a while

Re: easy question, how to double a variable

2009-09-22 Thread Hyuga
On Sep 22, 9:57 am, Grant Edwards inva...@invalid.invalid wrote: On 2009-09-22, Mel mwil...@the-wire.com wrote: Tim Roberts wrote: daggerdvm dagger...@yahoo.com wrote: carl banks.you are a dork What are you, eleven years old? Look, you asked us to answer for you what is

Re: Dynamic Form

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 10:46 AM, Victor Subervi victorsube...@gmail.com wrote: Hi; I have a dynamic form in which I do the following: 1) Request two fields (company name, number of entries). That is sent back to the form. 2) If the two fields are not None, the form requests other data. That,

Re: Dynamic Form--Potential purge cache?

2009-09-22 Thread bouncy...@gmail.com
Personally that sounds like the data needs to be deliberately oveerittren in the form. That or the cache has to be cleared by a remote instruction. Unfortunately I know how to do neither :[ --Original Message-- From: Simon Forman sajmik...@gmail.com To: python-list@python.org Date: Tue,

Module inspection by name

2009-09-22 Thread Nadav Chernin
Hi all, a have easy question for python developers. Assume I have list of all objects: obj=dir() Now I want to know which object from obj list is module. I searched some method in module inspection, but there is not any method that get 'string' as parameters Any reply will be

Re: Module inspection by name

2009-09-22 Thread Jean-Michel Pichavant
Nadav Chernin wrote: Hi all, a have easy question for python developers. Assume I have list of all objects: obj=dir() Now I want to know which object from “obj” list is module. I searched some method in module inspection, but there is not any method that get ‘string’ as parameters Any

Re: Finding application data after install - a solution?

2009-09-22 Thread Wolodja Wentland
On Tue, Sep 22, 2009 at 07:42 -0700, Aahz wrote: I want to: 1. Give administrators the freedom to install the data wherever they want 2. Adhere to the FHS (installing data within modules breaks it) 3. Be able to find that data again regardless of the installation

Re: entry widget won't validate

2009-09-22 Thread Mike
On Sep 22, 4:29 am, Peter Otten __pete...@web.de wrote: Mike wrote: On Sep 21, 12:47 pm, Peter Otten __pete...@web.de wrote: Mike wrote: I'm trying to arrange for an Entry widget to check whether its data is all digits and whether the number represented is small enough. The validate

Re: Dynamic Form

2009-09-22 Thread Victor Subervi
Well it's Web stuff, sure, but it's written in python :) The code follows. The problem is that I haven't figured out how to tell the program that the user has entered data and to clear the cache of that data so that it's not re-entered. How do I do that? TIA, Victor #!/usr/bin/python import

Set literal confusion

2009-09-22 Thread kaoruAngel
I recently decided to implement a small project in python after being away from the language for a while, so, in learning the language over again, I experimented. --- Python 3.1.1 (r311:74483, Aug 17 2009, 16:45:59) [MSC v.1500 64 bit (AMD64)] on win32 5 in

Re: easy question, how to double a variable

2009-09-22 Thread Xavier Ho
On Tue, Sep 22, 2009 at 11:58 PM, Mahmoud Abdelkader mabdelka...@gmail.comwrote: hi looking for help catching up in a class and overall to get me better than i am now. I can pay you by the week or per hour. Wow. I'd feel guilty getting paid doing that. Sounds all too easy. I hope he is

Re: Not this one the other one, from a dictionary

2009-09-22 Thread Jean Daniel
Building on the answers of the others, a simple one liner, no side effect, not the fastest I guess: d={'a': 'bob', 'b': 'stu'} set( d.keys() ).difference( [ 'a' ] ).pop() 'b' Note the square brackets for the parameter of difference(). 'The string 'a' and the list [ 'a' ] are both iterable but

Re: Set literal confusion

2009-09-22 Thread Peter Otten
kaoruAngel wrote: I recently decided to implement a small project in python after being away from the language for a while, so, in learning the language over again, I experimented. --- Python 3.1.1 (r311:74483, Aug 17 2009, 16:45:59) [MSC v.1500 64 bit

Re: Set literal confusion

2009-09-22 Thread Vlastimil Brom
2009/9/22 kaoruAngel kaoruan...@gmail.com: I recently decided to implement a small project in python after being away from the language for a while, so, in learning the language over again, I experimented. --- Python 3.1.1 (r311:74483, Aug 17 2009,

Re: Set literal confusion

2009-09-22 Thread Peter Otten
Dennis Lee Bieber wrote: range() is what used to be xrange() -- an on-demand generator of values. You created a set containing a single generator. Try something like: 5 in {list(range(10))} No. {expr} is always a set with a single element. {range(10)} {range(0, 10)} That element cannot

How can I tell if variable is defined

2009-09-22 Thread Brown, Rodrick
How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } I tried if var is not None: However this doesn't seem to work as described. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I tell if variable is defined

2009-09-22 Thread Sean DiZazzo
On Sep 22, 11:03 am, Brown, Rodrick rodrick.br...@citi.com wrote: How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } I tried if var is not None: However this doesn't seem to work as described. Thanks. try: var except NameError:

Re: How can I tell if variable is defined

2009-09-22 Thread Rami Chowdhury
On Tue, 22 Sep 2009 11:03:25 -0700, Brown, Rodrick rodrick.br...@citi.com wrote: How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } I tried if var is not None: However this doesn't seem to work as described. Thanks. Could you let us

Re: How can I tell if variable is defined

2009-09-22 Thread Grant Edwards
On 2009-09-22, Brown, Rodrick rodrick.br...@citi.com wrote: How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } try: yourNameHere except NameError: print undefined else: print defined I tried if var is not None: However this

Re: Substitute for KConfig in Qt4

2009-09-22 Thread nusch
On Sep 22, 3:43 pm, David Boddie dbod...@trolltech.com wrote: On Sat Sep 19 12:18:40 CEST 2009, nusch wrote: On Sep 19, 3:53 am, David Boddie da... at boddie.org.uk wrote: On Thursday 17 September 2009 13:04, nusch wrote: I want to remove pyKDE dependencies from my app to make it pure

Re: Module inspection by name

2009-09-22 Thread Dave Angel
Jean-Michel Pichavant wrote: div class=moz-text-flowed style=font-family: -moz-fixedNadav Chernin wrote: Hi all, a have easy question for python developers. Assume I have list of all objects: obj=dir() Now I want to know which object from “obj” list is module. I searched some method in

custom data warehouse in python vs. out-of-the-box ETL tool

2009-09-22 Thread snfctech
Does anyone have experience building a data warehouse in python? Any thoughts on custom vs using an out-of-the-box product like Talend or Informatica? I have an integrated system Dashboard project that I was going to build using cross-vendor joins on existing DBs, but I keep hearing that a data

Re: How can I tell if variable is defined

2009-09-22 Thread Dave Angel
Brown, Rodrick wrote: How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } I tried if var is not None: However this doesn't seem to work as described. Thanks. try/except Or look up the attribute in the appropriate dictionary(ies).

Re: How can I tell if variable is defined

2009-09-22 Thread Mel
Grant Edwards wrote: On 2009-09-22, Brown, Rodrick rodrick.br...@citi.com wrote: How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } try: yourNameHere except NameError: print undefined else: print defined This being

Read header and data from a binary file

2009-09-22 Thread Jose Rafael Pacheco
Hello, I want to read from a binary file called myaudio.dat Then I've tried the next code: import struct name = myaudio.dat f = open(name,'rb') f.seek(0) chain = 4s 4s I 4s I 20s I I i 4s I 67s s 4s I s = f.read(4*1+4*1+4*1+4*1+4*1+20*1+4*1+4*1+4*1+4*1+4*1+67*1+1+4*1+4*1) a =

Re: How can I tell if variable is defined

2009-09-22 Thread Peter Otten
Brown, Rodrick wrote: How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } I tried if var is not None: However this doesn't seem to work as described. But in Python this often is the most idiomatic way to check whether a variable was

set breakpoint in another module/file

2009-09-22 Thread Daniel
Is there a way with pdb to set a breakpoint in another module directly using a command similar to set_trace() ? For example, I'd like to do something like this in my source code: import pdb pdb.setbreak(42, /path/to/universe.py, name == 'hitchhiker') Is there a way to do (something like) that

Re: How can I tell if variable is defined

2009-09-22 Thread Peter Otten
Mel wrote: Grant Edwards wrote: On 2009-09-22, Brown, Rodrick rodrick.br...@citi.com wrote: How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } try: yourNameHere except NameError: print undefined else: print defined

Re: set breakpoint in another module/file

2009-09-22 Thread Stef Mientki
Daniel wrote: Is there a way with pdb to set a breakpoint in another module directly using a command similar to set_trace() ? For example, I'd like to do something like this in my source code: import pdb pdb.setbreak(42, /path/to/universe.py, name == 'hitchhiker') I think winpdb ( nothing

Re: How can I tell if variable is defined

2009-09-22 Thread Mel
Peter Otten wrote: Mel wrote: Grant Edwards wrote: On 2009-09-22, Brown, Rodrick rodrick.br...@citi.com wrote: How could I do the following check in Python In Perl I could do something like if ((defined($a)) { ... } [ ... ] This is an artifact of the interactive interpreter, True.

DBHandler class for logging?

2009-09-22 Thread kj
I've come across mentions of a mythical class of logging handlers called DBHandler, but I can't find it anywhere. Could someone please point me in the right direction? (FWIW, I'm looking for ways to log messages to PostgreSQL RDBMS.) TIA! kynn --

Re: DBHandler class for logging?

2009-09-22 Thread Diez B. Roggisch
kj schrieb: I've come across mentions of a mythical class of logging handlers called DBHandler, but I can't find it anywhere. Could someone please point me in the right direction? (FWIW, I'm looking for ways to log messages to PostgreSQL RDBMS.) I'm not aware such a thing is part of the

Re: DBHandler class for logging?

2009-09-22 Thread kj
In 7hsukcf2tqht...@mid.uni-berlin.de Diez B. Roggisch de...@nospam.web.de writes: kj schrieb: I've come across mentions of a mythical class of logging handlers called DBHandler, but I can't find it anywhere. Could someone please point me in the right direction? (FWIW, I'm looking for

Searching a large dictionary

2009-09-22 Thread Support Desk
I need help searching a large python dictionary. The dictionary is setup like so Key[{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}]

Re: custom data warehouse in python vs. out-of-the-box ETL tool

2009-09-22 Thread Sean DiZazzo
On Sep 22, 1:00 pm, snfctech tschm...@sacfoodcoop.com wrote: Does anyone have experience building a data warehouse in python?  Any thoughts on custom vs using an out-of-the-box product like Talend or Informatica? I have an integrated system Dashboard project that I was going to build using

Re: Read header and data from a binary file

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 4:30 PM, Jose Rafael Pacheco jose_rafael_pach...@yahoo.es wrote: Hello, I want to read from a binary file called myaudio.dat Then I've tried the next code: import struct name = myaudio.dat f = open(name,'rb') f.seek(0) Don't bother to seek(0) on a file you just

Re: Read header and data from a binary file

2009-09-22 Thread MRAB
Jose Rafael Pacheco wrote: Hello, I want to read from a binary file called myaudio.dat Then I've tried the next code: import struct name = myaudio.dat f = open(name,'rb') f.seek(0) chain = 4s 4s I 4s I 20s I I i 4s I 67s s 4s I s =

Re: DBHandler class for logging?

2009-09-22 Thread Diez B. Roggisch
kj schrieb: In 7hsukcf2tqht...@mid.uni-berlin.de Diez B. Roggisch de...@nospam.web.de writes: kj schrieb: I've come across mentions of a mythical class of logging handlers called DBHandler, but I can't find it anywhere. Could someone please point me in the right direction? (FWIW, I'm

Re: Not this one the other one, from a dictionary

2009-09-22 Thread Vlastimil Brom
Thanks for the elaboration; in retrospect, given the simple requirement, that there are only two dict keys, one of which is know and the other to be determined, maybe just the direct dict methods are appropriate, e.g. d = {'a': 'bob', 'b': 'stu'} d_copy = dict(d) d_copy.pop(a) 'bob'

Re: Searching a large dictionary

2009-09-22 Thread Chris Rebert
On Tue, Sep 22, 2009 at 2:50 PM, Support Desk support.desk@gmail.com wrote: I need help searching a large python dictionary. The dictionary is setup like so Key[{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}]

Re: Searching a large dictionary

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 5:50 PM, Support Desk support.desk@gmail.com wrote: I need help searching a large python dictionary. The dictionary is setup like so Key[{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}]

Re: Searching a large dictionary

2009-09-22 Thread Support Desk
Chris, Yes that is the correct syntax, thanks On Tue, Sep 22, 2009 at 5:22 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Sep 22, 2009 at 2:50 PM, Support Desk support.desk@gmail.com wrote: I need help searching a large python dictionary. The dictionary is setup like so

Re: Searching a large dictionary

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 6:30 PM, Support Desk support.desk@gmail.com wrote: Chris,  Yes that is the correct syntax, thanks Okay, but correct syntax of what? Help us help you. On Tue, Sep 22, 2009 at 5:22 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Sep 22, 2009 at 2:50 PM,

Re: .h files?

2009-09-22 Thread rogerdpack4
What python distributions are you referring to? The ones I know don't make this distinction; there is only a single set of header files that you can choose to install. Ok good to know. -r -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching a large dictionary

2009-09-22 Thread Chris Rebert
On Tue, Sep 22, 2009 at 5:22 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Sep 22, 2009 at 2:50 PM, Support Desk support.desk@gmail.com wrote: I need help searching a large python dictionary. The dictionary is setup like so

Re: Searching a large dictionary

2009-09-22 Thread Chris Rebert
-Original Message- From: Chris Rebert c...@rebertia.com Sent: Tuesday, September 22, 2009 5:35 PM To: Support Desk support.desk@gmail.com Cc: python-list@python.org Subject: Re: Searching a large dictionary On Tue, Sep 22, 2009 at 5:22 PM, Chris Rebert c...@rebertia.com wrote:

Solved - Python: automate input to MySQL query

2009-09-22 Thread Threader Slash
Hi Dennis, You're right. Putting allows indentation. Great! About putting the name of the table: x.travelerID, etc.. I think it keep the query more documented, specially when you are dealing with 5 tables in a same query, like this query. Cheers.. Threader. -- Forwarded message

Re: socket send O(N**2) complexity

2009-09-22 Thread Nobody
On Mon, 21 Sep 2009 16:33:08 -0400, Jack Diederich wrote: AIUI, as a python string is imutable, a slice of a string is a new string which points (C char *) to the start of the slice data and with a length that is the length of the slice, about 8 bytes on 32 bit machine. Not in CPython.

Re: difficulty in understanding rsplit(None,1)[1]

2009-09-22 Thread Martin P. Hellwig
John Machin wrote: On Sep 22, 7:10 pm, hrishy hris...@yahoo.co.uk wrote: Hi Martin Many thanks And by the way great way to explain that thing great way to find out for yourself faster than waiting for a response from the internet ;-) I have been called many things in the past but being

Re: socket send O(N**2) complexity

2009-09-22 Thread Jack Diederich
On Tue, Sep 22, 2009 at 7:25 PM, Nobody nob...@nowhere.com wrote: On Mon, 21 Sep 2009 16:33:08 -0400, Jack Diederich wrote: AIUI, as a python string is imutable, a slice of a string is a new string which points (C char *) to the start of the slice data and with a length that is the length of

Re: difficulty in understanding rsplit(None,1)[1]

2009-09-22 Thread nopsidy
lol -nop nop nop -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I tell if variable is defined

2009-09-22 Thread Dave Angel
Mel wrote: snip This is an artifact of the interactive interpreter, True. You can avoid the artifact by wrapping the test in a function: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information.

Re: Searching a large dictionary

2009-09-22 Thread Dave Angel
Support Desk wrote: I need help searching a large python dictionary. The dictionary is setup like so Key[{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}]

Re: set breakpoint in another module/file

2009-09-22 Thread millerdev
I think winpdb ( nothing todo with windows-OS ) can do that and much more. The problem with winpdb (which I played with a long time ago) is that it's much heavier than the built-in pdb--it's a GUI debugger. It requires the beast called wx, which I do not use for web (or GUI) development. I'm

Re: custom data warehouse in python vs. out-of-the-box ETL tool

2009-09-22 Thread snfctech
Thanks for your replies, Sean and Martin. I agree that the ETL tools are complex in themselves, and I may as well spend that learning curve on a lower-level tool-set that has the added value of greater flexibility. Can you suggest a good book or tutorial to help me build a data warehouse in

pygui - showing an image

2009-09-22 Thread kyle schalm
hello, i wonder what the chances are that anyone here uses pygui? it looks pretty good, but i just started using it (version 2.05) and can't figure out how to just display a window with an image in it. i tried: image = Image('foo.png') window.place(image) -- error message window.add(image) --

Re: pygui - showing an image

2009-09-22 Thread David Robinow
On Tue, Sep 22, 2009 at 9:26 PM, kyle schalm kyle.sch...@gmail.com wrote: hello, i wonder what the chances are that anyone here uses pygui? it looks pretty good, but i just started using it (version 2.05) and can't figure out how to just display a window with an image in it. i tried: image =

Re: Combining sets/dictionaries

2009-09-22 Thread alex23
Alfons Nonell-Canals alfons.non...@upf.edu wrote: finally I've solved it using a combinatorics library which allows to do this kind of things. If you're using a version of Python 2.6 you might find that itertools.combinations does what you want without requiring the additional code. --

Re: Combining sets/dictionaries

2009-09-22 Thread alex23
On Sep 23, 12:44 pm, alex23 wuwe...@gmail.com wrote: Alfons Nonell-Canals alfons.non...@upf.edu wrote: finally I've solved it using a combinatorics library which allows to do this kind of things. If you're using a version of Python 2.6 you might find that itertools.combinations does what

Re: socket send O(N**2) complexity

2009-09-22 Thread Steven D'Aprano
On Wed, 23 Sep 2009 00:25:52 +0100, Nobody wrote: On Mon, 21 Sep 2009 16:33:08 -0400, Jack Diederich wrote: AIUI, as a python string is imutable, a slice of a string is a new string which points (C char *) to the start of the slice data and with a length that is the length of the slice,

  1   2   >