Re: How to measure the memory cost in Python?

2009-05-01 Thread Jean
6222/> That recipe also appeared in the 2nd edition of the Python Cookbook, see <http://books.google.com/books? id=Q0s6Vgb98CQC&printsec=frontcover&dq=editions:ISBN0596001673#PPA334,M1> /Jean Brouwers -- http://mail.python.org/mailman/listinfo/python-list

Re: How to measure the memory cost in Python?

2009-05-01 Thread Jean
y: size += get_total_size(value) >                 except: pass >         return size > > get_current_size(vars()) > > and discount the weight of the interpreter? Keep in mind, sys.getsizeof(obj) returns only the size of the given object. Any referenced objects are not inclu

Re: How to measure the memory cost in Python?

2009-05-01 Thread Jean
On May 1, 12:50 pm, Jean wrote: > On May 1, 10:56 am, CTO wrote: > > > > > > sys.getsizeof() [a suggested solution] isn't platform-specific. > > > So, to answer the OP's question, you'd just do something like > > > def get_tota

Re: Can I run a python program from within emacs?

2009-11-03 Thread Jean
On Nov 1, 10:15 am, rustom wrote: > On Nov 1, 7:20 pm, Robinson wrote: > > > I have also just started with both Aquamacs and Python so I ask for   > > your patience as well. > > When I evaluate the buffer (C-c C-C) I don't see any response or   > > output from my python program. Should another bu

Re: Best Way to Handle All Exceptions

2009-07-15 Thread Jean
anks for any help. The second example is "better" if you need your code to work in Python 3.0 *and* in 2.X. For Python 3.0, the first example has to be written as: except Exception as err: /Jean Brouwers -- http://mail.python.org/mailman/listinfo/python-list

[newbie] problem with if then

2013-06-09 Thread Jean Dubois
print thisday, 'stream is not available' Can anyone here tell me what I'm doing wrong. Thanks in advance jean -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with if then

2013-06-09 Thread Jean Dubois
On 9 jun, 22:00, Fábio Santos wrote: > On 9 Jun 2013 20:49, "Jean Dubois" wrote: > > > > > I'm writing some code to check whether an url is available or not, > > therefore I make use of a wget-command in Linux and then check whether > > this is suc

Re: problem with if then

2013-06-09 Thread Jean Dubois
On 9 jun, 22:29, Fábio Santos wrote: > On 9 Jun 2013 21:24, "Jean Dubois" > ...> And here is the result: > > > jean@antec4:~$ ./try.py > > wget -q -O - > > http://www.deredactie.be/cm/vrtnieuws/videozone/programmas/journaal/E...> > >/dev/null ; ec

Re: problem with if then

2013-06-09 Thread Jean Dubois
On 9 jun, 22:23, Roy Smith wrote: > In article > , >  Jean Dubois wrote: > > > I'm writing some code to check whether an url is available or not, > > therefore I make use of a wget-command in Linux and then check whether > > this is successful > > In gene

Re: problem with if then

2013-06-10 Thread Jean Dubois
On 9 jun, 23:35, Roy Smith wrote: > In article > <20165c85-4cc3-4b79-943b-82443e4a9...@w7g2000vbw.googlegroups.com>, >  Jean Dubois wrote: > > > But, really, > > > once you've done all that (and it's worth doing as an exercise), rewrite > > > y

[newbie] problem with data (different behaviour between batch and interactive use)

2012-06-27 Thread Jean Dupont
','').replace('\x13','').replace('\x0d','\n') print measurement[0] + print measurement[1] 3 can anyone here tell me what I'm doing wrong and how to do it correctly thanks jean -- http://mail.python.org/mailman/listinfo/python-list

[newbie] Python and Qt4 Designer

2012-07-11 Thread Jean Dubois
tion.UnicodeUTF8)) if __name__ == "__main__": import sys app = QtGui.QApplication(sys.argv) Form = QtGui.QWidget() ui = Ui_Form() ui.setupUi(Form) Form.show() sys.exit(app.exec_()) thanks in advance jean -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Qt4 Designer

2012-07-11 Thread Jean Dubois
On 12 jul, 02:59, Vincent Vande Vyvre wrote: > On 11/07/12 17:37, Jean Dubois wrote: > > > > > > > > > I'm trying to combine python-code made with QT4 designer with plain > > python statements like > > file = open("test","w") &g

