how to get function signature

2005-07-28 Thread [EMAIL PROTECTED]
Hi, I was working on a dir like function that gives more information than the usual dir, but I am not satisfied with the way I get function arguments for callable members of an object. Take a look at it here: http://nerdierthanthou.nfshost.com/2005/07/mdir-for-python.html. I have seen PythonWin

Re: how to get function signature

2005-07-28 Thread Robert Kern
[EMAIL PROTECTED] wrote: Hi, I was working on a dir like function that gives more information than the usual dir, but I am not satisfied with the way I get function arguments for callable members of an object. Take a look at it here:

RE: trying to access Oracle

2005-07-28 Thread Albert Leibbrandt
I am trying to access Oracle using the cx_Oracle module. I can login to Oracle OK, but I am at a loss as to how I should then access the specific table I need so that I can join it to our county parcel layer using the make table view tool. I have scoured the internet looking for any

Re: can list comprehensions replace map?

2005-07-28 Thread Andrew Dalke
Steven Bethard wrote: Here's one possible solution: py import itertools as it py def zipfill(*lists): ... max_len = max(len(lst) for lst in lists) A limitation to this is the need to iterate over the lists twice, which might not be possible if one of them is a file iterator. Here's a

Sr. Compiler Engineering Opportunity

2005-07-28 Thread Nathan Sanders
Hello- I'm hoping to network with you and find out if you know anyone who you think could be interested in the following opportunity? Sr. Compiler Engineer Position Type: Full-Time Employee Location: San Jose, California (Silicon Valley, USA) Generous Compensation and Stock package

functions without parentheses

2005-07-28 Thread Jerry He
Hi, Is it possible to create a function that you can use without parenthesizing the arguments? for example, for def examine(str): . . Is there some way to define it so that I can call it like examine string instead of examine(string)? thanks in advance -Jerry

Re: functions without parentheses

2005-07-28 Thread Robert Kern
Jerry He wrote: Hi, Is it possible to create a function that you can use without parenthesizing the arguments? for example, for def examine(str): . . Is there some way to define it so that I can call it like examine string instead of examine(string)? No. --

Re: Problems with permissions etc

2005-07-28 Thread Frank Millman
Thanks for all the replies. They were useful. I think that my situation was best summed up by Mike - I need to figure out which things I have to do as root and which I have to do as me. I guess this only comes from experience, but it seems a good rule to follow. My reasons for wanting the mac

Re: Create a variable on the fly

2005-07-28 Thread Paul D.Smith
Bruno, FYI, notes in-line... Cheers, Paul DS a look instantiate Python variables of the appropriate type. What do you mean of the appropriate type ? You want to typecast (eg. from string to numeric) ? Then you need to know what env var must be casted to what type ? Then you don't need to

RE: functions without parentheses

2005-07-28 Thread Delaney, Timothy (Tim)
Jerry He wrote: def examine(str): . . Is there some way to define it so that I can call it like examine string instead of examine(string)? No. Python's syntax does not work that way. Why would you want to? For more information about this, read:

Re: Problems with permissions etc

2005-07-28 Thread Paul Rubin
Frank Millman [EMAIL PROTECTED] writes: My reasons for wanting the mac address are nothing to do with security. I have in mind a retail point-of-sale situation, where I want to record which transactions took place at which point-of-sale. I hope that, in this context, my use of the mac address

Re: searching string url

2005-07-28 Thread googlinggoogler
Cheers for all your replies, Peter Hansen: Couldnt agree more with you about not effectivly spamming companies with my resume, thats why im crawling the local newspapers website to - to find scrapes of information about companies :-) I Wasnt planning to automate everything, more the boring

Re: Create a variable on the fly

2005-07-28 Thread Sybren Stuvel
Paul D.Smith enlightened us with: The background is that I've inherited some historical Python scripts that need to be configured from a bash shell script [...] instead of the existing Pything config script. [...] The problem is that this config file is almost certainly not complete [...] and

