Re: Need an identity operator because lambda is too slow

2007-02-18 Thread Steven D'Aprano
On Sat, 17 Feb 2007 22:19:41 -0800, Raymond Hettinger wrote: > [Deron Meranda >>] I'm looking for something in >> Python which would act like an identity operator, or I-combinator: a >> do-nothing function. The best I know of is: (lambda x: x), but it is >> not ideal. > > File a feature reques

Re: Getting a class name

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 04:20:33 -0300, goodwolf <[EMAIL PROTECTED]> escribió: > I suppose that you wont get class name into its code (or before > definition end) but not into a method definition. > > > import sys > > def getCodeName(deap=0): > return sys._getframe(deap+1).f_code.co_name > > > c

Re: cmd all commands method?

2007-02-18 Thread Michele Simionato
On Feb 17, 11:44 pm, Bjoern Schliessmann wrote: > placid wrote: > > if i want to treat every cmdloop prompt entry as a potential > > command then i need to overwrite the default() method ? > > Excuse me, what's a cmdloop prompt? What's the "default() method"? > > > What i want to achieve is to be

Re: conver string to dictionary

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 03:44:47 -0300, mahdieh saeed <[EMAIL PROTECTED]> escribió: > Hi > I want to convert string to dictionary .what is the best solution for > this ? > for example string is like this: > > '{"SalutationID":["primarykey",8388607,0,None],"CompanyID":[0,8388607,0,"index"], >

Re: conver string to dictionary

2007-02-18 Thread Daniel Nogradi
> I want to convert string to dictionary .what is the best solution for this? > for example string is like this: > > > '{"SalutationID":["primarykey",8388607,0,None],"CompanyID":[0,8388607,0,"index"], > "SalutationName":["",255,0,None],"isDefault":["tinyint",1,1,None]}' > > and I want to con

Extracurricular Activities at PyCon This Year

2007-02-18 Thread Jeff Rush
At PyCon this year we are having a significant number of activities besides the keynotes and talks. One group of those are the birds-of-a-feather gatherings being held in the evenings. The Python community consists of a number of smaller communities and we're encouraging them to hold meetings,

Re: Complex HTML forms

2007-02-18 Thread Gregor Horvath
George Sakkis schrieb: > I'd like to gather advice and links to any existing solutions (e.g. > libraries, frameworks, design patterns) on general ways of writing > complex web forms, as opposed to the typical {name:value} flat model. > A particular case of what I mean by complex is hierarchical for

Re: cmd all commands method?

2007-02-18 Thread placid
On Feb 18, 7:17 pm, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > On Feb 17, 11:44 pm, Bjoern Schliessmann > > > [EMAIL PROTECTED]> wrote: > > placid wrote: > > > if i want to treat every cmdloop prompt entry as a potential > > > command then i need to overwrite the default() method ? > > > Exc

Re: PyDev on Mac

2007-02-18 Thread Diez B. Roggisch
Ahmer schrieb: > I've been trying to set up PyDev on my new MacBook Pro, but i have not > had an success. > > Could you please help! Just wait until my crystal ball comes back from the cleaners, and I will start looking at your problem. As you can lay back and do nothing while that happens, I s

Re: cmd all commands method?

2007-02-18 Thread Peter Otten
placid wrote: > On Feb 18, 7:17 pm, "Michele Simionato" <[EMAIL PROTECTED]> > wrote: >> On Feb 17, 11:44 pm, Bjoern Schliessmann > >> >> >> [EMAIL PROTECTED]> wrote: >> > placid wrote: >> > > if i want to treat every cmdloop prompt entry as a potential >> > > command then i need to overwrite the d

Re: cmd all commands method?

2007-02-18 Thread Michele Simionato
On Feb 18, 10:49 am, "placid" <[EMAIL PROTECTED]> wrote: > On Feb 18, 7:17 pm, "Michele Simionato" <[EMAIL PROTECTED]> > > > Yes, he is talking about the cmd > > module:http://docs.python.org/dev/lib/Cmd-objects.html. > > However that module was never intended as a real interpreter, so > > definin

string.find returns -1 when string evidently in source file

