Re: read(size=-1)

2007-08-06 Thread Diez B. Roggisch
7stud schrieb: > Suppose I write: > > f = open("myimg.jpg") > f.read(10) > > > According to the docs, > --- > read([size]) > > Read at most size bytes from the fileThe bytes are returned as a > string object. > -- > > How does python convert a byte to a string? A string _i

Re: read(size=-1)

2007-08-06 Thread Steve Holden
7stud wrote: > Suppose I write: > > f = open("myimg.jpg") > f.read(10) > > > According to the docs, > --- > read([size]) > > Read at most size bytes from the fileThe bytes are returned as a > string object. > -- > > How does python convert a byte to a string? > Each byte o

Re: Relative-importing *

2007-08-06 Thread Steve Holden
Marc 'BlackJack' Rintsch wrote: > On Tue, 07 Aug 2007 02:45:23 +, rbygscrsepda wrote: > >> Specifically, in Python 1.5, all of the following generate the error >> below: > > In Python *1.5*!? I somehow doubt that. ;-) > >> from . import * >> from .sibiling_package import * >> f

Re: Relative-importing *

2007-08-06 Thread Marc 'BlackJack' Rintsch
On Tue, 07 Aug 2007 02:45:23 +, rbygscrsepda wrote: > Specifically, in Python 1.5, all of the following generate the error > below: In Python *1.5*!? I somehow doubt that. ;-) > from . import * > from .sibiling_package import * > from .. import * > from ..cousin_package imp

Re: How to use C enum in Python CTypes?

2007-08-06 Thread Marc 'BlackJack' Rintsch
On Tue, 07 Aug 2007 04:57:19 +, rozniy wrote: > typedef enum olss_tag >{ >OLSS_AD, >OLSS_DA, >OLSS_DIN, >OLSS_DOUT, >OLSS_SRL, >OLSS_CT >} > OLSS; > > I managed to fudge the HDEV, UINT and PHDASS types as CTypes c_long(), > but I am not sure how translate a C e

read(size=-1)

2007-08-06 Thread 7stud
Suppose I write: f = open("myimg.jpg") f.read(10) According to the docs, --- read([size]) Read at most size bytes from the fileThe bytes are returned as a string object. -- How does python convert a byte to a string? -- http://mail.python.org/mailman/listinfo/python-list

How to use C enum in Python CTypes?

2007-08-06 Thread rozniy
I am using Python's CTypes module to import functions from a DLL into Python. Some of the DLL's functions take enum type arguments, eg: olDaGetDASS (HDEV hDev, OLSS OlSs, UINT uiElement, PHDASS phDass); //(this function is in C form) >From the header file, I found that type OLSS is an enum, like

Web based Reporting tool for Python

2007-08-06 Thread Madhu Alagu
Hi I am looking template based report tools for python.It has the ability to deliver rich content onto the screen, to the printer or into PDF, HTML, XLS, CSV and XML files. Thanks, Madhu Alagu -- http://mail.python.org/mailman/listinfo/python-list

get position is scrolled wxScrolledWindow

2007-08-06 Thread Astan Chee
Hi, I have a wxScrolledWindow, and some things drawn on it. I've hooked the left click event to a certain function I've got. Anyway, everytime I do a event.GetPosition() on the position of the mouse on the wxScrolledWindow, it returns the physical location or position of the mouse. Does anyone

Re: All leading tabs or all leading spaces - why isn't that enforced?

2007-08-06 Thread Steve Holden
John Nagle wrote: >One can argue over tab vs. space indentation, but mixing the two > is just wrong. Why not have CPython report an error if a file has > both leading tabs and leading spaces? I know that was proposed at > some point, but I don't think it ever went in. That would catch a > com

RE: All leading tabs or all leading spaces - why isn't that enforced?

2007-08-06 Thread Delaney, Timothy (Tim)
John Nagle wrote: >One can argue over tab vs. space indentation, but mixing the two > is just wrong. Why not have CPython report an error if a file has > both leading tabs and leading spaces? I know that was proposed at > some point, but I don't think it ever went in. That would catch a > co

Re: Relative-importing *

