Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread Marc 'BlackJack' Rintsch
On Fri, 04 Apr 2008 20:26:13 -0700, 7stud wrote: > However, there is another way to cause a function to execute when an > event, like a button click, occurs on a widget: you use the widget's > bind() function: > > my_button.bind('', someFunc) That's a bad idea because now the `Button` doesn't ac

Re: RELEASED Python 2.6a2 and 3.0a4

2008-04-05 Thread Kay Schluehr
On 4 Apr., 21:45, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > The Windows x86 MSI installer is missing for both 2.6 and 3.0. > > And likely will continue to do so for some time. > > Regards, > Martin Fine. Is there also a reason? -- http://mail.python.org/mailman/listinfo/python-list

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-05 Thread Nebur
> So, just wanted to point out that eclipse saves your file history > (even if you do not have a vcs)... that operation can be selected by > right clicking a parent folder and selecting 'restore from local > history'. Fabio, you are right; this feature should help to compensate ... but in my case,

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-05 Thread Nebur
> Implement what? The virus? I haven't said that I'm interested in virus, > I meant I'd like to know WHAT is this No, this was a misunderstanding. What we meant was: when you want to implement a virus, you should use a version control :- D Nebur -- http://mail.python.org/mailman/listinfo/python-l

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
Thus spake Kay Schluehr ([EMAIL PROTECTED]): > But you could have added the integration of code coverage and other > helpful features with unittest as a conservative extension giving > everyone a chance to use it directly with existing tests instead of > forcing them to rewrite their tests for bik

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread Fredrik Lundh
llothar wrote: > My question was: Why does setup.py generated sometimes a pyd and > sometimes a so file? setup.py picks an extension that happens to work on the platform you're running setup.py on. doing otherwise would be pretty pointless. -- http://mail.python.org/mailman/listinfo/python-

Re: ANN: pry unit testing framework

2008-04-05 Thread Matthieu Brucher
2008/4/5, Aldo Cortesi <[EMAIL PROTECTED]>: > > Thus spake Kay Schluehr ([EMAIL PROTECTED]): > > > > But you could have added the integration of code coverage and other > > helpful features with unittest as a conservative extension giving > > everyone a chance to use it directly with existing tests

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread 7stud
[EMAIL PROTECTED] wrote: > > one thing i dont rally get, i ahve to add my_button.bind() somewhere? > i changed the stuff u said though and i get this error(the program > executes though and i can press the buttons): > > Exception in Tkinter callback > Traceback (most recent call last): > File "C:

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread Gabriel Genellina
En Sat, 05 Apr 2008 03:02:02 -0300, <[EMAIL PROTECTED]> escribió: > am i not doing that then? did u look at the code? where do i add the > bind if this: > btnDisplay = Button(self, text="1", command=self.Display) > btnDisplay.grid(row=3, column=0, padx=5, pady=5) > > is not enough? Yes, I

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread llothar
On 5 Apr., 15:48, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > llothar wrote: > > My question was: Why does setup.py generated sometimes a pyd and > > sometimes a so file? > > setup.py picks an extension that happens to work on the platform you're > running setup.py on. doing otherwise would be pret

Re: ANN: pry unit testing framework

2008-04-05 Thread Kay Schluehr
On 5 Apr., 10:26, Aldo Cortesi <[EMAIL PROTECTED]> wrote: > So, why did I re-write it? Well, I needed a test framework that didn't > have the deep flaws that unittest has. I needed good hierarchical > fixture management. I needed something that didn't instantiate test > suites automatically, freei

Re: mailbox.Maildir(), confusing documentation

2008-04-05 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Having got my Python 2.5.2 installed I'm trying some things out with > the mailbox.Maildir() class. > > If I do the following:- > > import maibox > mailbox.Maildir("/home/isbd/Mail/Li/pytest") > > then the pytest Maildir mailbox is created - which is great but

In Tkinter - having an input and an entry