Re: Python and Qt4 Designer

2012-07-13 Thread Jean Dubois
Op vrijdag 13 juli 2012 03:52:51 UTC+2 schreef Vincent Vande Vyvre het volgende: > On 12/07/12 08:42, Jean Dubois wrote: > > On 12 jul, 02:59, Vincent Vande Vyvre <vincent.vandevy...@swing.be> > > wrote: > >> On 11/07/12 17:37, Jean Dubois wrote: > >> > &g

[newbie] Looking for a good introduction to object oriented programming with Python

2012-08-04 Thread Jean Dubois
sent as being logical. If someone here has a link or title to such an intro, I'd appreciate that very much regards, Jean p.s. People who don't like my style of asking questions, please neglect this message -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Jean Dubois
ng PDF to go with the video: > > http://assets.en.oreilly.com/1/event/45/Practical%20Python%20Patterns... Thanks a lot for this information, I'll check it out the following days best regards, Jean -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Jean Dubois
erns-through-... > > Here's the corresponding PDF to go with the video: > > http://assets.en.oreilly.com/1/event/45/Practical%20Python%20Patterns... Can someone here on this list give a trivial example of what object oriented programming is, using only Python? thanks in advance Jean -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread Jean Dubois
On 5 aug, 20:28, Mark Lawrence wrote: > On 05/08/2012 19:04, Jean Dubois wrote: > > > > > > > > > > > On 5 aug, 02:11, shearich...@gmail.com wrote: > >> One reason you may be having difficulty is that unlike some languages > >> (C++/Java) ob

[newbie] problem with module PyVisa

2012-11-09 Thread Jean Dubois
I'm trying to control a programmable power supply via USB using python. After doing some googling I thought I should use PyVisa for this purpose, so I installed it as follows: tar xvfz PyVISA-1.4.tar.gz cd PyVISA-1.4 python setup.py install Installation seems to finish without errors. When I star

Re: problem with module PyVisa

2012-11-09 Thread Jean Dubois
On Nov 9, 2012, at 11:22 AM, Jean Dubois wrote: > > > > > > > > > OSError: /usr/local/vxipnp/linux/bin/libvisa.so.7: cannot open shared > > object file: No such file or directory The error may be obvious but finding this file and how to install it is not un

Re: problem with module PyVisa

2012-11-11 Thread Jean Dubois
On 9 nov, 22:14, w...@mac.com wrote: > On Nov 9, 2012, at 3:43 PM, Jean Dubois wrote: > > > > > > > > > > > > > The error may be obvious but finding this file and how to install it > > is not unfortunately. > > It seems I have to install it f

Re: problem with module PyVisa

2012-11-20 Thread Jean Dubois
On 11 nov, 20:30, Jean Dubois wrote: > On 9 nov, 22:14, w...@mac.com wrote: > > > > > On Nov 9, 2012, at 3:43 PM, Jean Dubois wrote: > > > > The error may be obvious but finding this file and how to install it > > > is not unfortunately. > > >

[newbie] problem with usbtmc-communication

2012-12-04 Thread Jean Dubois
surementcurr=usbkeith.readline() print 'Measured current 4: ',measurementcurr usbkeith.write("MEAS:VOLT?\n") time.sleep(timesleepdefault) measurementvolt=usbkeith.readline() print 'Measured voltage 4: ',measurementvolt keithdata.write(measurementcurr.strip()+' '+measurementvolt) usbkeith.write(":OUTP:STAT OFF\n") print "Goodbye, data logged in file:" print filename usbkeith.close() keithdata.close() can anyone here what is going wrong and how to get it right? thanks jean -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with usbtmc-communication

2012-12-04 Thread Jean Dubois
On 4 dec, 15:33, w...@mac.com wrote: > On Dec 4, 2012, at 7:14 AM, Jean Dubois wrote: > > > > > The following test program which tries to communicate with a Keithley > > 2200 programmable power supply using usbtmc in Python does not work as > > expected. I have conn

Re: problem with usbtmc-communication

2012-12-05 Thread Jean Dubois
On 5 dec, 16:26, w...@mac.com wrote: > On Dec 4, 2012, at 11:12 AM, Jean Dubois wrote: > > > On 4 dec, 15:33, w...@mac.com wrote: > >> On Dec 4, 2012, at 7:14 AM, Jean Dubois wrote: > > >>> The following test program which tries to communicate with a Keithley