2007-08-06 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Aug 6, 12:19 am, Ben Finney <[EMAIL PROTECTED]> > wrote: >> [EMAIL PROTECTED] writes: >>> (In addition, it probably would make the program somewhat slower to >>> have an internal class inside every module, and performance is >>> important to me, as I'm planning to use

All leading tabs or all leading spaces - why isn't that enforced?

2007-08-06 Thread John Nagle
One can argue over tab vs. space indentation, but mixing the two is just wrong. Why not have CPython report an error if a file has both leading tabs and leading spaces? I know that was proposed at some point, but I don't think it ever went in. That would catch a common error introduced during

Re: boolean operations on sets

2007-08-06 Thread Alex Martelli
Michael J. Fromberger <[EMAIL PROTECTED]> wrote: ... > Also, it is a common behaviour in many programming languages for logical > connectives to both short-circuit and yield their values, so I'd argue > that most programmers are proabably accustomed to it. The && and || > operators of C and it

Re: Relative-importing *

2007-08-06 Thread rbygscrsepda
On Aug 6, 12:19 am, Ben Finney <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > (In addition, it probably would make the program somewhat slower to > > have an internal class inside every module, and performance is > > important to me, as I'm planning to use this project in a future > > g

Re: regexp problem in Python

2007-08-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Ehsan wrote: > I use this pattern : > "http.*?\.(wmv|3gp).*"" > > but it returns only 'wmv' and '3gp' instead of "http://www.2shared.com/ > download/1716611/e2000f22/Jadeed_Mlak14.wmv? > tsid=20070803-164051-9d637d11" What's the actual Python code that uses this r

Re: help with flexible decorators

2007-08-06 Thread Lawrence Oluyede
james_027 <[EMAIL PROTECTED]> wrote: > While the enhance decorator work with functions of 1 argument, how do > I make it to work with more than one arguments. Using *args. Something like this: def enhance(f): def _new(*args): return f(*args) + 1 return _new @enhance def f(*args):

help with flexible decorators

2007-08-06 Thread james_027
Hi, I want to write a flexible decorators to edit a function that may have 1 or more arguments... def enhance(func): def new(x): #do something ... return func(x) return new @enhance def method_a(x): #do something ... While the enhance decorator work with functions of

The Secret Way To Get Wealthy

2007-08-06 Thread Karin and Patrick
Please send me the information on this program. Thanks Patrick -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs + python.

2007-08-06 Thread Ben Finney
Hadron <[EMAIL PROTECTED]> writes: > Sorry to repeat, but I had to reinstall and lost all my news. Fortunately, there's no need to repeat, because the forum is archived both as a Usenet newsgroup and a mailing list. http://groups.google.com/group/comp.lang.python/> http://mail.python.org

Re: maybe a popen question... or something else?

2007-08-06 Thread Steve Holden
dude wrote: > Working on Windows XP > Say I have a Windows executable, foo.exe. > foo.exe is a command line tool that can take a number of different > arguments and perform corresponding actions. > > I want to invoke foo.exe from a Python script (using whatever will > work best). I want to contin

Re: xlrd question

2007-08-06 Thread John Machin
On Aug 4, 10:48 am, [EMAIL PROTECTED] wrote: > I ran your code which gave me this: > > >>> import sys, xlrd; print sys.version; print xlrd.__file__ > > 2.3.5 (#1, Jan 30 2006, 13:30:29) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1819)] > /System/Library/Frameworks/Python.framework/Versions/2.3

maybe a popen question... or something else?

2007-08-06 Thread dude
Working on Windows XP Say I have a Windows executable, foo.exe. foo.exe is a command line tool that can take a number of different arguments and perform corresponding actions. I want to invoke foo.exe from a Python script (using whatever will work best). I want to continuously pass arguments to f

Re: Something in the function tutorial confused me.

2007-08-06 Thread Steve Holden
Marc 'BlackJack' Rintsch wrote: > On Mon, 06 Aug 2007 10:51:20 -0700, Lee Fleming wrote: > >> why isn't the y in def f (x, y = []): something >> garbage-collected? > > `y` is a name. Only objects are garbage collected. There is no `y` in > that ``def`` in the sense that a local name `y` exists

Re: udp, datagram sockets

2007-08-06 Thread 7stud
On Aug 6, 1:27 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > I don't think that sending the datagram to port on localhost sends > the message back to the client. I'm guessing the server is sending the > message back to itself, which throws it into the infinite feedback loop > you're experienc

Re: xlrd question

2007-08-06 Thread John Machin
On Aug 5, 7:31 pm, has <[EMAIL PROTECTED]> wrote: > > Nope, DistUtils will copy all modules to site-packages as part of the > installation procedure. If you're a developer you'll probably want to > keep the original distribution around as it'll contain documentation, > examples, etc. which you'll

Redirecting stderr to null and revert

2007-08-06 Thread reubendb
Hello, I have some function that output too much stuff to stderr when called, and I have no control over the function itself. So I thought as a workaround, I redirect stderr to /dev/null before calling that function, and then revert the stderr back after calling that function. I have something like

Re: Tkinter or wxpython?

2007-08-06 Thread Paul Rubin
"Chris Mellon" <[EMAIL PROTECTED]> writes: > You repeatedly have used the word "slickness" as a pejorative. I find > that offensive and it's insulting to users. When I write applications, > I want the interface to be as smooth and trouble free as possible, It's a perjorative when it's done for its

step through .py file in a .NET application written in C# in Visual Studio

2007-08-06 Thread Bo
Hello All, I am experimenting IronPython in Visual Studio. Here is what I have, what I did and what I want 1. I have installed Visual Studio SDK 4.0 according to this blog http://blogs.msdn.com/aaronmar/archive/2006/02/16/a-bit-more-on-ironpython.aspx If I run Visual Studio under Experimental

Re: Global package variable, is it possible?

2007-08-06 Thread Chris Allen
On Aug 6, 2:27 am, Ben Finney <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > > I've read all the thread, and it seems that your problem is mostly > > to share a single dynamic state (the config) between several > > modules. So I do wonder: have you considered the use

Re: Global package variable, is it possible?

2007-08-06 Thread Chris Allen
On Aug 6, 12:41 am, Bruno Desthuilliers wrote: > Chris Allen a écrit : > > > > > Hello fellow pythoneers. I'm stumped on something, and I was hoping > > maybe someone in here would have an elegant solution to my problem. > > This is the first time I've played around with packages, so I'm > > prob

Re: Tkinter or wxpython?

2007-08-06 Thread [EMAIL PROTECTED]
On Aug 2, 8:00 pm, "wang frank" <[EMAIL PROTECTED]> wrote: > Hi, > > I want to build a GUI to execut python script. I found TKinter and > wxpython. Which one is easier for a newbie? and which one is better? > If you want to have a native look and feel, I'd choose wxpython (probably the Dabo builde

Release of Pmw.1.3

2007-08-06 Thread hulne000
Subject: ANNOUNCE: Pmw megawidgets 1.3 Pmw megawidgets for Tkinter Version 1.3 Greg McFarlane <[EMAIL PROTECTED]> http://pmw.sourceforge.net/ Serge Hulne [EMAIL PROTECTED]

Re: Tkinter or wxpython?

2007-08-06 Thread Chris Mellon
On 06 Aug 2007 12:10:44 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > "Chris Mellon" <[EMAIL PROTECTED]> writes: I had a bunch of replies to each section but I think this is getting too long so I'll sum up. You repeatedly have used the word "slickness" as a pejorative. I find that

Re: Any Good Book To Start ?

2007-08-06 Thread [EMAIL PROTECTED]
On Aug 6, 10:00 pm, "Simon Brunning" <[EMAIL PROTECTED]> wrote: > On 8/6/07, Katie Tam <[EMAIL PROTECTED]> wrote: > > > Please let me know any good book to start ? Thank You > > http://wiki.python.org/moin/PythonBooks > > -- > Cheers, > Simon B. > [EMAIL PROTECTED]://www.brunningonline.net/simon/bl

Re: udp, datagram sockets

2007-08-06 Thread anethema
On Aug 6, 1:27 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Mon, 2007-08-06 at 09:03 -0700, 7stud wrote: > > server: > > -- > > import socket > > import sys > > > s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > > s.bind(("", )) > > [...] > > #Send messages ba

Re: boolean operations on sets

2007-08-06 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Flavio wrote: > > > Hi, I have been playing with set operations lately and came across a > > kind of surprising result given that it is not mentioned in the > > standard Python tutorial: > > > > with python sets,

Re: Any Good Book To Start ?

2007-08-06 Thread Simon Brunning
On 8/6/07, Katie Tam <[EMAIL PROTECTED]> wrote: > Please let me know any good book to start ? Thank You http://wiki.python.org/moin/PythonBooks -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues -- http:

Re: RTF 2 Tiff

2007-08-06 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi all, > I am trying to convert an RTF file to a Tiff image using Python. This > process will convert several hundred images daily. Currently I am > able to get the RTF file into a text format using Rtf2Txt.py, but I > loose the images contained in the RTF file. I hav

Re: is it possible to improve traceback messages ?

2007-08-06 Thread Zentrader
On Aug 6, 10:54 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 8/6/07, Stef Mientki <[EMAIL PROTECTED]> wrote: > > > > > hello, > > > Most of time I get an error message, it is sufficient to solve to problem. > > Sometimes it's not clear to me what the problem is > > like this one: > > > N

Re: RTF 2 Tiff

2007-08-06 Thread Zentrader
On Aug 6, 12:15 pm, [EMAIL PROTECTED] wrote: > Hi all, > I am trying to convert an RTF file to a Tiff image using Python. This > process will convert several hundred images daily. Currently I am > able to get the RTF file into a text format using Rtf2Txt.py, but I > loose the images contained in

◘◘►Satellite TV on your PC - Watch it FREE Now◄◘◘

2007-08-06 Thread Nadi Petrova
Watch Satellite TV On Your Computer Without Paying Monthly Fees... • Save 1000's of $$$ over many years on cable and satellite bills. • Watch all your favorite shows on your Computer from anywhere in the World! • Plus Get FREE Unlimited Downloads Movies, MP3s Music, etc !!! • INSTANT DOWNLOAD Now!

Re: encode() question

2007-08-06 Thread Omari Norman
On Tue, Jul 31, 2007 at 09:53:11AM -0700, 7stud wrote: > s1 = "hello" > s2 = s1.encode("utf-8") > > s1 = "an accented 'e': \xc3\xa9" > s2 = s1.encode("utf-8") > > The last line produces the error: > > --- > Traceback (most recent call last): > File "test1.py", line 6, in ? > s2 = s1.encode

Re: udp, datagram sockets

2007-08-06 Thread Carsten Haese
On Mon, 2007-08-06 at 09:03 -0700, 7stud wrote: > server: > -- > import socket > import sys > > s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > s.bind(("", )) > [...] > #Send messages back to client: > total_sent = 0 > while total_sent < len(messa

Re: Any Good Book To Start ?

2007-08-06 Thread cjankowski
On Aug 6, 3:15 pm, [EMAIL PROTECTED] wrote: > On Aug 6, 2:02 pm, Katie Tam <[EMAIL PROTECTED]> wrote: > > > Please let me know any good book to start ? Thank You > > > Katie Tam > > CCNP, CCDP > > LinkWaves Corporation > > **Leading Provider of Cisco Equipment**http://www.linkwaves.com > > To start

Re: Any Good Book To Start ?

2007-08-06 Thread kyosohma
On Aug 6, 2:02 pm, Katie Tam <[EMAIL PROTECTED]> wrote: > Please let me know any good book to start ? Thank You > > Katie Tam > CCNP, CCDP > LinkWaves Corporation > **Leading Provider of Cisco Equipment**http://www.linkwaves.com To start learning Python or what? "Python Programming 3rd Ed." by Lu

RTF 2 Tiff

2007-08-06 Thread cjankowski
Hi all, I am trying to convert an RTF file to a Tiff image using Python. This process will convert several hundred images daily. Currently I am able to get the RTF file into a text format using Rtf2Txt.py, but I loose the images contained in the RTF file. I have the same problem when I convert t

Re: Tkinter or wxpython?

2007-08-06 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Yeah...I would assume I would enjoy Tkinter more if I knew more tcl. > Until that day arrives though, it will probably still be fairly > confusing for me to figure out. I do like it's "pythonic" style > though. I've managed to program tkinter without knowing anything ab

Re: Tkinter or wxpython?

2007-08-06 Thread Paul Rubin
"Chris Mellon" <[EMAIL PROTECTED]> writes: > Define "functionality". From the rest of your posts, that seems to be > limited to "press buttons" and "type small amounts of non-formatted > text" on the interaction side and "display small amounts of simply > formatted text" on the output side. OK, I

Re: Something in the function tutorial confused me.

2007-08-06 Thread Lee Fleming
On Aug 6, 1:26 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Lee Fleming wrote: > > On Aug 6, 6:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > Because when the function is called, the line > > >> if y is None: y = [] > > > is executed, binding a brand new empty list to y. This > > "rebindi

Re: amra and py2exe

2007-08-06 Thread Larry Bates
vinod wrote: > Hi i am having trouble creating exe using py2exe for amara package > i saw some posts related to this talking about amara cat file but i > dont have any cat file for amara on my machine. > the standalone script runs fine. i am using python on windows > here is the error i am getting

Any Good Book To Start ?

2007-08-06 Thread Katie Tam
Please let me know any good book to start ? Thank You Katie Tam CCNP, CCDP LinkWaves Corporation **Leading Provider of Cisco Equipment** http://www.linkwaves.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing * From a Package

2007-08-06 Thread kyosohma
On Aug 6, 9:06 am, "Patrick Doyle" <[EMAIL PROTECTED]> wrote: > Reading through the Python tutorial, I got to section 6.4.1, > "Importing * From a Package", which states: > > "If __all__ is not defined, the statement from Sound.Effects import * > does not import all submodules from the package Soun

Re: wxWindows - incorrect path on installation?

2007-08-06 Thread kyosohma
On Aug 6, 12:54 pm, frikk <[EMAIL PROTECTED]> wrote: > This should be a very simple one, sorry! > > I installed wxWindows on my OS X box but I am unable to get my python > install to recognize the module. Unfortunately I don't know a whole > lot about where modules install to or how to configure p

Re: udp, datagram sockets

2007-08-06 Thread 7stud
On Aug 6, 11:05 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > The network is probably dropping some of your data, causing the server > to never see the termination marker. > As far as I can tell, the output disproves that notion. If the termination character were somehow lost in transm

Re: Tkinter or wxpython?

2007-08-06 Thread kyosohma
On Aug 6, 12:49 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > I tried the PMW widget toolkit. It was ok, but it seemed kind of > > buggy. I found out about Tix on a forum of some sort. When I tried to > > find out how to get it and use it, all I found was conflicting

Re: udp, datagram sockets

2007-08-06 Thread 7stud
On Aug 6, 10:59 am, Thomas Jollans <[EMAIL PROTECTED]> wrote: > > You don't make any attempt to break out of the outer loop. (break breaks the > innermost loop) > By design. My server stands ready to process any and all messages forever. The problem I'm having is that my server processes the sam

automatically setting platform-dependent location for Distutils "install-scripts"?

2007-08-06 Thread jomorcsi
Hello all, I am developing a Python-based tool that will be deployed both in a Windows and in a Linux environment, and I have a question concerning the use of the Distutils module to manage the installation of the tool in a transparent manner. A bit of background info: 1. (I am using Python versi

Re: Something in the function tutorial confused me.

2007-08-06 Thread Steve Holden
Lee Fleming wrote: > On Aug 6, 6:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > Because when the function is called, the line > > >> if y is None: y = [] > > > is executed, binding a brand new empty list to y. This > "rebinding" happens every time the function is called, unless you > pro

Re: Something in the function tutorial confused me.

2007-08-06 Thread Lee Fleming
Thanks for all the help, everyone. I guess I was confused with default arguments that were mutable and immutable. I will continue to look over these posts until I understand what is happening. I cannot believe the number of helpful responses I got! -- http://mail.python.org/mailman/listinfo/pyth

Conspiracies Revealed! Shadow governments

2007-08-06 Thread conspiracy . black6
http://nasaconspiracy.net/conspiracy - Find out who really shot JFK!, learn how they faked the lunar landing, see what they are putting in our milk to enlarge young womens breasts in a goal to raise the declining birth rate. Proof of extraterrestrial life and much more revealed here. -- http://m

Re: Tkinter or wxpython?

2007-08-06 Thread Bryan Hepworth
Chris Mellon wrote: > On 06 Aug 2007 09:44:15 -0700, Paul Rubin > <"http://phr.cx"@nospam.invalid> wrote: > >> "Chris Mellon" <[EMAIL PROTECTED]> writes: >> Might or might not matter for the application, especially considering that tkinter is part of the discussion.

Re: Tkinter or wxpython?

2007-08-06 Thread Steve Holden
Chris Mellon wrote: > On 06 Aug 2007 09:44:15 -0700, Paul Rubin > <"http://phr.cx"@nospam.invalid> wrote: >> "Chris Mellon" <[EMAIL PROTECTED]> writes: [...] >> Again, it all depends on what you're trying to do. For data entry >> stuff you probably want the data on a remote server anyway, and you

RE: Something in the function tutorial confused me.

2007-08-06 Thread Hamilton, William
> From: Lee Fleming > On Aug 6, 12:30 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > > When you call f(23), the variable y within it gets created and points at > > None. When f(23) exits, the y that it created gets destroyed. (Well, > > goes out of scope, but even if it's not garbage collec

Re: Something in the function tutorial confused me.

2007-08-06 Thread Marc 'BlackJack' Rintsch
On Mon, 06 Aug 2007 10:51:20 -0700, Lee Fleming wrote: > why isn't the y in def f (x, y = []): something > garbage-collected? `y` is a name. Only objects are garbage collected. There is no `y` in that ``def`` in the sense that a local name `y` exists when the ``def`` is executed. The line just

Re: Something in the function tutorial confused me.

2007-08-06 Thread Neil Cerutti
On 2007-08-06, Lee Fleming <[EMAIL PROTECTED]> wrote: > On Aug 6, 12:30 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: >> When you call f(23), the variable y within it gets created and points at >> None. When f(23) exits, the y that it created gets destroyed. (Well, >> goes out of scope, but

can't import SimpleXMLRPCDisptacher from SimpleXMLRPCServer

2007-08-06 Thread bhamdeveloper
from my server I can't import SimpleXMLRPCDispatcher. please see http://intertubewaypoint.com/metaweblog/ for the stacktrace/error message. This onle happens on my server; I am trying to integrate the metaweblog api into my blog and it is barfing when trying to get that dispatcher. Anyone seen t

Re: Something in the function tutorial confused me.

2007-08-06 Thread Neil Cerutti
On 2007-08-06, Lee Fleming <[EMAIL PROTECTED]> wrote: > On Aug 6, 6:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > Because when the function is called, the line > > >> if y is None: y = [] > > > is executed, binding a brand new empty list to y. This > "rebinding" happens every time the funct

Re: wxWindows - incorrect path on installation?

2007-08-06 Thread Kevin Walzer
frikk wrote: > This should be a very simple one, sorry! > > I installed wxWindows on my OS X box but I am unable to get my python > install to recognize the module. Unfortunately I don't know a whole > lot about where modules install to or how to configure python to see > them. IE: 'import wx' d

wxWindows - incorrect path on installation?

2007-08-06 Thread frikk
This should be a very simple one, sorry! I installed wxWindows on my OS X box but I am unable to get my python install to recognize the module. Unfortunately I don't know a whole lot about where modules install to or how to configure python to see them. IE: 'import wx' does not work - it says un

Re: Something in the function tutorial confused me.

2007-08-06 Thread Lee Fleming
On Aug 6, 12:30 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > When you call f(23), the variable y within it gets created and points at > None. When f(23) exits, the y that it created gets destroyed. (Well, > goes out of scope, but even if it's not garbage collected it won't ever > come ba

Re: is it possible to improve traceback messages ?

2007-08-06 Thread Chris Mellon
On 8/6/07, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > Most of time I get an error message, it is sufficient to solve to problem. > Sometimes it's not clear to me what the problem is > like this one: > > N = int (log10(self.Value)) + 1 > TypeError: int() argument must be a string or a

Re: Tkinter or wxpython?

2007-08-06 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: > > I tried the PMW widget toolkit. It was ok, but it seemed kind of > buggy. I found out about Tix on a forum of some sort. When I tried to > find out how to get it and use it, all I found was conflicting > information. I finally got it downloaded only to find I had to c

is it possible to improve traceback messages ?

2007-08-06 Thread Stef Mientki
hello, Most of time I get an error message, it is sufficient to solve to problem. Sometimes it's not clear to me what the problem is like this one: N = int (log10(self.Value)) + 1 TypeError: int() argument must be a string or a number In order to solve it, in general I put some print statem

Re: Tkinter or wxpython?

2007-08-06 Thread Chris Mellon
On 06 Aug 2007 09:44:15 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > "Chris Mellon" <[EMAIL PROTECTED]> writes: > > > Might or might not matter for the application, especially considering > > > that tkinter is part of the discussion. > > The point is that you have no option with the

RE: Something in the function tutorial confused me.

2007-08-06 Thread Hamilton, William
> From: Lee Fleming > > On Aug 6, 6:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > Because when the function is called, the line > > > > if y is None: y = [] > > > is executed, binding a brand new empty list to y. This > "rebinding" happens every time the function is called, unless you

Re: Tkinter or wxpython?

2007-08-06 Thread kyosohma
On Aug 6, 10:27 am, Kevin Walzer <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: > > > Tkinteger (dang, I always end up typing it that way, I won't even > > bother fixing the error) is easy to use for simple gui's, and it's > > part of the standard python distro which for me is a big advantage (no >

Re: Something in the function tutorial confused me.

2007-08-06 Thread Lee Fleming
On Aug 6, 6:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: Because when the function is called, the line > if y is None: y = [] is executed, binding a brand new empty list to y. This "rebinding" happens every time the function is called, unless you provide an argument for y that is not Non

Re: udp, datagram sockets

2007-08-06 Thread Jean-Paul Calderone
On Mon, 06 Aug 2007 09:03:45 -0700, 7stud <[EMAIL PROTECTED]> wrote: >I'm trying to understand datagrams. My client program sends a message >to the server, and then the server infinitely loops over the recv() to >make sure all the data was received. I'm trying to use an * to signal >the end of th

Re: udp, datagram sockets

2007-08-06 Thread Thomas Jollans
On Monday 06 August 2007, 7stud wrote: > I'm trying to understand datagrams. My client program sends a message > to the server, and then the server infinitely loops over the recv() to > make sure all the data was received. I'm trying to use an * to signal > the end of the message, so that the ser

Re: Tkinter or wxpython?

2007-08-06 Thread Paul Rubin
"Chris Mellon" <[EMAIL PROTECTED]> writes: > > Might or might not matter for the application, especially considering > > that tkinter is part of the discussion. > The point is that you have no option with the browser - even Tkinter > has platform theming support now. Hmm, I don't know anything abo

Re: boolean operations on sets

2007-08-06 Thread Stargaming
On Mon, 06 Aug 2007 14:13:51 +, Flavio wrote: > Hi, I have been playing with set operations lately and came across a > kind of surprising result given that it is not mentioned in the standard > Python tutorial: > > with python sets, intersections and unions are supposed to be done > like t

Re: Tkinter or wxpython?

2007-08-06 Thread Paul Rubin
Paul Rubin writes: > > No native integration - no "open file", no "browse the filesystem", no > > rich drag and drop, no copy/paste. > > File i/o and file system browsing are available from javascript if the > user grants permission. File system browsing for the limited

udp, datagram sockets

2007-08-06 Thread 7stud
I'm trying to understand datagrams. My client program sends a message to the server, and then the server infinitely loops over the recv() to make sure all the data was received. I'm trying to use an * to signal the end of the message, so that the server can break out of the infinite while loop us

Re: Tkinter or wxpython?

2007-08-06 Thread Chris Mellon
On 06 Aug 2007 08:20:20 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > "Chris Mellon" <[EMAIL PROTECTED]> writes: > > No native look and feel - constrained by the browser. > > Might or might not matter for the application, especially considering > that tkinter is part of the discussion

Re: boolean operations on sets

2007-08-06 Thread Diez B. Roggisch
Flavio wrote: > Hi, I have been playing with set operations lately and came across a > kind of surprising result given that it is not mentioned in the > standard Python tutorial: > > with python sets, intersections and unions are supposed to be done > like this: > In [7]:set('casa') & set('por

Re: boolean operations on sets

2007-08-06 Thread Thomas Jollans
On Monday 06 August 2007, Flavio wrote: > So My question is: Why has this been implemented in this way? I can > see this confusing many newbies... I did not implement this, so I cannot say, but it does have useful side-effects, for example: x = A or B is equivalent to: if A: x = A else: x

Re: Tkinter or wxpython?

2007-08-06 Thread Kevin Walzer
Paul Rubin wrote: > > Tkinteger (dang, I always end up typing it that way, I won't even > bother fixing the error) is easy to use for simple gui's, and it's > part of the standard python distro which for me is a big advantage (no > extra crap to download). However, the widget set is rather ugly

Re: computer, printer, and another

2007-08-06 Thread kyosohma
On Aug 6, 10:21 am, angga_cute <[EMAIL PROTECTED]> wrote: > Hi guys > I have some information for you... > I would like you to invite to visiting my web, may be you need some > information about newest information about computer, laptop, and than > printer. I have little bit information on my

Re: boolean operations on sets

2007-08-06 Thread Steve Holden
Flavio wrote: > Hi, I have been playing with set operations lately and came across a > kind of surprising result given that it is not mentioned in the > standard Python tutorial: > > with python sets, intersections and unions are supposed to be done > like this: > In [7]:set('casa') & set('porc

computer, printer, and another

2007-08-06 Thread angga_cute
Hi guys I have some information for you... I would like you to invite to visiting my web, may be you need some information about newest information about computer, laptop, and than printer. I have little bit information on my web http://www.komputer-djogja.blogspot.com/ I hope my web can give

Re: Tkinter or wxpython?

2007-08-06 Thread kyosohma
On Aug 6, 9:58 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 06 Aug 2007 07:39:12 -0700, Paul Rubin > > > > <"http://phr.cx"@nospam.invalid> wrote: > > [EMAIL PROTECTED] writes: > > > I've read that Tkinter doesn't scale well if you're writing complex > > > GUIs. I haven't been able to test t

Re: Tkinter or wxpython?

2007-08-06 Thread Paul Rubin
"Chris Mellon" <[EMAIL PROTECTED]> writes: > No native look and feel - constrained by the browser. Might or might not matter for the application, especially considering that tkinter is part of the discussion. > No control over browser UI idioms. I had to write this post twice > because the text c

Re: Tkinter or wxpython?

2007-08-06 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I agree that making web apps is probably the way of the future. > However, there are lots of security risks involved with it that need > to be understood. One of the problems that raging is about AJAX, see > here: > http://arstechnica.com/news.ars/post/20070802-security

Re: Tkinter or wxpython?

2007-08-06 Thread Chris Mellon
On 06 Aug 2007 07:39:12 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > [EMAIL PROTECTED] writes: > > I've read that Tkinter doesn't scale well if you're writing complex > > GUIs. I haven't been able to test this hypothesis though. However, > > since I had to rewrite VBA apps into Pyth

Re: Tkinter or wxpython?

2007-08-06 Thread kyosohma
On Aug 6, 9:39 am, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I've read that Tkinter doesn't scale well if you're writing complex > > GUIs. I haven't been able to test this hypothesis though. However, > > since I had to rewrite VBA apps into Python, to get the rig

Re: Scope question

2007-08-06 Thread Neil Cerutti
On 2007-08-06, Nitro <[EMAIL PROTECTED]> wrote: > Hello, > > today I wrote this piece of code and I am wondering why it does > not work the way I expect it to work. Here's the code: > > y = 0 > def func(): > y += 3 > func() > > This gives an > > UnboundLocalError: local variable 'y' reference

Re: Tkinter or wxpython?

2007-08-06 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I've read that Tkinter doesn't scale well if you're writing complex > GUIs. I haven't been able to test this hypothesis though. However, > since I had to rewrite VBA apps into Python, to get the right "look > and feel" I needed the widgets that wxPython provided. Since

Re: Importing * From a Package

2007-08-06 Thread Jean-Paul Calderone
On Mon, 6 Aug 2007 10:06:51 -0400, Patrick Doyle <[EMAIL PROTECTED]> wrote: >Reading through the Python tutorial, I got to section 6.4.1, >"Importing * From a Package", which states: > >"If __all__ is not defined, the statement from Sound.Effects import * >does not import all submodules from the pa

Re: Tkinter or wxpython?

2007-08-06 Thread kyosohma
On Aug 2, 7:00 pm, "wang frank" <[EMAIL PROTECTED]> wrote: > Hi, > > I want to build a GUI to execut python script. I found TKinter and > wxpython. Which one is easier for a newbie? and which one is better? > > Thanks > > Frank > > _ >

  1   2   >