2008-04-05 Thread markfernandes02
I need some advice, I am creating a python program to communicate with an MS Access db in python 2.4. I can fetch records but cannot insert records. def Insert(self, *row): global cursor, title, author, pubdate sqlInsert = "INSERT INTO Book_table" sqlInsert = sqlInsert + "(Bookname, Bo

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
Thus spake Kay Schluehr ([EMAIL PROTECTED]): > I'm not entirely sure what you are claiming here. From source > inspections I can see that TestSuite instances are instantiated by the > TestLoader and you are free to derive from TestLoader, overwrite its > methods and pass around another instance th

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
Thus spake Matthieu Brucher ([EMAIL PROTECTED]): > How does it compare to the nose framework ? As far as the base unit testing functionality is concerned, I think they try to address similar problems. Both have assert-based testing with inspection and re-parsing of assert exceptions for better er

Re: ANN: pry unit testing framework

2008-04-05 Thread Kay Schluehr
On 5 Apr., 12:26, Aldo Cortesi <[EMAIL PROTECTED]> wrote: > Thus spake Kay Schluehr ([EMAIL PROTECTED]): > > > I'm not entirely sure what you are claiming here. From source > > inspections I can see that TestSuite instances are instantiated by the > > TestLoader and you are free to derive from Test

Re: ANN: pry unit testing framework

2008-04-05 Thread Michele Simionato
On Apr 5, 12:54 pm, Aldo Cortesi <[EMAIL PROTECTED]> wrote: > Thus spake Matthieu Brucher ([EMAIL PROTECTED]): > > > How does it compare to the nose framework ? > > As far as the base unit testing functionality is concerned, I think > they try to address similar problems. Both have assert-based tes

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread Steve Holden
[EMAIL PROTECTED] wrote: [stuff, including quoted copies of an original program and its replacement] > > and the self. i erased, should i do it in the def __init__ as well or > only as i did in createwidgets-function? Your posts would be easier to consider if you trimmed out the stuff that's no

Re: ANN: pry unit testing framework

2008-04-05 Thread Kay Schluehr
On 5 Apr., 12:26, Aldo Cortesi <[EMAIL PROTECTED]> wrote: > Thus spake Kay Schluehr ([EMAIL PROTECTED]): > > > I'm not entirely sure what you are claiming here. From source > > inspections I can see that TestSuite instances are instantiated by the > > TestLoader and you are free to derive from Test

Re: Is there any way to say ignore case with "in"?

2008-04-05 Thread Steve Holden
7stud wrote: > On Apr 4, 2:43 pm, [EMAIL PROTECTED] wrote: >> Is there any way in python to say >> >> if string1 in string2: >> >> >> ignoring the case of string1 and string2? >> >> I know I could use:- >> >> if lower(string1) in lower(string2): >> >> >> but it somehow fee

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread Fredrik Lundh
llothar wrote: > I ship an application that compiles an python interpreter and > extension on a remote system. > It also needs to copy this created items around. So if i use setup.py > to create an > extension i need to know the file name of the generated file. so why not just ask setup.py

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
Thus spake Michele Simionato ([EMAIL PROTECTED]): > > As far as the base unit testing functionality is concerned, I think > > they try to address similar problems. Both have assert-based testing > > with inspection and re-parsing of assert exceptions for better error > > messages. Both try to prov

Re: In Tkinter - having an input and an entry

2008-04-05 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I need some advice, > I am creating a python program to communicate with an MS Access db in > python 2.4. > I can fetch records but cannot insert records. > > def Insert(self, *row): > global cursor, title, author, pubdate > sqlInsert = "INSERT INTO Book_table" >

Re: ANN: pry unit testing framework

2008-04-05 Thread BJörn Lindqvist
On Sat, Apr 5, 2008 at 12:54 PM, Aldo Cortesi <[EMAIL PROTECTED]> wrote: > Thus spake Matthieu Brucher ([EMAIL PROTECTED]): > > > > How does it compare to the nose framework ? > > As far as the base unit testing functionality is concerned, I think > they try to address similar problems. Both hav

Re: In Tkinter - having an input and an entry

2008-04-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I can fetch records but cannot insert records. > > def Insert(self, *row): > global cursor, title, author, pubdate using globals to pass arguments to a function/method is usually not a good idea. any reason you cannot pass them in as arguments? > sqlInsert =