Re: problem with usbtmc-communication

2012-12-06 Thread Jean Dubois
On 5 dec, 23:21, w...@mac.com wrote: > On Dec 5, 2012, at 3:38 PM, Jean Dubois wrote: > > [byte] > > > > >> I note that in your Octave example you are reading characters rather than > >> lines.  It seems to me that you have two choices here, either do t

Re: problem with usbtmc-communication

2012-12-06 Thread Jean Dubois
On 4 dec, 20:55, Terry Reedy wrote: > On 12/4/2012 7:14 AM, Jean Dubois wrote: > > > > > > > > > > > The following test program which tries to communicate with a Keithley > > 2200 programmable power supply usingusbtmcin Python does not work as > >

Re: problem with usbtmc-communication

2012-12-06 Thread Jean Dubois
On 4 dec, 20:55, Terry Reedy wrote: > On 12/4/2012 7:14 AM, Jean Dubois wrote: > > > > > > > > > > > The following test program which tries to communicate with a Keithley > > 2200 programmable power supply using usbtmc in Python does not work as > >

Re: problem with usbtmc-communication

2012-12-06 Thread Jean Dubois
On 6 dec, 15:50, w...@mac.com wrote: > On Dec 6, 2012, at 8:50 AM, Jean Dubois wrote: > > [byte] > > > > > > > > > > > > > It seems there is some misunderstanding here. What I meant with  how > > to "do the equivalent in Python" re

Re: problem with usbtmc-communication

2012-12-07 Thread Jean Dubois
On 6 dec, 21:15, w...@mac.com wrote: > On Dec 6, 2012, at 2:41 PM, Jean Dubois wrote: > > > > > > > > > > > On 6 dec, 15:50, w...@mac.com wrote: > >> On Dec 6, 2012, at 8:50 AM, Jean Dubois wrote: > > >> [byte] > > >>> It se

Re: problem with usbtmc-communication

2012-12-07 Thread Jean Dubois
On 6 dec, 21:28, Terry Reedy wrote: > On 12/6/2012 10:44 AM, Jean Dubois wrote: > > > > > > > > > > > I followed your suggestion an now the code looks like this: > > #!/usr/bin/python > > import time > > import os > > import sys > >

Re: problem with usbtmc-communication

2012-12-10 Thread Jean Dubois
On 7 dec, 14:46, Jean Dubois wrote: > On 6 dec, 21:15, w...@mac.com wrote: > > > On Dec 6, 2012, at 2:41 PM, Jean Dubois wrote: > > > > On 6 dec, 15:50, w...@mac.com wrote: > > >> On Dec 6, 2012, at 8:50 AM, Jean Dubois wrote: > > > >> [byte

Re: problem with usbtmc-communication

2012-12-10 Thread Jean Dubois
On 10 dec, 16:34, w...@mac.com wrote: > On Dec 10, 2012, at 8:31 AM, Jean Dubois wrote: > > [byte] > > > > > > > > > > > As you can see this approach suffers from the same "buffer problem" as > > the approach with readline did. One now

Re: problem with usbtmc-communication

2012-12-11 Thread Jean Dubois
On 11 dec, 15:34, w...@mac.com wrote: > On Dec 11, 2012, at 1:58 AM, Jean Dubois wrote: > > > > > > > > > > > On 10 dec, 16:34, w...@mac.com wrote: > >> On Dec 10, 2012, at 8:31 AM, Jean Dubois wrote: > > >> [byte] > >>> A

Re: problem with usbtmc-communication

2012-12-12 Thread Jean Dubois
On 12 dec, 01:49, Jerry Hill wrote: > On Tue, Dec 11, 2012 at 1:58 AM, Jean Dubois wrote: > > > I found examples in theusbtmckernel driver documentation (the > > examples there are given in C): > >http://www.home.agilent.com/upload/cmc_upload/All/usbtmc.htm?&cc=BE&a

[newbie] problem making equally spaced value array with linspace

2012-12-18 Thread Jean Dubois
with this issue? thanks jean #!/usr/bin/python import math import numpy as np print "Enter start value as a float (e.g. 0.001) or in scientific notation (e.g. 1e-3): ", startvalue = raw_input() print "Enter end value: ", endvalue = raw_input() print "Enter step: &qu

Re: problem making equally spaced value array with linspace

2012-12-18 Thread Jean Dubois
On 18 dec, 14:09, Peter Otten <__pete...@web.de> wrote: > Jean Dubois wrote: > > I have trouble with the code beneath to make an array with equally > > spaced values > > When I enter 100e-6 as start value, 700e-6 as end value and 100e-6 I > > get the followi

convert perl-script for voltcraft voltmeter to python [newbie]

2012-02-06 Thread Jean Dupont
as in the perl-script. Could someone supply me the command for setting the serial-parameters correctly in Python? thanks Jean #!/usr/bin/perl use strict; use warnings; use Device::SerialPort; die("Usage: $0 /dev/ttyS0\n") unless $#ARGV == 0; my ($devicepath) = @ARGV; my $port

Re: convert perl-script for voltcraft voltmeter to python [newbie]

2012-02-06 Thread Jean Dupont
ename,'w') ser2 = serial.Serial(voltport, 2400, 8, serial.PARITY_NONE, 1, timeout=15) print "rs-232 parameters of Voltcraft: ", ser2 print "Opening " + ser2.portstr received=ser2.readline() print received print "Goodbye, data logged in file:" print filename se

