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

2008-04-05 Thread Jorgen Grahn
On Sat, 5 Apr 2008 22:02:10 -0700 (PDT), Paddy <[EMAIL PROTECTED]> wrote: > On Apr 6, 5:18 am, ernie <[EMAIL PROTECTED]> wrote: >> On Apr 6, 10:23 am, Roy Smith <[EMAIL PROTECTED]> wrote: >> > int(s) and catching any exception thrown just sounds like the best way. >> >> Another corner case: Is "5.

Re: RELEASED Python 2.6a2 and 3.0a4

2008-04-05 Thread Martin v. Löwis
John Machin wrote: > 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"! Rather a flexible definition of "so

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

2008-04-05 Thread Paddy
On Apr 6, 5:18 am, ernie <[EMAIL PROTECTED]> wrote: > On Apr 6, 10:23 am, Roy Smith <[EMAIL PROTECTED]> wrote: > > > > > In article <[EMAIL PROTECTED]>, > > Steve Holden <[EMAIL PROTECTED]> wrote: > > > > > This doesn't cater for negative integers. > > > > No, it doesn't, but > > > > s.isdigit() o

Re: httplib VERY slow

2008-04-05 Thread reacocard
On Apr 5, 8:50 pm, reacocard <[EMAIL PROTECTED]> wrote: > Hi, I'm writing a download manager in python, and httplib is being > very slow when pulling from localhost or even other servers on the > local network. I'm getting about 10MB in 14s with httplib, while wget > hits 80MB in less than 3s. You

Python Data Utils

2008-04-05 Thread Jesse Aldridge
In an effort to experiment with open source, I put a couple of my utility files up http://github.com/jessald/python_data_utils/ tree/master">here. What do you think? -- http://mail.python.org/mailman/listinfo/python-list

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

2008-04-05 Thread ernie
On Apr 6, 10:23 am, Roy Smith <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Steve Holden <[EMAIL PROTECTED]> wrote: > > > > This doesn't cater for negative integers. > > > No, it doesn't, but > > > s.isdigit() or (s[0] in "+-" and s[1:].isdigit) # untested > > > does. > > I think

Re: id functions of ints, floats and strings

2008-04-05 Thread Dan Bishop
On Apr 5, 9:30 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > > In fact all you can in truth say is that > >a is b --> a == b > You can't even guarantee that. >>> inf = 1e1000 >>> nan = inf / inf >>> nan is nan True >>> nan == nan False -- http://mail.python.org/mailman/listinfo/python-list

httplib VERY slow

2008-04-05 Thread reacocard
Hi, I'm writing a download manager in python, and httplib is being very slow when pulling from localhost or even other servers on the local network. I'm getting about 10MB in 14s with httplib, while wget hits 80MB in less than 3s. You can find the code I made to benchmark this here: http://pastebin

Re: id functions of ints, floats and strings

2008-04-05 Thread Steve Holden
Gabriel Genellina wrote: > En Thu, 03 Apr 2008 19:27:47 -0300, <[EMAIL PROTECTED]> escribió: > >> Hi all, >> >> I've been playing around with the identity function id() for different >> types of objects, and I think I understand its behaviour when it comes >> to objects like lists and tuples in wh

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

2008-04-05 Thread Steve Holden
7stud wrote: >>> 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

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

2008-04-05 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > > This doesn't cater for negative integers. > > > No, it doesn't, but > > s.isdigit() or (s[0] in "+-" and s[1:].isdigit) # untested > > does. I think this fails on " -1". So, then you start doing s.strip().isdigit(

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

2008-04-05 Thread Steve Holden
Fredrik Lundh wrote: > 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; prin

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

2008-04-05 Thread Steve Holden
John Machin wrote: > 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? >>

sys.path and importing modules from other directories

2008-04-05 Thread Martin P. Hellwig
Hello all, I had some troubles in the past how to arrange my packages and modules, because I usually don't develop my stuff in the Lib\site-packages directory I have some troubles when importing depending modules that are in 'sibling' directories. Like in the following scenario: pkg_root\ -__in

header intact. Or visitthis web page

2008-04-05 Thread snake snake
_ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/-- http://mail.python.org/mailman/listinfo/python-list

Re: Recursively Backup Directories

2008-04-05 Thread Rick Dooling
On Apr 5, 6:56 pm, [EMAIL PROTECTED] wrote: > What I would like to do > is recursively backup the specified directories . . . > but be able to specify exclusion directories (which copytree does > not appear to allow you to do). My initial thoughts were I'll > probably have to use os.path.walk for

Re: troll poll

2008-04-05 Thread alex23
(Aahz) wrote: > alex23 wrote: > > >The usual > >response to complaining about the lack of a killfile for Google Groups > >has been "use a decent client", but as I'm constantly moving between > >machines having a consistent app for usenet has more value to me. > > That's why I ssh into my ISP for tr

Re: Learning curve for new database program with Python?

2008-04-05 Thread John Nagle
Jetus 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 will be > relational. I am a beginner Py

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

2008-04-05 Thread 7stud
> > 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 acc

Re: Recursively Backup Directories

2008-04-05 Thread Gabriel Genellina
En Sat, 05 Apr 2008 20:56:31 -0300, <[EMAIL PROTECTED]> escribió: > 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 recursiv

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

2008-04-05 Thread Tim Chase
> I always do it the first way. It is simpler, and should be faster. Ditto. Using int() is best. It's clear, it's correct, and it should be as fast as it gets. >> if c in '0123456789': >>print "integer" >> else: >>print "char" > > Also, the second way will only work on single-digit num

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

2008-04-05 Thread Gabriel Genellina
En Sat, 05 Apr 2008 18:23:50 -0300, <[EMAIL PROTECTED]> escribió: >> 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. >> > > i know but i want the variable str(which i found out is a reserved > word so

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

2008-04-05 Thread John Machin
On Apr 6, 9:53 am, [EMAIL PROTECTED] wrote: > 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. The syntax is this: while condition: do_something

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

2008-04-05 Thread Tim Chase
> it seems to me from my results that when i use a while-loop it > will execute once after the condition is met. Nope. > ie the conditions is met the code executes one time more and > then quits. Must be that your conditional is wrong, or your conditions are not updated the way you think they a

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

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

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 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

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: 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: 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

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 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

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: 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: 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: 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: 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: 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: 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: 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

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

[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

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.

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: 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: 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 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, 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 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

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, 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

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 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: [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)

[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: 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='

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 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 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: 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: 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 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: 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: 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, 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 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: 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

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: 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

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: 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)) > >> # ... > > >>

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 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

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: 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: 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: 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

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: 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

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: 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 [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: 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: 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 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: 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: 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: 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: 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 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: 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 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: 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: 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: 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: 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

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 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 =

  1   2   >