2007-02-18 Thread bryan rasmussen
hi, the following is returning -1: import string import sys x = open("latvian.txt",'r') x1 = x.read() print x1.find("LAYOUT") --- given a file like this KBD Layout01"Latvian (QWERTY) (Custom)" COPYRIGHT "(c) 2007 IG" COMPANY "IG" LOCALEID"0426" VERSION 1.0

Re: conver string to dictionary

2007-02-18 Thread Michael Bentley
On Feb 18, 2007, at 12:44 AM, mahdieh saeed wrote: I want to convert string to dictionary .what is the best solution for this ? for example string is like this: '{"SalutationID":["primarykey",8388607,0,None],"CompanyID": [0,8388607,0,"index"], "SalutationName":["",255,0,None],"isDefault":[

Re: basic jython question

2007-02-18 Thread Vinay Sajip
> On Feb 15, 1:53 pm, "Richard Brodie" <[EMAIL PROTECTED]> wrote: > > Since the CPython module is heavily influenced by the native Javalogging > > framework (and/or log4j), I would have thought that it would be easier > > to create a Jython wrapper for those. Agreed, but if you copy the logging fo

Dlls

2007-02-18 Thread Jason Ward
Hi. I am interested to know why python can't access DLL files directly. It seems to me that because python can't access DLL's directly we have to waste our time and write wrappers around libraries that have already been written. So if the python developers were to implement say this. import MYDL

Re: Need an identity operator because lambda is too slow

2007-02-18 Thread David Wahler
On Feb 18, 5:59 am, "Deron Meranda" <[EMAIL PROTECTED]> wrote: > Consider a much-simplified example of such an iteration where > sometimes you need to transform an item by some function, but most of > the time you don't: > > if some_rare_condition: > func = some_transform_function >

Re: Getting a class name

2007-02-18 Thread Fuzzyman
On Feb 17, 8:33 pm, deelan <[EMAIL PROTECTED]> wrote: > Harlin Seritt wrote: > > Hi, > > > How does one get the name of a class from within the class code? I > > tried something like this as a guess: > > > self.__name__ > > Get the class first, then inspect its name: > > >>> class Foo(object): pas

Distutils: Python version information

2007-02-18 Thread Samuel
In Python cheese shop, there is a field that shows the Python version that is required by a listed package. I have not found this covered in the distutils documentation: How do you add the Python version information into the setup script of a package? Unfortunately, the keyword list: http://docs

Re: Help Required for Choosing Programming Language

2007-02-18 Thread Bjoern Schliessmann
Stef Mientki wrote: > Some examples: > - Creating a treeview (like in the M$ explorer), with full edit > capabilities and full drag & drop facilities: Delphi takes about > 40 lines of code (most of them even ^C ^V). - Creating a graphical > overview of relations between database tables, which can

Re: How do I save the contents of a text buffer

2007-02-18 Thread google
Solved! # Output file outfile = open("newbannedsitelist", "w") outfile.write(textbuffer.get_text(textbuffer.get_start_iter(), textbuffer.get_end_iter(), include_hidden_chars=True)) outfile.close() I'm new to Python and GTK and may not be asking the right type of questions initially. I program

Re: Getting a class name

2007-02-18 Thread Daniel Klein
On 18 Feb 2007 04:24:47 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: >On Feb 17, 8:33 pm, deelan <[EMAIL PROTECTED]> wrote: >> Harlin Seritt wrote: >> > Hi, >> >> > How does one get the name of a class from within the class code? I >> > tried something like this as a guess: >> >> > self.__name__ >

Re: Complex HTML forms

2007-02-18 Thread Diez B. Roggisch
George Sakkis schrieb: > I'd like to gather advice and links to any existing solutions (e.g. > libraries, frameworks, design patterns) on general ways of writing > complex web forms, as opposed to the typical {name:value} flat model. > A particular case of what I mean by complex is hierarchical for

Re: Getting a class name

2007-02-18 Thread Michele Simionato
On Feb 18, 1:24 pm, "Fuzzyman" <[EMAIL PROTECTED]> wrote: > Why is the __name__ attribute not available to the instance? Why don't > normal lookup rules apply (meaning that a magic attribute will be > looked up on the class for instances) ? Because __name__ isn't really an attribute, it is a descr