pySerial question, setting certain serial parameters [newbie]

2012-02-06 Thread Jean Dupont
e above parameters correctly: import serial voltport='/dev/ttyUSB2' ser2 = serial.Serial(voltport, 2400, 8, serial.PARITY_NONE, 1,timeout=15) thanks Jean -- http://mail.python.org/mailman/listinfo/python-list

how to read serial stream of data [newbie]

2012-02-06 Thread Jean Dupont
ng is ended by 0D8A How can this be accomplished in Python? thanks Jean -- http://mail.python.org/mailman/listinfo/python-list

Re: how to read serial stream of data [newbie]

2012-02-07 Thread Jean Dupont
On 7 feb, 06:07, Roy Smith wrote: > In article > , >  Jean Dupont wrote: > > > I'd like to read in a stream of data which looks like this: > > the device sends out a byte-string of 11 bytes roughly every second: > > >     B0B0B0B0B03131B

Re: how to read serial stream of data [newbie]

2012-02-07 Thread Jean Dupont
On 7 feb, 15:04, Heiko Wundram wrote: > Am 07.02.2012 14:48, schrieb Antti J Ylikoski: > > > On 7.2.2012 14:13, Jean Dupont wrote: > >> ser2 = serial.Serial(voltport, 2400, 8, serial.PARITY_NONE, 1, > >> rtscts=0, dsrdtr=0, timeout=15) > > > In Python, if yo

Re: convert perl-script for voltcraft voltmeter to python [newbie]

2012-02-07 Thread Jean Dupont
On 7 feb, 05:21, Terry Reedy wrote: > On 2/2/2012 3:57 PM, Jean Dupont wrote: > > > I'd like to read in the output of a voltcraft vc960 voltmeter > > connected to a usb-port. > > I found the perl-script below but I'd like to accomplish the same with > > py

Re: convert perl-script for voltcraft voltmeter to python [newbie]

2012-02-08 Thread Jean Dupont
On 8 feb, 01:26, Dietmar Schwertberger wrote: > Am 03.02.2012 14:11, schrieb Jean Dupont:> As my request might have been too > much asked, I have started doing > > some coding myself. > > I'm in doubt about the readline statement -which doesn't show anything &

Good data structure for finding date intervals including a given date

2012-05-12 Thread Jean-Daniel
Hello, I have a long list of n date intervals that gets added or suppressed intervals regularly. I am looking for a fast way to find the intervals containing a given date, without having to check all intervals (less than O(n)). Do you know the best way to do this in Python with the stdlib? A var

Re: Good data structure for finding date intervals including a given date

2012-05-12 Thread Jean-Daniel
it fast is to have done some preprocessing at insertion time, so that not all intervals are processed at query time. On Sat, May 12, 2012 at 2:30 PM, Karl Knechtel wrote: > On Sat, May 12, 2012 at 8:17 AM, Jean-Daniel > wrote: >> I am looking for a fast way to find the intervals &

Re: Good data structure for finding date intervals including a given date