Trigger pygtk drawingarea redraw

2005-07-28 Thread ch424
Hi, Does anybody know the fastest way to trigger a DrawingArea redaw in pygtk? At the moment, I'm using a bit of a hack: def redraw(self): self.area.hide() self.area.show() Is there a better way to trigger a redraw? This causes flickering when the window gets bigger than 400x400 pixels,

Re: Trimming X/HTML files

2005-07-28 Thread Walter Dörwald
Thomas SMETS wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear, I need to parse XHTML/HTML files in all ways : ~ _ Removing comments and javascripts is a first issue ~ _ Retrieving the list of fields to submit is my following item (todo) Any idea where I could find this

Re: all possible combinations

2005-07-28 Thread Anton Vredegoor
John Machin wrote: You don't need to use random sampling. Paul Rubin has shown how it can be done deterministically. The following is a generalisation of his code; it generates all possible assemblies of size n from a list of parts. Is this helpful? def all_size_n_knickers(rqd_size,

Graphics files Python

2005-07-28 Thread Pekka Karjalainen
How can I create image files and animations with Python? I will clarify a bit. This is a question of recreational programming. I have already made some animated gifs from Julia sets using Python and some external programs. I hit upon a quick solution of writing ppm image files (it's a

Re: all possible combinations

2005-07-28 Thread Steve Holden
Anton Vredegoor wrote: John Machin wrote: You don't need to use random sampling. Paul Rubin has shown how it can be done deterministically. The following is a generalisation of his code; it generates all possible assemblies of size n from a list of parts. Is this helpful? def

Re: all possible combinations

2005-07-28 Thread Anton Vredegoor
Steve Holden wrote: This makes me wonder why we still don't have something like the unint function above in the standard distribution. Because it's not what you'd call (or, at least, it's not what I'd call) universally required. As you have shown it is relatively easy to hack something

Re: multiple inheritance super()

2005-07-28 Thread Michele Simionato
http://fuhm.org/super-harmful/ That is a pretty good page; I must say that my position is more radical (i.e. it is not super which is harmful, it is multiple inheritance itself that it is harmful: was I going to design a new language I would implement it *without* multiple inheritance).

Re: Graphics files Python

2005-07-28 Thread Thomas Guettler
Am Thu, 28 Jul 2005 10:40:05 + schrieb Pekka Karjalainen: How can I create image files and animations with Python? You can create image files with PIL: http://www.pythonware.com/products/pil/ I don't know if you can make animated gifs. You can use ImageMagick, too:

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-28 Thread Jason Tishler
Dean, On Wed, Jul 27, 2005 at 02:56:16PM -0700, Dean N. Williams wrote: I didn't get this error. Did you forgot to install one of the libdb${version}-devel packages: $ cygcheck -cd | grep 'libdb.*-devel' libdb2-devel2.7.7-4 libdb3.1-devel 3.1.17-2

Re: Why Tcl/Tk?

2005-07-28 Thread mustafa
William Park wrote: Jerry He [EMAIL PROTECTED] wrote: I'm a little curious, why does most scripting languges(i.e. python and ruby) use Tcl/Tk rather than wx or Fox as its standard GUI? Although I did notice that the Vpython IDE that uses Tkinker starts up a lot faster than the DrPython IDE that

Re: all possible combinations

2005-07-28 Thread Steven D'Aprano
On Thu, 28 Jul 2005 12:30:23 +0100, Steve Holden wrote: This makes me wonder why we still don't have something like the unint function above in the standard distribution. Because it's not what you'd call (or, at least, it's not what I'd call) universally required. As you have shown it is

Re: functions without parentheses

2005-07-28 Thread Steven D'Aprano
On Thu, 28 Jul 2005 00:59:51 -0700, Jerry He wrote: Hi, Is it possible to create a function that you can use without parenthesizing the arguments? What problem are you trying to solve that requires this sort of syntax, and why can't it be solved with parentheses? -- Steven. --

Re: On fighting fire with fire...

2005-07-28 Thread projecktzero
but..but...It's so much more fun to unleash your anger and fire back with all guns blazing fanning the flame war that most discussion groups degenerate into after a couple of responses. =) Actually, I had some self restraint yesterday. I wanted to write a ripping response to an antagonistic flame

Re: multiple inheritance super()

2005-07-28 Thread Reinhold Birkenfeld
Michele Simionato wrote: http://fuhm.org/super-harmful/ That is a pretty good page; I must say that my position is more radical (i.e. it is not super which is harmful, it is multiple inheritance itself that it is harmful: was I going to design a new language I would implement it *without*

Re: Trigger pygtk drawingarea redraw

2005-07-28 Thread Jeremy Moles
Call the gtk.Widget method queue_draw(); if you derive from DrawingArea then simply: self.queue_draw() Of if the DrawingArea is some kind of has-a member: self.DrawableThing.queue_draw() On Thu, 2005-07-28 at 02:52 -0700, ch424 wrote: Hi, Does anybody know the fastest way to trigger a

Re: searching string url

2005-07-28 Thread Paul McGuire
Dave - Check out the URL extractor example that ships with pyparsing. It handles many kinds of URL formats. Download pyparsing at pyparsing.sourceforge.net. -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: On fighting fire with fire...

2005-07-28 Thread Paul McGuire
Sounds more like fighting fire with... water? Sounds good to me. -- Paul -- http://mail.python.org/mailman/listinfo/python-list

easy float question just eludes me

2005-07-28 Thread nephish
Hullo all ! i have a real easy one here that isn't in my book. i have a int number that i want to divide by 100 and display to two decimal places. like this float(int(Var)/100) but i need it to display the .00 even if it does not have a .00 value like this if Var is 50, i need to display .50

Re: all possible combinations

2005-07-28 Thread Robert Kern
Steven D'Aprano wrote: Have you looked at what's in the standard Python library? aifc.py = Stuff to parse AIFF-C and AIFF files. imghdr.py = Recognize image file formats based on their first few bytes. gopher.py = Gopher protocol client interface. token.py = Token constants (from token.h).

Re: easy float question just eludes me

2005-07-28 Thread Simon Brunning
On 28 Jul 2005 06:39:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have a real easy one here that isn't in my book. i have a int number that i want to divide by 100 and display to two decimal places. like this float(int(Var)/100) but i need it to display the .00 even if it does not

Re: easy float question just eludes me

2005-07-28 Thread nephish
way cool, outta work out just fine On 07/28/2005 08:48:27 AM, Simon Brunning wrote: On 28 Jul 2005 06:39:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have a real easy one here that isn't in my book. i have a int number that i want to divide by 100 and display to two decimal

Re: all possible combinations

2005-07-28 Thread Steve Holden
Steven D'Aprano wrote: On Thu, 28 Jul 2005 12:30:23 +0100, Steve Holden wrote: This makes me wonder why we still don't have something like the unint function above in the standard distribution. Because it's not what you'd call (or, at least, it's not what I'd call) universally required. As

Re: easy float question just eludes me

2005-07-28 Thread Sergei Organov
[EMAIL PROTECTED] writes: Hullo all ! i have a real easy one here that isn't in my book. i have a int number that i want to divide by 100 and display to two decimal places. like this float(int(Var)/100) but i need it to display the .00 even if it does not have a .00 value like this if

Re: functions without parentheses

2005-07-28 Thread Simon Dahlbacka
If you actually want that kind of syntax, then why don't you use Visual Basic? ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: easy float question just eludes me

2005-07-28 Thread nephish
oops, i dont seem to have a module decimal -shawn On 07/28/2005 08:48:27 AM, Simon Brunning wrote: On 28 Jul 2005 06:39:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have a real easy one here that isn't in my book. i have a int number that i want to divide by 100 and display to two

Re: easy float question just eludes me

2005-07-28 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hullo all ! i have a real easy one here that isn't in my book. i have a int number that i want to divide by 100 and display to two decimal places. like this float(int(Var)/100) but i need it to display the .00 even if it does not have a .00 value like this if

Re: Sr. Compiler Engineering Opportunity

2005-07-28 Thread Terry Reedy
Nathan Sanders [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm hoping to network with you and find out if you know anyone who you think could be interested in the following opportunity? Since this does not appear to have anything to do with Python, it appears to be off-topic

baffling error-handling problem

2005-07-28 Thread Chris Fonnesbeck
I thought I knew how to do error handling in python, but apparently I dont. I have a bunch of code to calculate statistical likelihoods, and use error handling to catch invalid parameters. For example, for the bernoulli distribution, I have: def bernoulli_like(self, x, p, name='bernoulli'):

Re: functions without parentheses

2005-07-28 Thread Steve Holden
Simon Dahlbacka wrote [about function calls without parenthesis]: If you actually want that kind of syntax, then why don't you use Visual Basic? ;) Because Perl is far too tempting to ignore. The serious answer to the OP's question, however, is that Python refuses to guess whether a function

Re: multiple inheritance super()

2005-07-28 Thread Sion Arrowsmith
Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Michele Simionato wrote: was I going to design a new language I would implement it *without* multiple inheritance). That way lies Java. The number of times I've wished an interface were actually a mixin *shudder* Multiple inheritance can be

Re: On fighting fire with fire...

2005-07-28 Thread Rocco Moretti
projecktzero wrote: but..but...It's so much more fun to unleash your anger and fire back with all guns blazing fanning the flame war that most discussion groups degenerate into after a couple of responses. =) Actually, I had some self restraint yesterday. I wanted to write a ripping

Re: easy float question just eludes me

2005-07-28 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hullo all ! i have a real easy one here that isn't in my book. i have a int number that i want to divide by 100 and display to two decimal places. like this float(int(Var)/100) At present, int/int truncates, so this won't do what

Re: retrieve data from 2 database

2005-07-28 Thread Jason Drew
For a start, asking a better question will get better answers: http://www.catb.org/~esr/faqs/smart-questions.html Googling for python odbc gives this as the first result: http://www.python.org/windows/win32/odbc.html In general, how you compare database tables will depend a lot on the nature of

Re: Sr. Compiler Engineering Opportunity

2005-07-28 Thread Jack Diederich
Great, Transmeta is hiring. What does this have to do with python? Hmm, Mutliprocessor or Multicore Transmeta chips? Let the rumor mongering begin. On Thu, Jul 28, 2005 at 12:40:13AM -0700, Nathan Sanders wrote: Hello- I'm hoping to network with you and find out if you know anyone who you

Re: Trigger pygtk drawingarea redraw

2005-07-28 Thread ch424
Ahh.. fantastic! Flickers be gone! Yaarrrg! It was self.area.queue_draw() in case anyone wants to know. :) Thanks so much! Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Create a variable on the fly