Re: Help Required for Choosing Programming Language

2007-02-18 Thread Bruno Desthuilliers
Stef Mientki a écrit : (snip) > I'm not an (educated) programmer, so I don't always use the right terms :-( > If I look at a well established program like DIA, > and see that it still can't repaint it's screen always correctly, ... I suppose you're talking about the Diagram drawing program Dia. If

Re: why I don't like range/xrange

2007-02-18 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Bruno Desthuilliers wrote: > >>Roel Schroeven a ecrit : >> >>>Bruno Desthuilliers schreef: >>> >>> stdazi a ecrit : >>> >>> >for (i = 0 ; i < 10 ; i++) > i = 10; for i in range(10): i = 10 What's your point, exactly ? >>> >>

Re: Help Required for Choosing Programming Language

2007-02-18 Thread Peter Decker
On 2/17/07, Stef Mientki <[EMAIL PROTECTED]> wrote: > Some examples: > - Creating a treeview (like in the M$ explorer), with full edit capabilities > and full drag & drop > facilities: Delphi takes about 40 lines of code (most of them even ^C ^V). > - Creating a graphical overview of relations be

Re: Approaches of interprocess communication

2007-02-18 Thread Steve Holden
Donn Cave wrote: > Quoth Steve Holden <[EMAIL PROTECTED]>: > | Ben Finney wrote: > ... > | > If a programmer decides on behalf of the user that "localhost" should > | > be treated specially, that programmer is making an error. > | > | Inter-process TCP/IP communication between two processes on the

function & class

2007-02-18 Thread jupiter
hi friends, I have a program like some variable definations a function ( arg1, agr2): do something with arg1 & arg2 return a list if condition do this function(arg1,arg2) else if condition do this function else do this My problem is I want to use threadin

Re: Getting a class name

2007-02-18 Thread Fuzzyman
On Feb 18, 1:22 pm, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > On Feb 18, 1:24 pm, "Fuzzyman" <[EMAIL PROTECTED]> wrote: > > > Why is the __name__ attribute not available to the instance? Why don't > > normal lookup rules apply (meaning that a magic attribute will be > > looked up on the clas

Re: Dlls

2007-02-18 Thread Steve Holden
Jason Ward wrote: > Hi. I am interested to know why python can't access DLL files directly. > It seems to me that because python can't access DLL's directly we have to > waste our time and write wrappers around libraries that have already > been written. > > So if the python developers were to i

Re: Help Required for Choosing Programming Language

2007-02-18 Thread Diez B. Roggisch
Stef Mientki schrieb: >>> - designing the GUI will cost me about 2 .. 3 times as much in Python >> >> You mean delphi here I presume? > No, but if that's your believe .. I'm sorry, that was a misreading of mine. > Some examples: > - Creating a treeview (like in the M$ explorer), with full edit >

Re: Complex HTML forms

2007-02-18 Thread George Sakkis
On Feb 18, 4:44 am, Gregor Horvath <[EMAIL PROTECTED]> wrote: > George Sakkis schrieb: > > > I'd like to gather advice and links to any existing solutions (e.g. > > libraries, frameworks, design patterns) on general ways of writing > > complex web forms, as opposed to the typical {name:value} flat

Re: PyDev on Mac

2007-02-18 Thread Ahmer
On Feb 18, 4:50 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Ahmer schrieb: > > > I've been trying to set up PyDev on my new MacBook Pro, but i have not > > had an success. > > > Could you please help! > > Just wait until my crystal ball comes back from the cleaners, and I will > start looki

Re: xml.dom.minidom memory usage

2007-02-18 Thread Stefan Behnel
Dan wrote: > I'm using python's xml.dom.minidom module to generate xml files, and > I'm running into memory problems. Then take a look at cElementTree. It's part of Python 2.5 and is available as a separate module for Python 2.4. It's fast, has a very low memory profile and if you ever decide to n

search cursor in pythonwin 2.1

2007-02-18 Thread GISDude
Hi all. I am trying to create a little script(I think) that will basically use a search cursor. I am a GIS(geographic information systems) Analyst and in our software(ESRI ARCGIS 9.1) ESRI has implemented Python 2.1 as the scripting language of choice. In my script I'm going thru a dbf file and e

Re: PyDev on Mac

2007-02-18 Thread Diez B. Roggisch
Ahmer schrieb: > On Feb 18, 4:50 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> Ahmer schrieb: >> >>> I've been trying to set up PyDev on my new MacBook Pro, but i have not >>> had an success. >>> Could you please help! >> Just wait until my crystal ball comes back from the cleaners, and I wi

Re: Getting a class name

2007-02-18 Thread goodwolf
On Feb 18, 9:17 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 18 Feb 2007 04:20:33 -0300, goodwolf <[EMAIL PROTECTED]> > escribió: > > > I suppose that you wont get class name into its code (or before > > definition end) but not into a method definition. > > > import sys > > > def ge

Re: Game Programming Clinic and Online Gaming at PyCon

2007-02-18 Thread Anna Ravenscroft
On 2/17/07, Jeff Rush <[EMAIL PROTECTED]> wrote: At PyCon this year we're going to have a multi-day game programming clinic and challenge. This is a first-time event and an experiment to find those in the Python community who enjoy playing and creating games. Python has several powerful module

Re: Dlls

2007-02-18 Thread Mike C. Fletcher
Jason Ward wrote: > Hi. I am interested to know why python can't access DLL files directly. > It seems to me that because python can't access DLL's directly we have to > waste our time and write wrappers around libraries that have already > been written. > > So if the python developers were to i

Re: function & class

2007-02-18 Thread Bruno Desthuilliers
jupiter a écrit : > hi friends, > > I have a program like > > some variable definations > > a function ( arg1, agr2): > do something with arg1 & arg2 > return a list > > if condition >do this function(arg1,arg2) > else > if condition > do this function >else >

Re: threading and multicores, pros and cons

2007-02-18 Thread Aahz
In article <[EMAIL PROTECTED]>, Maric Michaud <[EMAIL PROTECTED]> wrote: > >This is a recurrent problem I encounter when I try to sell python >solutions to my customers. I'm aware that this problem is sometimes >overlooked, but here is the market's law. Could you expand more on what exactly the p

Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?

2007-02-18 Thread openopt
Thank you in advance for your response. Dmitrey -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?

2007-02-18 Thread Jorge Godoy
[EMAIL PROTECTED] writes: > Thank you in advance for your response. And those do ... ? -- Jorge Godoy <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: 'import dl' on AMD64 platform

2007-02-18 Thread Nick Craig-Wood
John Pye <[EMAIL PROTECTED]> wrote: > I have a tricky situation that's preventing my Python/SWIG/C > application from running on the Debian Etch AMD64 platform. > > It seems that the 'dl' module is not available on that platform. The > only reason I need the 'dl' module, however, is for the va

Re: Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?

2007-02-18 Thread Andrew McLean
Where you would use varargin and nargin in Matlab, you would use the *args mechanism in Python. Try calling def t1(*args): print args print len(args) with different argument lists Where you would use varargout and nargout in Matlab you would use tuple unpacking in Python. Pla

Re: function & class

2007-02-18 Thread [EMAIL PROTECTED]
Bruno Desthuilliers wrote: > Classes are used to define and create ('instanciate' in OO jargon) Good info from Bruno, just a quick note that it's spelled "instantiate" (I'm not usually big on spelling corrections but since you were teaching a new word I thought it might be worthwile). -- http://