2012-05-16 Thread Jean-Daniel
/3.1/ > [2] http://www.python.org/getit/releases/2.7.3/ > [3] http://dl.acm.org/citation.cfm?id=645413.652131 > > On Sat, May 12, 2012 at 10:17 PM, Jean-Daniel > wrote: >> >> Hello, >> >> I have a long list of n date intervals that gets added or suppressed &

Re: Python vs Ruby

2005-10-19 Thread jean-marc
I'd believe that would be Lua, but then again what is common to one might not be to another ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-19 Thread jean-marc
As you see, pythonistas are a nice humourous bunch... But to help a bit more in your balancing act you might take a look at: http://blog.ianbicking.org/ruby-python-power.html It's rather nice, and commented. -- http://mail.python.org/mailman/listinfo/python-list

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread jean-marc
but you don't want to use the state=DISABLED option because it gray's out the field showing people that it is not available for editing, right? -- http://mail.python.org/mailman/listinfo/python-list

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread jean-marc
Sorry, kinda wrote over your intentions... -- http://mail.python.org/mailman/listinfo/python-list

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread jean-marc
To make amends, I tried my own search and came up with this (that you might already have...): http://groups.google.com/group/comp.lang.python/browse_thread/thread/1384f49c35ffba9b/5928092247429e9a%235928092247429e9a?sa=X&oi=groupsr&start=1&num=3 Maybe you'll understand it better than me :-) --

Calculating Elapsed Time

2005-12-06 Thread Jean Johnson
Hello - I have a start and end time that is written using the following: time.strftime("%b %d %Y %H:%M:%S") How do I calculate the elapsed time? JJ __ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.c

Re: Calculating Elapsed Time

2005-12-06 Thread Jean Johnson
I'm using an old version of python (2.1) and datetime isn't available until Python 2.3. I can't upgrade my python. --- [EMAIL PROTECTED] wrote: > > Jean> How do I calculate the elapsed time? > > Where t1_s and t2_s reference time strings in the > for

Re: Calculating Elapsed Time

2005-12-07 Thread Jean Johnson
Thanks to everyone for their e-mails. I am using Fredrik's strptime/mktime solution to calculate my elapsed time. __ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com -- http://mail.python.org/mailman

Re: Excel module for Python

2005-01-18 Thread jean-paul
to format it automatically you can either define a VBA macro or use python com. Cheers, Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

problem with import pylab from a website

2005-01-19 Thread jean . rossier
/128.178.156.101/sensor_data/readings.php [Wed Jan 19 09:43:58 2005] [error] [client 128.178.156.101] Premature end of script headers: get_graph.py, referer: http://128.178.156.101/sensor_data/readings.php Thanks in advance. Regards, jean -- http://mail.python.org/mailman/listinfo/python-list

Re: how to use more than 1 __init__ constructor in a class ?

2005-06-23 Thread jean-marc
Singletoned wrote: > Rocco Moretti wrote: > > Steven D'Aprano wrote: > > > > That's the joys of a mostly self-taught programming knowledge: you miss > > > out on all the buzzwords. > > > > Being mostly self taught myself, I have a tendancy to use infrequently > > encountered terms in related but

Thanks for PIL (and other stuff)

2005-06-23 Thread jean-marc
I was just reading on daily-python that PIL is 10 years old... So I wish it and its author(s) a good day, week, month, year and more! Really! Jean-Marc PS If I knew that Python had a anniversary date, I'd also write to thanks our BDFL (and authors)! But no such luck, so I'm restain

Re: SOAP and XMLRPC

2005-08-15 Thread jean-marc
why isn't this good? http://www.enappsys.com/backend.jsp Seems to be what you're looking for... (second entry of a googled 'xml-rpc visual basic' search!) JM PS Tell us why the refered *.dll don't do, so I won't refer to it again if it's of no value. -- http://mail.python.org/mailman/listinfo/p

Re: seeking Python developers

2005-08-15 Thread jean-marc
What level? and is geography important? JM -- http://mail.python.org/mailman/listinfo/python-list

Re: python classes taught

2005-08-20 Thread jean-marc
Cegep du Vieux Montreal (technical college level), uses Python for CGI in web developement class. ...At least when I give this course ;-) Jean-Marc -- http://mail.python.org/mailman/listinfo/python-list

Re: wxgrid multiline cell editor