2005-07-28 Thread Steven Bethard
Paul D.Smith wrote: 2. A simple Python config which searches for all shell environment variables named MY_... and instantiates then as Python variables. my_vars = dict((k, v) for k, v in os.environ.iteritems() if k.startswith('MY_')) globals().update(my_vars) If

Re: functions without parentheses

2005-07-28 Thread bruno modulix
Simon Dahlbacka wrote: If you actually want that kind of syntax, then why don't you use Visual Basic? ;) s/VisualBasic/Ruby/ -- bruno desthuilliers ruby -e print '[EMAIL PROTECTED]'.split('@').collect{|p| p.split('.').collect{|w| w.reverse}.join('.')}.join('@') --

Re: Freeze

2005-07-28 Thread pythonUser_07
What happens when you take a copy of python23.dll and put it in the path on that machine? Does the program run? If so, (and I am not familiar with freeze) it seems freeze did not put the dll into the .exe file. -- http://mail.python.org/mailman/listinfo/python-list

Re: functions without parentheses

2005-07-28 Thread Steven Bethard
Jerry He wrote: def examine(str): . . Is there some way to define it so that I can call it like examine string instead of examine(string)? What do you want to happen when someone types: examine ??? Or better yet, what if you do something like:

Advanced concurrancy

2005-07-28 Thread Peter Tillotson
Hi, I'm looking for an advanced concurrency module for python and don't seem to be able to find anything suitable. Does anyone know where I might find one? I know that there is CSP like functionality built into Stackless but i'd like students to be able to use a standard python build. I'm