low price high quality items whosale & resale at www.alimamatrade.net

2008-04-05 Thread www.alimamatrade.net
we would give our lowest price, www.alimamatrade.net 1. Before shipping the goods ,we check the cutting/stitching/high frequency/embroidery/assembly/cement carefully, until the goods are OK. 2. payment:western union,moneygram,bank transfer (T/T by bank). 3. shipping method:EMS,TNT,DHL other shippin

Re: In Tkinter - having an input and an entry

2008-04-05 Thread [EMAIL PROTECTED]
Traceback (most recent call last): File "F:\Programming\python and database\access_db8.2.py", line 129, in ? Tkwindow() File "F:\Programming\python and database\access_db8.2.py", line 88, in Tkwindow title = stringVar() NameError: global name 'stringVar' is not defined Here is the TKw

Re: In Tkinter - having an input and an entry

2008-04-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Traceback (most recent call last): > File "F:\Programming\python and database\access_db8.2.py", line 129, > in ? > Tkwindow() > File "F:\Programming\python and database\access_db8.2.py", line 88, > in Tkwindow > title = stringVar() > NameError: global name 's

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
Thus spake BJörn Lindqvist ([EMAIL PROTECTED]): > Isn't nose tree-based too? You can select both single test-cases > suites or directories to run. Well, in a way, perhaps. But not in the sense that Pry is. In Pry you can nest test fixtures (setUp/tearDown pairs) within test fixtures, allowing arb

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
Thus spake Kay Schluehr ([EMAIL PROTECTED]): > A properly extended framework would of course be compatible with all > existing test suites. This has nothing to do with monkeypatching. I'm > not sure you even understand the concepts you are talking about. I'm afraid I'm just going to have to assur

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread Steve Holden
llothar wrote: > On 5 Apr., 15:48, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >> llothar wrote: >>> My question was: Why does setup.py generated sometimes a pyd and >>> sometimes a so file? >> setup.py picks an extension that happens to work on the platform you're >> running setup.py on. doing other

Re: variable scope in list comprehensions

2008-04-05 Thread Steve Holden
Duncan Booth wrote: > Steve Holden <[EMAIL PROTECTED]> wrote: > >>> For a moment I thought that maybe list comprehension has its own >>> scope, but it doesn't seem to be so: >>> print [[y for y in range(8)] for y in range(8)] >>> print y >>> >>> Does anybody understand it? >>> >>> >> This isn't _a

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread Fredrik Lundh
Steve Holden wrote: > You display your ignorance here. The ".pyd" extension is used on Windows > as an alternative to ".dll", but both are recognized as shared > libraries. Personally I'm not really sure why they even chose to use > ".pyd", which is confusing to most Windows users. In UNIX/Linu

Re: Python-by-example - new online guide to Python Standard Library

2008-04-05 Thread AK
ivan wrote: > Very cool. > Have you thought about making a printable version that doesn't wrap > any lines that shouldn't be and has page breaks at good spots? > > -- > ivan Hi ivan, I will work on that after I finalize modules that are already there. I think this would be better than having peo

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread llothar
> Right, so you think people aren't trying to help you? I think they are not reading the question. > You display your ignorance here. The ".pyd" extension is used on Windows > as an alternative to ".dll", but both are recognized as shared > libraries. Personally I'm not really sure why they even

Re: ANN: pry unit testing framework

2008-04-05 Thread Kay Schluehr
Aldo, when you confuse inheritance ( using an OO framework properly ) with monkey patching no one can draw much different conclusions than I did. I'm still very positive about the integration of code coverage tools with UT frameworks and of course I've nothing against adding a CLI. Actually *this*

Re: UML reverse engineering