2005-02-10 Thread jean-michel
"James" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > wxpython 2.5.3 > anyone know how to make a multiline cell editor for wxgrid? Hello, You can do that by a "wxGridCellAutoWrapStringEditor". You can test it by modifying GridSimple.py in the demo by adding (at line 24 i

Re: python equivalent to access reports

2005-02-11 Thread jean-michel
"flupke" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > a lot of applications here a made with access. Tables, forms, reports > and the like. Now i rather use Python to do this but i'm not sure how to > proceed. I can use wxPython for a gui via wxGlade for rapid testing and

Re: goto, cls, wait commands

2005-02-11 Thread jean-michel
"BOOGIEMAN" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > I've just finished reading Python turtorial for non-programmers > and I haven't found there anything about some usefull commands I used in > QBasic. First of all, what's Python command equivalent to QBasic's "goto"

Re: goto, cls, wait commands

2005-02-11 Thread jean-michel
"Jeff Shannon" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > jean-michel wrote: > > > Hi all, > > I saw a lot of comments saying GOTO is not usefull, very bad, and we > > should'nt use it because we don't need it

Re: which parser to use

2005-02-22 Thread Jean Brouwers
Check out SimpleParse/mxTextTools. Just an outstanding E/BNF driven parser, very highly recommended. <http://simpleparse.sourceforge.net/> /Jean Brouwers PS) See also <http://www-128.ibm.com/developerworks/linux/library/l-simple.html> <http://gnosis.cx/publ

Re: wxStyledTextCtrl problem ?

2004-11-29 Thread Jean Brouwers
If you are running GTK+ try using self.Editor.SetSTCFocus(True) in addition to or instead of SetFocus(). Plus maybe wx.CallAfter(self.Editor.EnsureCaretVisible) It solved the 'dissapearing caret' problem for our application. /Jean Brouwers In article <[EM

Re: wxStyledTextCtrl problem ?

2004-11-29 Thread Jean Brouwers
Here is the recent thread about this particular problem: <http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?11:mss:33225:200410:lfppnf okhnlgfialpfdh> /Jean Brouwers In article <[EMAIL PROTECTED]>, Jean Brouwers <[EMAIL PROTECTED]> wrote: > If you are r

Re: using os

2004-11-29 Thread Jean Brouwers
Check the os.walk() and os.path.walk() functions. More details and some examples are at <http://docs.python.org/lib/os-file-dir.html> resp. <http://docs.python.org/lib/module-os.path.html> /Jean Brouwers In article <[EMAIL PROTECTED]>, Juliano Freitas <[EM

Re: Syntax for extracting multiple items from a dictionary

2004-12-01 Thread Jean Brouwers
The correct syntax is: dict([(key, row[key]) for key in cols]) i.e. the list must be enclosed in [...]. /Jean Brouwers In article <[EMAIL PROTECTED]>, Dave Merrill <[EMAIL PROTECTED]> wrote: > "anton muhin" wrote: > > Stefan Behnel wrote:

Re: Python 2.4 and Tkinter

2004-12-01 Thread Jean Brouwers
FWIW, we just installed Python 2.4 (on RH Linx 8), rebuilt it from scratch and everything is fine. Tkinter is there, _tkinter as well and idle comes up as expected. /Jean Brouwers In article <[EMAIL PROTECTED]>, Jeffrey Barish <[EMAIL PROTECTED]> wrote: > http://www.python.o

Re: Python 2.4 and Tkinter

2004-12-01 Thread Jean Brouwers
build the _tkinter module are coming from /usr/local/lib in our case. And those happens to be tcl83 and tk83 in our case. If the Tcl/Tk libraries (and include files) are missing, you will have to get and install those. But they are not part of the Python distribution, as far as we know. /Jean

Re: Python 2.4 and Tkinter

2004-12-02 Thread Jean Brouwers
X11R6/lib64" option. If that still fails, try a fresh reconfigure and rebuild from scratch, now that the Tcl/Tk libs are there. Start with "./configure " per the instructions in the README file, run "make clean" etc.. /Jean Brouwers In article <[EMAIL PROTECTED]>

Newbie alert !

2004-12-03 Thread Jean Montambeault
27;, command=fen1.quit) bou_quit.pack(side=BOTTOM) fen1.mainloop() fen1.destroy() I just cannot figure out why the rings are draw right from the start and don't wait for their buttons to be pressed before being drawn : I've written similar functions before to draw lines, rectangl

Re:Of course I have 'from Tkinter import *'...

2004-12-03 Thread Jean Montambeault
... at the start of the file. I just thought it to be too obvious to be included : my mistake. Thanks Jean -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with use of code.InteractiveInterpreter for multiline code

2004-12-03 Thread Jean Brouwers
calling the runsource() method, just call the push() method. /Jean Brouwers In article <[EMAIL PROTECTED]>, <"[EMAIL PROTECTED]"> wrote: > I'm trying to embed a Python interpreter in a GUI I'm developing, and > I'm having trouble understanding the

Re: pythonwin broke

2004-12-03 Thread Jean Brouwers
Python related entries in the Registry and in the StartUp folder. Only after that did the reinstalled 2.3 plus extensions work fine again. /Jean Brouwers PS) We backed out of using Python 2.4 since two of the extensions we need did not work with 2.4 on Windows XP. PPS) It looks like Python 2.4 and