Re: Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?

2007-02-18 Thread Dan Bishop
On Feb 18, 12:58 pm, [EMAIL PROTECTED] wrote: > Thank you in advance for your response. > Dmitrey The Python equivalent to "varargin" is "*args". def printf(format, *args): sys.stdout.write(format % args) There's no direct equivalent to "varargout". In Python, functions only have one return

Re: c++ for python programmers

2007-02-18 Thread Michael
Thomas Nelson wrote: > I realize I'm approaching this backwards from the direction most > people go, but does anyone know of a good c/c++ introduction for > python programmers? There's been lots of answers, but no-one's mentioned the book I like: * Accelerated C++ by Koenig & Moo It dives str

window opens with os.system()

2007-02-18 Thread jim-on-linux
python help, I'm testing on xpPro I have a simple module that sends text files to a printer. Then, it moves the file to the 'Fprtd' directory. The module contains the following code; # for n in PrtList: os.system('type '+n+ ' > prn' os.system('move '+n+ ' Fprtd') # os.system

Re: string.find returns -1 when string evidently in source file

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 07:04:27 -0300, bryan rasmussen <[EMAIL PROTECTED]> escribió: > the following is returning -1: > > x = open("latvian.txt",'r') > x1 = x.read() > print x1.find("LAYOUT") > the encoding of the file is Unicode, I am able to return instances of > individual characters but not wh