2008-04-05 Thread Konstantin Veretennicov
On Fri, Apr 4, 2008 at 6:51 PM, <[EMAIL PROTECTED]> wrote: > Hello, > > Do you know a free software witch can compute a UML class diagram from a > python code. I tested many free UML softwares like BoUML, ArgoUML, Dia, > PNSource (not found) ... Did you mean /PyNSource/ ? (http://www.atug.com/and

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread Francesco Bochicchio
Il Fri, 04 Apr 2008 20:26:13 -0700, 7stud ha scritto: > On Apr 4, 7:06 pm, [EMAIL PROTECTED] wrote: >> 1st question: >> >> when i run this program 1 will be printed into the interpreter when i >> run it BUT without me clicking the actual button. when i then click the >> button "1", nothing happens

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread Fredrik Lundh
llothar wrote: > I don't think so. I asked a pretty simple question and as usual on > usenet nobody read the question did *you* read your own question? it took you three posts before you mentioned what you were trying to do, and four posts before you bothered to mention that you're seeing this

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread Fredrik Lundh
Francesco Bochicchio wrote: > It should be added here that in Python you have several ways get around > this Tkinter limitation and pass an user argument to the callback. Once > upon a time , back in Python 1.x, I used to do something like this: > > class CallIt: > def __init__(self, f, *a

Re: In Tkinter - having an input and an entry

2008-04-05 Thread [EMAIL PROTECTED]
On Apr 5, 12:55 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Traceback (most recent call last): > > File "F:\Programming\python and database\access_db8.2.py", line 129, > > in ? > > Tkwindow() > > File "F:\Programming\python and database\access_db8.2.py", line

Re: urllib and bypass proxy

2008-04-05 Thread Konstantin Veretennicov
On Thu, Apr 3, 2008 at 9:21 PM, kc <[EMAIL PROTECTED]> wrote: > If this has value, do I submit a bug report or does > someone else? You do :) (http://bugs.python.org) -- kv -- http://mail.python.org/mailman/listinfo/python-list

Re: In Tkinter - having an input and an entry

2008-04-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Thanks it sorted out my 'StringVar' problem. > I now have another problem... > > Exception in Tkinter callback > Traceback (most recent call last): > File "D:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ > return self.func(*args) > TypeError: Insert() t

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
Thus spake Kay Schluehr ([EMAIL PROTECTED]): > Aldo, when you confuse inheritance ( using an OO framework properly ) > with monkey patching no one can draw much different conclusions than I > did. I guess you do always run the risk of being pelted with something from the peanut gallery when you

ANN: eric4 4.1.2 released

2008-04-05 Thread Detlev Offenbach
Hi, eric4 4.1.2 has been released today. This release fixes a few bugs reported since the last release. As usual it is available via http://www.die-offenbachs.de/eric/index.html. What is eric? - eric is a Python IDE written using PyQt4 and QScintilla2. It comes with batteries includ

Re: Adding Images To MySQL

2008-04-05 Thread Victor Subervi
>* *(What a mess! I don't know where to begin...) Yeah. Never claimed to be any good at this :( Just persistent :) >* *- You say Content-Type: image/jpeg but you emit HTML code. You're lucky if you see any >* *text at all. Well, I tried Content-Type: text/html and that threw an HTTP 500 Error

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread Steve Holden
llothar wrote: [...] > Unfortunately there is no python.core mailing list that i know so i > ask here. > Well your researches can't have been that extensive: the developers live on [EMAIL PROTECTED], otherwise known as comp.land.python-dev. But you will need to ask your question rather more care

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread skanemupp
> > def __init__(self): > # ... > button = Button(self, > text='1', > command=lambda n=1: self.display(n)) > # ... > > def display(self, number): > print number > should this really be inside the __init__ fun

Re: Importing a 3rd Party windows DLL for use within th Python

2008-04-05 Thread lee . walczak
Thankyou kindly for all the details you have provided. IT is nice to know that there is a community to help. I will let you know how I get on! Many Thanks, Lee -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-05 Thread Steve Holden
Aldo Cortesi wrote: > Thus spake Kay Schluehr ([EMAIL PROTECTED]): > >> Aldo, when you confuse inheritance ( using an OO framework properly ) >> with monkey patching no one can draw much different conclusions than I >> did. > > I guess you do always run the risk of being pelted with something fro

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: >> def __init__(self): >> # ... >> button = Button(self, >> text='1', >> command=lambda n=1: self.display(n)) >> # ... >> >> def display(self, number): >> print number > > should this

Weird scope error

2008-04-05 Thread Rory McKinley
Hi I am trying to use the TidyHTMLTreeBuilder module which is part of elementtidy, but I am getting what appears to be some sort of scope error and it is scrambling my n00b brain. The module file (TidyHTMLTreeBuilder.py) tried to import ElementTree by doing the following: from elementtree imp

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread skanemupp
On 5 Apr, 17:09, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >> def __init__(self): > >> # ... > >> button = Button(self, > >> text='1', > >> command=lambda n=1: self.display(n)) > >> # ... > > >>

Tkinter: making buttons the same size?

2008-04-05 Thread skanemupp
on windows vista these buttons dont have the same size, the "/" shrinks a little. how do i make them the same size or prevent shrinking? a mac-user told me they look the same to him so maybe it doesnt shrink on macs but it does when using VISTA. i tried some .propagate and extend-stuff but didnt w

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread Fredrik Lundh
Fredrik Lundh wrote: > and for the record, Python doesn't look for PYD files on any of the Unix > boxes I have convenient access to right now. what Ubuntu version are > you using, what Python version do you have, and what does > > $ python -c "import imp; print imp.get_suffixes()" > > pr

Learning curve for new database program with Python?

2008-04-05 Thread Jetus
I have a need for a database program. I downloaded the db2 from ibm, and reviewed some of the documentation. My question is, what is the easiest program for me to try to learn. I will be creating a database of about 25,000 records, it will be relational. I am a beginner Python programmer, and need

Re: Learning curve for new database program with Python?

2008-04-05 Thread Dotan Cohen
On 05/04/2008, Jetus <[EMAIL PROTECTED]> wrote: > I have a need for a database program. I downloaded the db2 from ibm, > and reviewed some of the documentation. > > My question is, what is the easiest program for me to try to learn. I > will be creating a database of about 25,000 records, it wil

Re: Weird scope error

2008-04-05 Thread Kay Schluehr
On 5 Apr., 17:27, Rory McKinley <[EMAIL PROTECTED]> wrote: > Hi > > I am trying to use the TidyHTMLTreeBuilder module which is part of > elementtidy, but I am getting what appears to be some sort of scope > error and it is scrambling my n00b brain. > > The module file (TidyHTMLTreeBuilder.py) tried

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > i dont know, i used a piece of code i found which had a createwidgets- > method. isnt init a function, not a method btw(or it is the same > thing?) a method is a function defined inside a class statement, and which is designed to be called via an instance of that class

Re: Weird scope error

2008-04-05 Thread Gary Herron
Rory McKinley wrote: > Hi > > I am trying to use the TidyHTMLTreeBuilder module which is part of > elementtidy, but I am getting what appears to be some sort of scope > error and it is scrambling my n00b brain. > > The module file (TidyHTMLTreeBuilder.py) tried to import ElementTree by > doing t

Re: Tkinter: making buttons the same size?

2008-04-05 Thread Guilherme Polo
2008/4/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > on windows vista these buttons dont have the same size, the "/" > shrinks a little. how do i make them the same size or prevent > shrinking? > a mac-user told me they look the same to him so maybe it doesnt shrink > on macs but it does when usi

Re: ANN: pry unit testing framework

2008-04-05 Thread Terry Reedy
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Aldo Cortesi wrote: | > Thus spake Kay Schluehr ([EMAIL PROTECTED]): **tweet** | >> Aldo, when you confuse inheritance ( using an OO framework properly ) | >> with monkey patching no one can draw much different conclu

Re: RELEASED Python 2.6a2 and 3.0a4

2008-04-05 Thread Terry Reedy
"Kay Schluehr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On 4 Apr., 21:45, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > The Windows x86 MSI installer is missing for both 2.6 and 3.0. > > And likely will continue to do so for some time. Fine. Is there also a reason? =

Re: ANN: pry unit testing framework

2008-04-05 Thread Michele Simionato
On Apr 5, 5:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Kay at least has a long history as a contributor in this group, so > people know how to interpret her remarks and know that her contributions > are made on the basis of a deep understanding of Python. She is I am pretty much sure you are

Re: Learning curve for new database program with Python?

2008-04-05 Thread Mensanator
On Apr 5, 10:50�am, Jetus <[EMAIL PROTECTED]> wrote: > I have a need for a database program. I downloaded the db2 from ibm, > and reviewed some of the documentation. > > My question is, what is the easiest program for me to try to learn. I > will be creating a database of about 25,000 records, it w

Re: Tkinter: making buttons the same size?

2008-04-05 Thread skanemupp
how do i do that? i get this error: self.btnDisplay = Button(self,text='1',command=lambda n=1:self.Display(n)) self.btnDisplay.grid(row=3, column=0, padx=5, pady=5, width=1) self.btnDisplay = Button(self,text='/',command=lambda n="/":self.Display(n)) self.btnDisplay.grid(

Re: Learning curve for new database program with Python?

2008-04-05 Thread Michele Simionato
On Apr 5, 5:50 pm, Jetus <[EMAIL PROTECTED]> wrote: > I have a need for a database program. I downloaded the db2 from ibm, > and reviewed some of the documentation. > > My question is, what is the easiest program for me to try to learn. I > will be creating a database of about 25,000 records, it wi

Re: Tkinter: making buttons the same size?

2008-04-05 Thread Guilherme Polo
2008/4/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > how do i do that? i get this error: > > > > self.btnDisplay = Button(self,text='1',command=lambda > n=1:self.Display(n)) > > self.btnDisplay.grid(row=3, column=0, padx=5, pady=5, width=1) > > > self.btnDisplay = Button(self,text='

[ANN] Vellum 0.8: No More YAML, Some Python

2008-04-05 Thread Zed A. Shaw
Hello Everyone, This is a very fast announcement to say that I've managed to remove YAML from Vellum, but also to remove Python while still giving you Python. :-) Check out the latest Vellum: http://www.zedshaw.com/projects/vellum/ https://launchpad.net/vellum And you'll notice that the build d

Re: [Python-Fr] "keyword arguments" en français

2008-04-05 Thread Matthieu Brucher
J'appelle ça les arguments nommés (parfois en anglais on parle de named argument). Je pense que tu parles des arguments donnés dans les **kwargs, c'est ça ? On parle aussi d'arguments formels, par opposition aux arguments positionnels lors d'un appel directement à une fonction : pour machin(0, x=1)

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread 7stud
On Apr 5, 12:02 am, [EMAIL PROTECTED] wrote: > am i not doing that then? did u look at the code? where do i add the > bind if this: > btnDisplay = Button(self, text="1", command=self.Display) >         btnDisplay.grid(row=3, column=0, padx=5, pady=5) > > is not enough? > > def Display(self, event_o

Re: Not Sure This Can Be Done...

2008-04-05 Thread gamename
Thanks! Good suggestion(s) all. Maybe I can get this done. :) -T On Apr 1, 4:49 pm, MrJean1 <[EMAIL PROTECTED]> wrote: > In any script upon startup, sys.path[0] contains the full path of the > directory where the script is located. See lib/module-sys.html> under 'path

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-05 Thread skanemupp
it works now. here is all the code: #! /usr/bin/env python from Tkinter import * import tkMessageBox class GUIFramework(Frame): """This is the GUI""" def __init__(self, master=None): """Initialize yourself""" """Initialise the base class""" Frame.__init__(self,ma

Tkinter, add pressed buttons onto string display string, how to?

2008-04-05 Thread skanemupp
using tkinter and python i now have a small App (that will hopefully soon be a fully functioning calculator) where u can push buttons and the corresponding number or operator is shown. when u press 1, "1" appears on the screen, pres + and "+" appears etc. at the moment every output overwrites the

Re: Tkinter, add pressed buttons onto string display string, how to?

2008-04-05 Thread 7stud
[EMAIL PROTECTED] wrote: > using tkinter and python i now have a small App (that will hopefully > soon be a fully functioning calculator) where u can push buttons and > the corresponding number or operator is shown. > > when u press 1, "1" appears on the screen, pres + and "+" appears etc. > > at

Re: Tkinter, add pressed buttons onto string display string, how to?

2008-04-05 Thread 7stud
On Apr 5, 1:55 pm, 7stud <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > using tkinter and python i now have a small App (that will hopefully > > soon be a fully functioning calculator) where u can push buttons and > > the corresponding number or operator is shown. > > > when u press 1, "

Re: Tkinter, add pressed buttons onto string display string, how to?

2008-04-05 Thread Paul Rubin
[EMAIL PROTECTED] writes: > using tkinter and python i now have a small App (that will hopefully > soon be a fully functioning calculator) where u can push buttons and > the corresponding number or operator is shown. I wrote something like that a long time ago, one of my first python scripts. htt

Re: Tkinter: making buttons the same size?

2008-04-05 Thread Marc 'BlackJack' Rintsch
On Sat, 05 Apr 2008 10:04:56 -0700, skanemupp wrote: > how do i do that? Please include enough from the post you are answering to make the context clear for someone who has not received the previous message. BTW I don't think the `width` argument of the `Button()` call is the best solution. Tak

Re: Tkinter, add pressed buttons onto string display string, how to?

2008-04-05 Thread skanemupp
> input = "hello" > input += " world" > print input this i know. im wondering how to handle the variable in the actual program. this exception i get: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ return self

Re: Weird scope error

2008-04-05 Thread Rory McKinley
Gary Herron wrote: > Python has no such thing as this kind of a "global scope". (True, each > module has its own global scope, but that's not what you are talking > about.) So you'll have to fix the import for *every* module that needs > access to ElementTree.You might make the change a

Re: Weird scope error

2008-04-05 Thread Michael Torrie
Rory McKinley wrote: > Gary Herron wrote: > >> Python has no such thing as this kind of a "global scope". (True, each >> module has its own global scope, but that's not what you are talking >> about.) So you'll have to fix the import for *every* module that needs >> access to ElementTree.

[PyGTK] Drawing PNG

2008-04-05 Thread hexusnexus
I have some PNGs with transparent backgrounds. How do I draw them using PyGTK? -- http://mail.python.org/mailman/listinfo/python-list

Transparent bitmap(image) in windows!

2008-04-05 Thread SMALLp
Hello everyone! First I want to apologize for asking question about wxPython on this group. I'm doing project that uses wx.ScrolledPanel few wx.Bitmap on it. It all looks wonderful on Ubuntu and very very bad on windows because images aren't transparent. As a found out it is problem that window

Re: Adding Images To MySQL

2008-04-05 Thread Gabriel Genellina
En Sat, 05 Apr 2008 11:32:00 -0300, Victor Subervi <[EMAIL PROTECTED]> escribió: >> * *- You say Content-Type: image/jpeg but you emit HTML code. You're >> lucky > if you see any > >> * *text at all. > > Well, I tried Content-Type: text/html and that threw an HTTP 500 Error. If your script ra

Re: Transparent bitmap(image) in windows!

2008-04-05 Thread SMALLp
this is code that adds image: kartaGif = wx.Image("slike/karta.gif", wx.BITMAP_TYPE_GIF) kartaGif.Rescale(self.sizeX, self.sizeY) kartaGif = wx.BitmapFromImage(kartaGif) mask = wx.Mask(kartaGif, wx.WHITE) kartaGif.SetMask(mask)

Re: Tkinter, add pressed buttons onto string display string, how to?

2008-04-05 Thread Marc 'BlackJack' Rintsch
On Sat, 05 Apr 2008 13:17:45 -0700, skanemupp wrote: >> input = "hello" >> input += " world" >> print input > > this i know. im wondering how to handle the variable in the actual > program. this exception i get: > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Pyt

Re: Tkinter, add pressed buttons onto string display string, how to?

2008-04-05 Thread skanemupp
> Just like the message says: You are trying to use `str` (on the right hand > side of the assignment) before anything is bound to that name. > > Ciao, > Marc 'BlackJack' Rintsch i know but i want the variable str(which i found out is a reserved word so i changed it) to be accessible all

Re: Weird scope error

2008-04-05 Thread Kay Schluehr
On 5 Apr., 23:08, Michael Torrie <[EMAIL PROTECTED]> wrote: > You need to either fix all these imports in these other modules (that > are probably in the site_packages folder), or modify the python import > path so that it can find ElementTree directly. I'd prefer to set an alias in the module c

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
Steve, > Kay at least has a long history as a contributor in this group, so > people know how to interpret her remarks and know that her contributions > are made on the basis of a deep understanding of Python. She is far from > belonging to the "peanut gallery", and to suggest otherwise betray

Re: RELEASED Python 2.6a2 and 3.0a4

2008-04-05 Thread Martin v. Löwis
Kay Schluehr wrote: > On 4 Apr., 21:45, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >>> The Windows x86 MSI installer is missing for both 2.6 and 3.0. >> And likely will continue to do so for some time. >> >> Regards, >> Martin > > Fine. Is there also a reason? Sure! I don't have the time to spe

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-05 Thread Martin v. Löwis
> There must be a rule behind this. There are multiple rules behind this. Python normally uses the same extension for shared libraries as the operating system, as the operating system may refuse to load them if it doesn't. So it *can't* use .pyd on Unix, because that might not work (on some implem

Re: ANN: pry unit testing framework

2008-04-05 Thread Steve Holden
Aldo Cortesi wrote: > Steve, > >> Kay at least has a long history as a contributor in this group, so >> people know how to interpret her remarks and know that her contributions >> are made on the basis of a deep understanding of Python. She is far from >> belonging to the "peanut gallery", and

Best way to check if string is an integer?

2008-04-05 Thread skanemupp
which is the best way to check if a string is an number or a char? could the 2nd example be very expensive timewise if i have to check a lot of strings? this value = raw_input() try: value = int(value) except ValueError: print "value is not an integer" or: c=raw_input("yo: ") if c in

Re: ANN: pry unit testing framework

2008-04-05 Thread Kay Schluehr
On 5 Apr., 23:54, Steve Holden <[EMAIL PROTECTED]> wrote: > To be fair I wasn't commenting on the whole thread, more on the angry > nature of your final reply, and didn't really consider Kay's remarks > fully. So perhaps I could ask *both* of you to be more civil to each > other, and leave it at t

Re: RELEASED Python 2.6a2 and 3.0a4

2008-04-05 Thread John Machin
On Apr 5, 5:45 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > The Windows x86 MSI installer is missing for both 2.6 and 3.0. > > And likely will continue to do so for some time. > > Someone's got strange definitions of "missing"! For each there's a link on the the ptyhon.org website, and a

Re: Best way to check if string is an integer?

2008-04-05 Thread Andrew Warkentin
[EMAIL PROTECTED] wrote: >which is the best way to check if a string is an number or a char? >could the 2nd example be very expensive timewise if i have to check a >lot of strings? > >this > >value = raw_input() > >try: >value = int(value) >except ValueError: >print "value is not an intege

Re: Best way to check if string is an integer?

2008-04-05 Thread Mark Dickinson
On Apr 5, 6:19 pm, [EMAIL PROTECTED] wrote: > which is the best way to check if a string is an number or a char? > could the 2nd example be very expensive timewise if i have to check a > lot of strings? You might be interested in str.isdigit: >>> print str.isdigit.__doc__ S.isdigit() -> bool Ret

while-loops enter the last time after condition is filled?

2008-04-05 Thread skanemupp
it seems to me from my results that when i use a while-loop it will execute once after the condition is met. ie the conditions is met the code executes one time more and then quits. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if string is an integer?

2008-04-05 Thread John Machin
On Apr 6, 9:25 am, Mark Dickinson <[EMAIL PROTECTED]> wrote: > On Apr 5, 6:19 pm, [EMAIL PROTECTED] wrote: > > > which is the best way to check if a string is an number or a char? > > could the 2nd example be very expensive timewise if i have to check a > > lot of strings? > > You might be interest

Recursively Backup Directories

2008-04-05 Thread misceverything
I am writing a script that will backup specified folders from one hard drive to another (for example, backup source "C:\DATA", destination "D: \Backup"), and was thinking of using shutil. What I would like to do is recursively backup the specified directories (which copytree will do), but be able

  1   2   >