Re: Newbie alert !

2004-12-03 Thread Jean Montambeault
Jean Montambeault wrote: I am not only learning Python but programming itself ; reading your posts makes me believe that nobody is that much of a beginner here. Is there a newgroup or list for my type somewhere I can't find it ? To illustrate my case this script : # function to draw ring

Re: pythonwin broke

2004-12-03 Thread Jean Brouwers
extensions exist for 2.4 we will try again. And maybe, we should use the ActivePython builds then ;-) /Jean Brouwers PS) We had no problem with Python 2.4 or any extensions on Lunix. Everything works fine there and all our Python code runs unmodified on both 2.3 and 2.4 with extensions

Re: pythonwin broke

2004-12-04 Thread Jean Brouwers
I'm not sure what Pythonwin is. The Python start menu shows "Python (command line)" and "IDLE (Python GUI)" plus docs, etc. Your experiment with IDLE works just fine. Both windows closed on clickin X. This is Windows XP SP2 with Python 2.3.4 from the Python.org si

Re: pythonwin broke

2004-12-04 Thread Jean Brouwers
..." referenced memory at "0x0..014". The memory could not be "read". Click on OK to terminate the program. Same Window XP SP2 machine running Python 2.3.4 downloaded from the Python website (with just one extension, wxPython 2.4.2.4). /Jean Brouwers In article <[EMA

Re: The python2.4 IDLE can't be lanuched.

2004-12-06 Thread Jean Brouwers
This is a known problem. More details at <http://sourceforge.net/tracker/index.php?func=detail&aid=1076861&group_ id=5470&atid=105470> /Jean Brouwers In article <[EMAIL PROTECTED]>, AnkyHe <[EMAIL PROTECTED]> wrote: > I downloaded the python 2.4 f

Re: Why I can't launch python 2.4 final IDLE?

2004-12-07 Thread Jean Brouwers
This is the second time you ask the same question. Did you miss the answer to the first one? This is a known problem. More details at <http://sourceforge.net/tracker/index.php?func=detail&aid=1076861&group_ id=5470&atid=105470> /Jean Brouwers In article <[EMAIL PROTEC

Connecting to numarray. Problem with the setup program

2004-12-08 Thread Jean Moser
I tried many times to connect to numarray without success. I choosed the release: numarray-1.1.1.win32py2.2.exe then I went to the setup program made by Greenfield and I tried to follow the commands.The mentioned Python directory is C:\PROGRA~2 which is not covenient. I tried to change it but witho

Re: system requirements for python 2.4

2004-12-13 Thread Jean Brouwers
FWIIW, we use Python 2.4 on RH8 and FC2 systems. In both cases, built from scratch, following the build instructions. /Jean Brouwers In article <[EMAIL PROTECTED]>, ben <[EMAIL PROTECTED]> wrote: > I'm trying to upgrade python from 2.2 to 2.4 on a RH9 system, and can&#

Re: flex/bison like module in Python?

2004-12-15 Thread Jean Brouwers
For command line parsing, take a look at the shlex module, also in the standard distro. It may fit your requirements for additional functionality beyond cmd. /Jean Brouwers PS) We use SimpleParse/mxTextTools for parsing large log files, both are listed on the web page mentioned below. In

Re: Accessing DB2 with Python