Re: Getting a class name

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 14:14:41 -0300, goodwolf <[EMAIL PROTECTED]> escribió: > On Feb 18, 9:17 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >> En Sun, 18 Feb 2007 04:20:33 -0300, goodwolf <[EMAIL PROTECTED]> >> escribió: >> >> > I suppose that you wont get class name into its code (or before

Re: search cursor in pythonwin 2.1

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 13:12:20 -0300, GISDude <[EMAIL PROTECTED]> escribió: > I am a GIS(geographic information systems) Analyst and in our > software(ESRI ARCGIS 9.1) ESRI has implemented Python 2.1 as the > scripting language of choice. > > In my script I'm going thru a dbf file and extracting N

Re: window opens with os.system()

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 18:09:23 -0300, jim-on-linux <[EMAIL PROTECTED]> escribió: > I have a simple module that sends text files to a > printer. Then, it moves the file to the 'Fprtd' > directory. The module contains the following > code; > > > # > > for n in PrtList: > os.system('type '+n+ '

Re: function & class

2007-02-18 Thread Bjoern Schliessmann
jupiter wrote: > My problem is I want to use threading You're right. Why do you think you want to use (multi-)threading? > and I might need to pass values between function and classes. I am > not sure how this can be done. I have read about classes and I > know they are like function however do

Re: numpy, numarray, or numeric?

2007-02-18 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, "RickMuller" <[EMAIL PROTECTED]> wrote: > Use numpy; it is the "officially blessed one" that you refer to. It > has all of the advantages of the other two. > > Numeric was the first library, but it had some drawbacks that led some > people to develop Numarray, whi

Toliet Seat Secrets

2007-02-18 Thread Agent Orange
Toliet Seat - http://projectwiretap.blogspot.com/2007/02/toliet-seat-theater-presents.html Was Down apparently after Operations Hanger 36 unveiled its secret harrier stealth technology Feb, 18. approx 12:00 Thank you for another succesfull airshow says Kernel Clink. A 6 million dollar project

Python Threads

2007-02-18 Thread Sick Monkey
Is there anyway to get 2 python threads to talk to one another? I have a GUI which is spawning a thread to make a large calculation (that way the GUI does not appear to be non responsive). I am trying to attach a progress bar to the threaded action. As the thread is calculating data, I would li

unicodedata implementation

2007-02-18 Thread James Abley
Hi, [Originally posted this to the dev list, but the moderator advised posting here first] I'm looking into implementing this module for Jython, and I'm trying to understand the contracts promised by the various methods. Please bear in mind that means I'm probably targeting the CPython implementa

Re: Dlls

2007-02-18 Thread Steve Holden
Jason Ward wrote: > But in Assembler I can access any dll. Doesn't matter what language it > was written in. So this teaches us that Python isn't assembler language. > A dll contains machine code, so shouldn't any language be able to read > the functions. > Machine is the native language of a p

Re: Getting a class name

2007-02-18 Thread Bruno Desthuilliers
Gabriel Genellina a écrit : > En Sun, 18 Feb 2007 14:14:41 -0300, goodwolf <[EMAIL PROTECTED]> > escribió: > >> On Feb 18, 9:17 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >> >>> En Sun, 18 Feb 2007 04:20:33 -0300, goodwolf <[EMAIL PROTECTED]> >>> escribió: >>> >>> > I suppose that you wo

Re: window opens with os.system()

2007-02-18 Thread jim-on-linux
On Sunday 18 February 2007 17:27, Gabriel Genellina wrote: > En Sun, 18 Feb 2007 18:09:23 -0300, > jim-on-linux <[EMAIL PROTECTED]> > > escribió: > > I have a simple module that sends text files > > to a printer. Then, it moves the file to the > > 'Fprtd' directory. The module contains the > > fol

Re: PyDev on Mac

2007-02-18 Thread hg
Ahmer wrote: > On Feb 18, 4:50 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> Ahmer schrieb: >> >> > I've been trying to set up PyDev on my new MacBook Pro, but i have not >> > had an success. >> >> > Could you please help! >> >> Just wait until my crystal ball comes back from the cleaners,

Is there any way to automatically create a transcript of an interactive Python session?

2007-02-18 Thread Jonathan Mark
Some languages, such as Scheme, permit you to make a transcript of an interactive console session. Is there a way to do that in Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any way to automatically create a transcript of an interactive Python session?

2007-02-18 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Jonathan Mark" <[EMAIL PROTECTED]> wrote: > Some languages, such as Scheme, permit you to make a transcript of an > interactive console session. Is there a way to do that in Python? I don't know of any way *inside* of python, but it's easy enough to run your int

Re: Getting a class name

2007-02-18 Thread Fuzzyman
On Feb 18, 11:54 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Gabriel Genellina a écrit : > > > En Sun, 18 Feb 2007 14:14:41 -0300, goodwolf <[EMAIL PROTECTED]> > > escribió: > > >> On Feb 18, 9:17 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > >>> En Sun, 18 Feb 2007 04:20:33 -0300

Re: Help Required for Choosing Programming Language

2007-02-18 Thread Dave Cook
On 2007-02-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > i have read about Python, Ruby and Visual C++. but i want to go > through with GUI based programming language like VB.net You might take a look at http://dabodev.com Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

How to detect closing of wx.Panel?

2007-02-18 Thread Jacol
Hi everybody, I have poblem with detecting closing of wx.Panel by user. How to detect that event? The wx.EVT_CLOSE event concerns wx.Frame class only. Neither Close() nor Destroy() aren't executed if the event occurs (if user close a panel). Thus extanding these both methods doesn't make sens (I'

Re: Help Required for Choosing Programming Language

2007-02-18 Thread olsongt
On Feb 16, 4:22 pm, [EMAIL PROTECTED] wrote: > I am VB6 programmer and wants to start new programming language but i > am unable to deciced. > > i have read about Python, Ruby and Visual C++. but i want to go > through with GUI based programming language like VB.net > > so will you please guide me

I need a crack for pyext1.2.5 plugin

2007-02-18 Thread Oliver Sosa Cano
Hi pythoneros. I'm a cuban guy interested in python and I need the crack of an Eclipse plugin: pyext 1.2.5 Thanks very much cheers Oliver Sosa -- http://mail.python.org/mailman/listinfo/python-list

Re: Need an identity operator because lambda is too slow

2007-02-18 Thread Sean McIlroy
On Feb 17, 9:59 pm, "Deron Meranda" <[EMAIL PROTECTED]> wrote: [snip] this may be really dense, but i'm curious what's wrong with the "multiplexer" idiom: for item in some_sequence: item2 = (not some_rare_condition and item) or \ (some_rare_condition and some_transform_fun

Re: Python Threads

2007-02-18 Thread Sick Monkey
Well if this cannot be done, can a thread call a function in the main method? I have been trying and have not been successive. Perhaps I am using thread incorrectly. On 2/18/07, Sick Monkey <[EMAIL PROTECTED]> wrote: Is there anyway to get 2 python threads to talk to one another? I have a GUI

Re: I need a crack for pyext1.2.5 plugin

2007-02-18 Thread Paul McGuire
On Feb 18, 8:07 pm, "Oliver Sosa Cano" <[EMAIL PROTECTED]> wrote: > Hi pythoneros. I'm a cuban guy interested in python and I need the crack of > an Eclipse plugin: pyext 1.2.5 > > Thanks very much > > cheers > > Oliver Sosa Never heard of pyext - Google turns up this link http://g.org/ext/py

Logging errors to a file

2007-02-18 Thread Harlin Seritt
Is there any way to automatically log errors that occur within an executed script to a file? Thanks, Harlin -- http://mail.python.org/mailman/listinfo/python-list

Re: cmd all commands method?

2007-02-18 Thread placid
On Feb 18, 8:59 pm, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > On Feb 18, 10:49 am, "placid" <[EMAIL PROTECTED]> wrote: > > > On Feb 18, 7:17 pm, "Michele Simionato" <[EMAIL PROTECTED]> > > > > Yes, he is talking about the cmd > > > module:http://docs.python.org/dev/lib/Cmd-objects.html. > >

What is more efficient?

2007-02-18 Thread Karlo Lozovina
Let's say I have a class with few string properties and few integers, and a lot of methods defined for that class. Now if I have hundreds of thousands (or even more) of instances of that class - is it more efficient to remove those methods and make them separate functions, or it doesn't matter

Re: What is more efficient?

2007-02-18 Thread placid
On Feb 19, 2:17 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote: > Let's say I have a class with few string properties and few integers, and > a lot of methods defined for that class. > > Now if I have hundreds of thousands (or even more) of instances of that > class - is it more efficient to remove t

Re: What is more efficient?

2007-02-18 Thread Rintaro Masuda
Hi Karlo, Now if I have hundreds of thousands (or even more) of instances of that class - is it more efficient to remove those methods and make them separate functions, or it doesn't matter? I can't get your idea from your text. Could you give us an example? Thanks... -- ___

RE: I need a crack for pyext1.2.5 plugin

2007-02-18 Thread Oliver Sosa Cano
Sorry if this is the wrong place to make that question. Pyext is a plugin that acoplate with pydev, it's 'software privativo' like said Stallman, but it's very interesting. I have version 1.2.5. I use Eclipse 'cos it's simply great!! If somebody could tell me some alternative... Thanks (sorry my

Re: numpy, numarray, or numeric?

2007-02-18 Thread Wensui Liu
I have the same doubt when I started using DataFrame class by Andrew Straw. When I used his code as it is, it didn't work because python can't find numeric module. But after I made a small change by 'import numpy' to his code, everything seems to work now. To me, it seems numpy works as same as nu

Re: Python Threads

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 23:37:02 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > Well if this cannot be done, can a thread call a function in the main > method? > I have been trying and have not been successive. Perhaps I am using > thread > incorrectly. The safe way to pass information betwe

ANN: java2python 0.2

2007-02-18 Thread Troy Melhase
java2python - Java to Python Source Code Translator --- java2python 0.2 Released 18 February 2007 What is java2python? -- java2python is a simple but effective tool to trans

Re: I need a crack for pyext1.2.5 plugin

2007-02-18 Thread paul
Oliver Sosa Cano schrieb: > Sorry if this is the wrong place to make that question. It is the wrong place. > > Pyext is a plugin that acoplate with pydev, it's 'software privativo' > like said Stallman, but it's very interesting. You should ask Stallman how software developers should pay their bil

Re: Is there any way to automatically create a transcript of an interactive Python session?

2007-02-18 Thread Kent Johnson
Jonathan Mark wrote: > Some languages, such as Scheme, permit you to make a transcript of an > interactive console session. Is there a way to do that in Python? > Maybe IPython's logging feature is what you want? http://ipython.scipy.org/doc/manual/node6.html#SECTION00066000 Kent --

Re: Logging errors to a file

2007-02-18 Thread Gabriel Genellina
En Mon, 19 Feb 2007 00:00:35 -0300, Harlin Seritt <[EMAIL PROTECTED]> escribió: > Is there any way to automatically log errors that occur within an > executed script to a file? The logging module. You may want to enclose your main entry point in a try/except block, just to be sure you catch e

Re: Need an identity operator because lambda is too slow

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 23:31:53 -0300, Sean McIlroy <[EMAIL PROTECTED]> escribió: > On Feb 17, 9:59 pm, "Deron Meranda" <[EMAIL PROTECTED]> wrote: > [snip] > > this may be really dense, but i'm curious what's wrong with the > "multiplexer" idiom: > > for item in some_sequence: > item2 = (no

Re: Getting a class name

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 20:56:48 -0300, Fuzzyman <[EMAIL PROTECTED]> escribió: > [somebody] wrote: >> >>> > def getCodeName(deap=0): >> >>> > return sys._getframe(deap+1).f_code.co_name >> >> >>> > class MyClass (object): >> >>> > name = getCodeName() + '!' >> >> >>> What's the advantage over

Re: What is more efficient?

2007-02-18 Thread Gabriel Genellina
En Mon, 19 Feb 2007 00:17:54 -0300, Karlo Lozovina <[EMAIL PROTECTED]> escribió: > Let's say I have a class with few string properties and few integers, and > a lot of methods defined for that class. > > Now if I have hundreds of thousands (or even more) of instances of that > class - is it more

Re: What is more efficient?

2007-02-18 Thread Gary Herron
Karlo Lozovina wrote: > Let's say I have a class with few string properties and few integers, and > a lot of methods defined for that class. > > Now if I have hundreds of thousands (or even more) of instances of that > class - is it more efficient to remove those methods and make them > separat

Re: function & class

2007-02-18 Thread jupiter
c.execute("select symbol,tvolume,date,time from "+self.dbase+" where symbol= ?",t) ProgrammingError: SQLite objects created in a thread can only be used in that sa me thread.The object was created in thread id 976 and this is thread id 944 I am getting this error when I am using sql command wi

Re: What is more efficient?

2007-02-18 Thread placid
On Feb 19, 4:38 pm, Gary Herron <[EMAIL PROTECTED]> wrote: > Karlo Lozovina wrote: > > Let's say I have a class with few string properties and few integers, and > > a lot of methods defined for that class. > > > Now if I have hundreds of thousands (or even more) of instances of that > > class - is

bluetooth on windows.......

2007-02-18 Thread srj
hi. i've been trying to access Bluetooth via python in windows Xp. py bluez for windows required something called _msbt. i'm running python 2.5. some problem with vb 7.1 compatibility. what do i do to get bluetooth up and running on Xp? -- http://mail.python.org/mailman/listinfo/python-list

Re: What is more efficient?

2007-02-18 Thread Scott David Daniels
Karlo Lozovina wrote: > Let's say I have a class with few string properties and few integers, and > a lot of methods defined for that class. > > Now if I have hundreds of thousands (or even more) of instances of that > class - is it more efficient to remove those methods and make them > separa

Re: Help Required for Choosing Programming Language

2007-02-18 Thread Hendrik van Rooyen
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote: >Stef Mientki a écrit : >(snip) >> I've been using Python for just 2 months, and didn't try any graphical >> design, > >So how can you comment on GUI programming with Python ? I think we have a language problem here (no pun intended) When Stef s

Re: bluetooth on windows.......

2007-02-18 Thread Gabriel Genellina
En Mon, 19 Feb 2007 03:04:33 -0300, srj <[EMAIL PROTECTED]> escribió: > i've been trying to access Bluetooth via python in windows Xp. > py bluez for windows required something called _msbt. > i'm running python 2.5. some problem with vb 7.1 compatibility. > > what do i do to get bluetooth up and

generating Java bytecode

2007-02-18 Thread Russ
I would like to generate Java bytecode from Python source. I know this is possible using Jython, but I am having problems getting my code to run on Jython. Is there another way to get Java bytecode? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to detect closing of wx.Panel?

2007-02-18 Thread Morpheus
On Mon, 19 Feb 2007 01:18:11 +, Jacol wrote: > Hi everybody, > > I have poblem with detecting closing of wx.Panel by user. How to detect that > event? > Don't know why you want to do that, but you could register with the enclosing (hosting) widget. > The wx.EVT_CLOSE event concerns wx.Fram

How do I create an array of functions?

2007-02-18 Thread Steven W. Orr
I have a table of integers and each time I look up a value from the table I want to call a function using the table entry as an index into an array whose values are the different functions. I haven't seen anything on how to do this in python. TIA -- Time flies like the wind. Fruit flies like

FAQ maintenance with Python ...

2007-02-18 Thread Michele Smith
Hello. I am trying to find Scott Witherell who graduated from WSHS and UVA. Do you know how I can get in touch with him? Michele Smith - Everyone is raving about the all-new Yahoo! Mail beta.-- http://mail.python.org/mailman/listinfo/python-list