Re: functions without parentheses

2005-07-28 Thread gene tani
http://onestepback.org/index.cgi/Tech/Ruby/PythonAndRuby.rdoc this blog talks about design differences, e.g. what . means, whether functions and methods are 1st-class objects. St -- http://mail.python.org/mailman/listinfo/python-list

Re: Rich Graphics?

2005-07-28 Thread Adriaan Renting
I realy like Qt through PyQt. The combination Eric3+Qtdesigner is quite useful. Maybe PyQt is not yet ready for the new Qt4 I think, but it does lot's of the graphical stuff you seem to require. Adriaan Renting| Email: [EMAIL PROTECTED] ASTRON | Phone: +31 521 595 217 P.O.

codecs.getencoder encodes entire string ?

2005-07-28 Thread nicolas_riesch
When I use an encoder function from codecs module, documentation says that it encodes the object input and returns a tuple (output object, length consumed). import codecs enc=codecs.getencoder('iso-8859-1') enc(u'asdf') ('asdf', 4) I just don't understand why it returns the length consumed.

Re: Why Tcl/Tk?

2005-07-28 Thread Thomas Bartkus
William Park [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jerry He [EMAIL PROTECTED] wrote: I'm a little curious, why does most scripting languges(i.e. python and ruby) use Tcl/Tk rather than wx or Fox as its standard GUI? Although I did notice that the Vpython IDE that uses

Re: Create a variable on the fly

2005-07-28 Thread Scott David Daniels
Paul D.Smith wrote: ... What I'm left with is the following... 1. A shell script which I maintain. 2. A simple Python config which searches for all shell environment variables named MY_... and instantiates then as Python variables. 3. Historical scripts that run without me needing to spend

Re: baffling error-handling problem

2005-07-28 Thread Michael Hudson
Chris Fonnesbeck [EMAIL PROTECTED] writes: I thought I knew how to do error handling in python, but apparently I dont. I have a bunch of code to calculate statistical likelihoods, and use error handling to catch invalid parameters. For example, for the [...] bernoulli distribution, I have:

Re: functions without parentheses

2005-07-28 Thread Scott David Daniels
Jerry He wrote: ... Is there some way to define [examine] so I can call it like examine string instead of examine(string)? Perhaps you are looking for ipython (google for it) if all you are looking for is ease of interactive entry. --Scott David Daniels [EMAIL

Re: codecs.getencoder encodes entire string ?

2005-07-28 Thread Jeff Epler
On Thu, Jul 28, 2005 at 08:42:57AM -0700, nicolas_riesch wrote: And a last question: can I call this enc function from multiple threads ? Yes. Jeff pgphSka1eU9PQ.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: baffling error-handling problem

2005-07-28 Thread Scott David Daniels
Chris Fonnesbeck wrote: I thought I knew how to do error handling in python, but apparently I dont. I have a bunch of code to calculate statistical likelihoods, and use error handling to catch invalid parameters. For example, for the bernoulli distribution, I have: def

Regex for nested {}

2005-07-28 Thread Chris
hello, I have a problem matching nested levels of {}, example: import re text = outer { inner1 { ... } inner2 { ... } } simple { ... } r = re.compile(r ( # OPTION1 .*? # begin \{

xml-object mapping

2005-07-28 Thread Tamas Hegedus
Hi! I am looking for an xml-object mapping tool ('XML Data Binding-design time product') where I can define the mapping rules in 'binding files' and the parser is generated automatically. Similar to the solution of Dave Kuhlman (http://www.rexx.com/~dkuhlman/generateDS.html) where the mapping

Re: Rich Graphics?

2005-07-28 Thread Daniel Dittmar
Chris Spencer wrote: I'm trying to write a Gui in Python for manipulating rich graphical representations, similar to something like Inkscape. I've tried tkinter, wxPython, pyGtk, and while they all do traditional widgets well enough, none of them really handle anti-aliased, transparent,

Re: functions without parentheses

2005-07-28 Thread bruno modulix
Jerry He wrote: Hi, Is it possible to create a function that you can use without parenthesizing the arguments? for example, for def examine(str): . . Is there some way to define it so that I can call it like examine string instead of examine(string)? No.

Re: Regex for nested {}

2005-07-28 Thread Diez B.Roggisch
Chris c at cdot.de writes: is something like that possible? No. Not with pure regexes. The reason is that the theory behind them doesn't allow to detect syntactic constructs like a**nn**n, with a={ and b=} in your case. What you need is a real parser - usually one uses regexes to split the

ANN: Python training, 2005 Aug 29-31, San Francisco

2005-07-28 Thread wesc
What: Python Programming I: Introduction to Python When: August 29-31, 2005 Where: San Francisco, CA, USA Need to get up-to-speed with Python as quickly as possible? Come join us in beautiful Northern California the week before Labor Day. We are proud to announce another rigorous Python

Re: Advanced concurrancy

2005-07-28 Thread Calvin Spealman
Twisted [1] includes lots of support for asyncronous concurrency, using deferreds. There is also the possiblity of PEP 342's [2] concurrency through enhanced generators, and being able to pass data to the generator every iteration. There are ways to simulate this, as well. I've written a recipe

Re: Graphics files Python

2005-07-28 Thread Terry Reedy
Pekka Karjalainen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How can I create image files and animations with Python? Besides the other responses, you might also check out the pygame site where there once were some tutorial examples of manipulating bitmaps with Numerical

Cgi scripts in apache not working

2005-07-28 Thread David
I've looked all over the place for an answer, and the only one I can find doesn't mean anything to me. The end of line issue with writting it in Windows and then uploading it doesn't help me since I'm doing this all from Linux. I've been trying to get python cgi scripts to work, and I always end

Adding code and methods to a class dynamically

2005-07-28 Thread Sarir Khamsi
I have a class (Command) that derives from cmd.Cmd and I want to add methods to it dynamically. I've added a do_alias() method and it would be nice if I could turn an alias command into a real method of Command (that way the user could get help and name completion). The code would be generated

Re: Rich Graphics?

2005-07-28 Thread Bernhard Herzog
Chris Spencer [EMAIL PROTECTED] writes: I'm trying to write a Gui in Python for manipulating rich graphical representations, similar to something like Inkscape. I've tried tkinter, wxPython, pyGtk, and while they all do traditional widgets well enough, none of them really handle anti-aliased,

Re: Advanced concurrancy

2005-07-28 Thread jemfinch
Asynchrony is not concurrency. If you have to turn your code inside out, (that is, if you have to write your code such that the library calls your code, rather than vice versa) it's very much *not* concurrency: it's just asynchrony. While Twisted makes asynchronous code relatively easy to write

Re: Advanced concurrancy

2005-07-28 Thread Paolino
Peter Tillotson wrote: Hi, I'm looking for an advanced concurrency module for python and don't seem to be able to find anything suitable. Does anyone know where I might find one? I know that there is CSP like functionality built into Stackless but i'd like students to be able to use a

Re: Regex for nested {}

2005-07-28 Thread Diez B.Roggisch
constructs like a**nn**n, with a={ and b=} in your case. This should have been a**nb**n - an example would be aaabbb. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding code and methods to a class dynamically

2005-07-28 Thread Peter Hansen
Sarir Khamsi wrote: I have a class (Command) that derives from cmd.Cmd and I want to add methods to it dynamically. I've added a do_alias() method and it would be nice if I could turn an alias command into a real method of Command (that way the user could get help and name completion). The

Re: On fighting fire with fire...

2005-07-28 Thread mustafa
Rocco Moretti wrote: projecktzero wrote: but..but...It's so much more fun to unleash your anger and fire back with all guns blazing fanning the flame war that most discussion groups degenerate into after a couple of responses. =) Actually, I had some self restraint yesterday. I wanted to write

Re: On fighting fire with fire...

2005-07-28 Thread Asad Habib
I agree with Mustafa. After all, we are a bunch of professionals and not vagabonds hired to take pot shots at one another. - Asad On Thu, 28 Jul 2005, mustafa wrote: Rocco Moretti wrote: projecktzero wrote: but..but...It's so much more fun to unleash your anger and fire back with all

Determine if object is a Bound or Unbound method

2005-07-28 Thread Farshid Lashkari
Hi, I have an object and I want to check if it is a bound or unbound method, or neither. I tried using the types module, but it seems as though types.UnboundMethodType and types.MethodType are equal. How else can I determine this? BTW, I'm using Python 2.3 Thanks, Farshid --

Ten Essential Development Practices

2005-07-28 Thread gyromagnetic
The following url points to an article written by Damian Conway entitled Ten Essential Development Practices: http://www.perl.com/pub/a/2005/07/14/bestpractices.html Althought the article has Perl as a focus, I thought that some of the general points made might be of interest to the Python

To thread or not to thread

2005-07-28 Thread Sidd
Hello, I was recently reading an article on threading in python and I came across Global Interpreter Lock,now as a novince in python I was cusrious about 1.Is writing a threaded code in python going to perform well than a normal python code.If so on what basis can it performance be

Re: Ten Essential Development Practices

2005-07-28 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: The following url points to an article written by Damian Conway entitled Ten Essential Development Practices: http://www.perl.com/pub/a/2005/07/14/bestpractices.html Althought the article has Perl as a focus, I thought that some of the general points made might be

Re: multiple inheritance super()

2005-07-28 Thread rafi
Michele Simionato wrote: http://fuhm.org/super-harmful/ That is a pretty good page; I must say that my position is more radical (i.e. it is not super which is harmful, it is multiple inheritance itself that it is harmful: was I going to design a new language I would implement it *without*

Re: Determine if object is a Bound or Unbound method

2005-07-28 Thread Paolino
Farshid Lashkari wrote: Hi, I have an object and I want to check if it is a bound or unbound method, or neither. I tried using the types module, but it seems as though types.UnboundMethodType and types.MethodType are equal. How else can I determine this? BTW, I'm using Python 2.3

Re: Ten Essential Development Practices

2005-07-28 Thread Jeremy Moles
He spends so much space on Create Consistent Command-Line Interfaces, a section that, in Python, could be replaced with a simple Use optparse. Haha... I don't know why but that really made me laugh. :) Might even use it as a sig or something... :) -- Michael Hoffman --

Re: Ten Essential Development Practices

2005-07-28 Thread Robert Kern
[EMAIL PROTECTED] wrote: The following url points to an article written by Damian Conway entitled Ten Essential Development Practices: http://www.perl.com/pub/a/2005/07/14/bestpractices.html Althought the article has Perl as a focus, I thought that some of the general points made might be

Re: Determine if object is a Bound or Unbound method

2005-07-28 Thread Farshid Lashkari
Grazie! Paolino wrote: Farshid Lashkari wrote: Hi, I have an object and I want to check if it is a bound or unbound method, or neither. I tried using the types module, but it seems as though types.UnboundMethodType and types.MethodType are equal. How else can I determine this? BTW,

Re: On fighting fire with fire...

2005-07-28 Thread Asad Habib
What, do you not consider yourself a professional? Just because you are in academia does not justify attacking people on a mailing list and then justifying your attack with Harter's quote! Life is more than a quote - look outside your academic cocoon and you will realize what I mean. - Asad On

pySerial Windows write problem

2005-07-28 Thread Bob Greschke
We have some equipment that communicates at 57600 baud RS232. The path from the PC is USB to a Phillips USB hub, then off of that a TUSB3410 USB/Serial converter. The driver for the 3410 chip creates a normal comm port (like COM3). There is a C++ program that has no problem talking to the

Re: codecs.getencoder encodes entire string ?

2005-07-28 Thread Martin v. Löwis
nicolas_riesch wrote: I just don't understand why it returns the length consumed. Does it means that in some case, the input string can be only partially converted ? For an encoder, I believe the answer is no. For a decoder, it is a definite yes: if the input does not end with a complete

Re: On fighting fire with fire...

2005-07-28 Thread Robert Kern
Asad Habib wrote: What, do you not consider yourself a professional? Not really, no. Just because you are in academia does not justify attacking people on a mailing list and then justifying your attack with Harter's quote! Uh, it was a joke. A self-denigrating joke. I was calling *myself* a

Re: Ten Essential Development Practices

2005-07-28 Thread Michael Hoffman
Robert Kern wrote: import this And you get 9 bonus Essential Development Practices, too! What a bargain! One of these days I'm going to figure out how to embody Namespaces are one honking great idea -- let's do more of those! Then I shall be enlightened. -- Michael Hoffman --

Re: how to get function signature

2005-07-28 Thread Colin J. Williams
Robert Kern wrote: [EMAIL PROTECTED] wrote: Hi, I was working on a dir like function that gives more information than the usual dir, but I am not satisfied with the way I get function arguments for callable members of an object. Take a look at it here:

Re: retrieve data from 2 database

2005-07-28 Thread Steve Holden
crespoh wrote: Hi, How do I select data from two tables from two different databases and compare them? using dbi,odbc Well, a lot depends on the database. If it's two Access .mdb files, for example, or two different databases in a single SQL Server instance, sometimes you can use SQL

Re: Ten Essential Development Practices

2005-07-28 Thread Dan Sommers
On Thu, 28 Jul 2005 21:19:53 +0100, Michael Hoffman [EMAIL PROTECTED] wrote: Robert Kern wrote: import this And you get 9 bonus Essential Development Practices, too! What a bargain! One of these days I'm going to figure out how to embody Namespaces are one honking great idea -- let's do

Re: pySerial Windows write problem

2005-07-28 Thread bob
I forgot to mention that once the Python program(s) fail, THEN the C++ program also fails to opne the port, and the equipment has to be power-cycled to get things to work again. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: On fighting fire with fire...

2005-07-28 Thread Rocco Moretti
Asad Habib wrote: I agree with Mustafa. After all, we are a bunch of professionals and not vagabonds hired to take pot shots at one another. Except that we're not all professionals. There are a large number of hobbyists who use Python and this list. At any rate, my suggestion was not to

Re: On fighting fire with fire...

2005-07-28 Thread Asad Habib
Well, even if you are a hobbyist, that does not excuse you from being civil. After all, we are all humans beings that deserve to be treated with respect. Professional, hobbyist, vagabond, ogre, instigator, troll ... THERE IS NO EXCUSE ... please treat others with respect. - Asad On Thu, 28 Jul

poplib.POP3.list() returns extra value?

2005-07-28 Thread Steve Greenland
For the poplib.POP3 object, docs say: list([which]) Request message list, result is in the form (response, ['mesg_num octets', ...]). If which is set, it is the message to list. But (I've folded the long line): Python 2.3.5 (#2, May 4 2005, 08:51:39) [GCC 3.3.5 (Debian 1:3.3.5-12)]

  1   2   >