2004-12-16 Thread Jean Brouwers
Try <ftp://people.linuxkorea.co.kr/pub/DB2> with capital DB. /Jean Brouwers In article <[EMAIL PROTECTED]>, Shawn Milo <[EMAIL PROTECTED]> wrote: > ftp://people.linuxkorea.co.kr/pub/db2, -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Jean Brouwers
Maybe, set environment variable PYTHONPATH. More details at <http://www.python.org/doc/current/tut/node8.html> /Jean Brouwers In article <[EMAIL PROTECTED]>, Lenard Lindstrom <[EMAIL PROTECTED]> wrote: > Amir Dekel <[EMAIL PROTECTED]> writes: > > &

Re: Best book on Python?

2004-12-16 Thread Jean Brouwers
The text of David Mertz' book is available on line at <http://gnosis.cx/TPiP/> /jean Brouwers In article <[EMAIL PROTECTED]>, Mirko Zeibig <[EMAIL PROTECTED]> wrote: > Maurice LING said the following on 12/12/2004 11:13 PM: > >>Google for Dive Into Python.

Re: extending python with a C-written dll

2004-12-20 Thread Jean Brouwers
he Win32 API extension <http://www.python.org/windows/win32/> /Jean Brouwers In article <[EMAIL PROTECTED]>, Jean-Baptiste PERIN <[EMAIL PROTECTED]> wrote: > Grant Edwards a écrit : > > On 2004-12-20, Jean-Baptiste PERIN <[EMAIL PROTECTED]> wrote: > >

Re: memory leak

2004-12-21 Thread Jean Brouwers
setting the limit does not help finding the root cause of a leak. That requires additional effort and/or dignostic tools. /Jean Brouwers In article <[EMAIL PROTECTED]>, Daniel Wheeler <[EMAIL PROTECTED]> wrote: > I'm on a linux platform and looking in proc/pid/status. Using t

Re: how to start a new process while the other ist running on

2004-12-21 Thread Jean Brouwers
See the os. spawn* functions. For example os.spawnv(os.P_NOWAIT, /path/to/script, args) /Jean Brouwers In article <[EMAIL PROTECTED]>, Erik Geiger <[EMAIL PROTECTED]> wrote: > Hi, > > sorry, my english ist not that got but I'll try. > > I have a

Re: popen2, 3, 4 -- will closing all returned streams result in process termination?

2004-12-28 Thread Jean Brouwers
ich is the file .../Lib/popen2.py in your python installation. It is straightforward to create your own popen* functions and keep the Popen3 instance. /Jean Brouwers In article <[EMAIL PROTECTED]>, Evgeni Sergeev <[EMAIL PROTECTED]> wrote: > After I opened streams to a proces

[newbie] problem trying out simple non object oriented use of Tkinter

2013-12-06 Thread Jean Dubois
I'm trying out Tkinter with the (non object oriented) code fragment below: It works partially as I expected, but I thought that pressing "1" would cause the program to quit, however I get this message: TypeError: quit() takes no arguments (1 given), I tried changing quit to quit() but that makes th

Re: [newbie] problem trying out simple non object oriented use of Tkinter

2013-12-06 Thread Jean Dubois
Op vrijdag 6 december 2013 13:30:53 UTC+1 schreef Daniel Watkins: > Hi Jean, > > > > On Fri, Dec 06, 2013 at 04:24:59AM -0800, Jean Dubois wrote: > > > I'm trying out Tkinter with the (non object oriented) code fragment below: > > > It works parti

[newbie] struggling wth tkinter

2013-12-07 Thread Jean Dubois
d(column=1, row=2, sticky=E) ttk.Label(mainframe, text="meters").grid(column=3, row=2, sticky=W) for child in mainframe.winfo_children(): child.grid_configure(padx=5, pady=5) feet_entry.focus() root.bind('', calculate) root.mainloop() thanks in advance jean -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] struggling wth tkinter

2013-12-07 Thread Jean Dubois
Op zaterdag 7 december 2013 19:12:50 UTC+1 schreef Dave Angel: > On Sat, 7 Dec 2013 08:52:08 -0800 (PST), Jean Dubois > > wrote: > > > I'm trying to go through a tutorial on tkinter which has the code > > below as an example. The only thing I see when running it

Re: [newbie] struggling wth tkinter

2013-12-07 Thread Jean Dubois
bin/env python3 > > > > Then from the command line > > > > python3 ftom.py > > > > Your code runs as expected > > using python 3.2.3 I tried you suggestion above: This is what I get: Traceback (most recent call last): File ".

  1   2   3   4   5   6   7   8   9   10   >