Re: How to find the classname of an object? (was Python Documentation)

2005-05-12 Thread Heiko Wundram
On Friday 13 May 2005 01:21, Christopher J. Bottaro wrote: > For those of you following the Python Documentation thread, this is a good > example of how the PHP manual is "better". I found how to do this in a few > seconds in PHP. I searched the Python docs for "class name", "classname", > "intro

Re: bash like expansion

2005-05-12 Thread bill
Quick glance at the reference manual, and I think that pipes.Template may do exactly what I want. Is that what you're referring to? I realized when I woke up that I have another slight irritant: I need to be able to intelligently parse a command line. ie I need to correctly parse each of the fol

Re: Python Documentation (should be better?)

2005-05-12 Thread Steven Bethard
Ron Adam wrote: > What I would like to see is something like the following for each item: > > 0. reference @ sequence code > 2. "Builtin" | "import " > 3. Type/class: Name/Syntax > 4. Description with examples > 6. Links to other references of this item in docs > 7. Links to related functions or o

Re: Python Documentation (should be better?)

2005-05-12 Thread Greg Ewing
Ivan Van Laningham wrote: > Hi All-- > The Python docs are not ideal. I can never remember, for instance, > where to find string methods (not methods in the string module, but > methods with '') Curiously I had the same problem just the other day, except with list instead of string. I think the p

python 2.3.4, cx_Oracle 4.1 and utf-8 - trouble

2005-05-12 Thread Maxim Kuleshov
Hello! Trying to fetch long varchar2 column and get the following error: cx_Oracle.DatabaseError: column at array pos 0 fetched with error: 1406 i.e. string buffer is not much enough to fetch the string. # fragment of code... myCon = cx_Oracle.connect(user, psw, dsn) myCur = myCon.cursor() myCu

Re: Python Documentation (should be better?)

2005-05-12 Thread Ron Adam
Steven Bethard wrote: > Skip Montanaro wrote: > >>Mike> Given that Python hides the difference between user-defined >>Mike> objects and built-in objects, it's not clear to me that anything >>Mike> other than the current system, with all the classes/types in one >>Mike> place, make

Re: [perl-python] Range function

2005-05-12 Thread Jürgen Exner
Xah Lee wrote: > Today we'll be writing a function called Range. I don't think so. Unless you meant to write "Today WE'll be writing " > The Perl documentation is as follows. Bullshit. The Perl documentation is part of any Perl installation but you didn't link to it anywhere left alone quot

Re: Escape spaces in strings

2005-05-12 Thread Andrew Dalke
Florian Lindner wrote: > is there a function to escape spaces and other characters in string for > using them as a argument to unix command? In this case rsync > (http://samba.anu.edu.au/rsync/FAQ.html#10) It's best that you use the subprocess module and completely skip dealing with shell escapes.

Re: Unique Elements in a List

2005-05-12 Thread Andrew Dalke
Scott David Daniels wrote: > Again polynomial, not exponential time. Note that there is no > polynomial time algorithm with (k < 1), since it takes O(n) time > to read the problem. Being a stickler (I develop software after all :) quantum computers can do better than that. For example, Grover's

Re: OSx 10.4 lacks pythonIDE?

2005-05-12 Thread Robert Kern
baza wrote: > Where is the IDE in 'Tiger' for the mac? Don't tell me I have to use > text edit all the time?? PythonIDE never came with the OS. You have to install it yourself. http://homepages.cwi.nl/~jack/macpython/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass gro

[perl-python] Range function

2005-05-12 Thread Xah Lee
Today we'll be writing a function called Range. The Perl documentation is as follows. Perl & Python & Java Solutions will be posted in 48 hours. This is Perl-Python a-day. See http://xahlee.org/web/perl-python/python.html Xah [EMAIL PROTECTED] â http://xahlee.org/ --

[perl-python] Range function

2005-05-12 Thread Xah Lee
Today we'll be writing a function called Range. The Perl documentation is as follows. Perl & Python & Java Solutions will be posted in 48 hours. This is Perl-Python a-day. See http://xahlee.org/web/perl-python/python.html Xah [EMAIL PROTECTED] â http://xahlee.org/ --

Re: Python features

2005-05-12 Thread Andrew Dalke
Peter Dembinski wrote: > If you want to redirect me to Google, don't bother. IMO ninety percent > of writings found on WWW is just a garbage. Sturgeon's law: Ninety percent of everything is crap. Andrew [EMAIL PROTECTED] -- http

OSx 10.4 lacks pythonIDE?

2005-05-12 Thread baza
Where is the IDE in 'Tiger' for the mac? Don't tell me I have to use text edit all the time?? B -- Computer says 'No' -- http://mail.python.org/mailman/listinfo/python-list

Re: tkFileDialog question

2005-05-12 Thread James Stroud
Oops, That should have been, class MyApp: def __init__(self, parent): self.myParent = parent self.myContainer1 = Frame(parent) self.myContainer1.pack() self.entry = Entry(self.myContainer1) self.entry.grid(r

Re: tkFileDialog question

2005-05-12 Thread James Stroud
I think you are better off not binding a button like you are doing. Use the "command" option to get the behavior you want. E.g: class MyApp: def __init__(self, parent): self.myParent = parent self.myContainer1 = Frame(parent) self.myContainer

Re: Python 2.4 & BLT ?

2005-05-12 Thread Ron Adam
StepH wrote: > Ron Adam a écrit : > >>StepH wrote: >> >> >>>Ron Adam a écrit : >>> >>> StepH wrote: >Hi, > >I'm not able to install BLT on my Python 2.4 (upgraded to 2.4.1) >distibution... > >I'v try to download btlz-for-8.3.exe, but when i try to instal

Re: How to find the classname of an object? (was Python Documentation)

2005-05-12 Thread Bengt Richter
On Thu, 12 May 2005 23:30:21 GMT, Farshid Lashkari <[EMAIL PROTECTED]> wrote: >This will get the name of an objects class > >obj.__class__.__name__ > >This will return a tuple of its base classes > >obj.__class__.__bases__ But not all base classes that it inherits from, e.g., >>> class C(object

Re: Decompyle will not Compile.

2005-05-12 Thread eternl_knight
Yeah, I know the site. In fact, his service is based off of a deriviative of the code I am trying to compile. Thanks though. What I don't understand is the fact that I cannot locate either "initdecompyle" or "marshal_20" in the source code, yet it appears to compile on FreeBSD & Linux (given the f

suspected cPickle memory leak

2005-05-12 Thread Al Franz
I believe there is a memory leak in cPickle. I am using python2.2. I have a parallel code which uses array() and indices() from Numeric to massage data buffers before being sent and received by Pypar. Pypar subsequently uses cPickle to pickle the data. After many hours of execution, my

Re: How to find the classname of an object? (was Python Documentation)

2005-05-12 Thread Farshid Lashkari
This will get the name of an objects class obj.__class__.__name__ This will return a tuple of its base classes obj.__class__.__bases__ Christopher J. Bottaro wrote: > I actually want all the parent classes too. So if D derives off C derives > off B derives off A, I ultimately want a tuple ('D'

Re: Python features

2005-05-12 Thread Lonnie Princehouse
> Quoting from that link: > There are three main types of programming languages. > > * Imperative > * Functional > * Declarative > Aren't functional languages a subset of declarative? (c.f. http://en.wikipedia.org/wiki/Declarative_programming) -- http://mail.python.org/mailman/l

How to find the classname of an object? (was Python Documentation)

2005-05-12 Thread Christopher J. Bottaro
I actually want all the parent classes too. So if D derives off C derives off B derives off A, I ultimately want a tuple ('D', 'C', 'B', 'A'). For those of you following the Python Documentation thread, this is a good example of how the PHP manual is "better". I found how to do this in a few sec

tkFileDialog question

2005-05-12 Thread jaime . suarez
I am creating a very simple GUI with one Entry widget and one Button. The purpose of the Button widget is to Browse for a file using tkFileDialog.askopenfilename(). I bind the button to a handler which spawns a tkFileDialog. This works but the button __stays depressed__ after the handler returns!

Re: bash like expansion

2005-05-12 Thread Mike Meyer
"bill" <[EMAIL PROTECTED]> writes: > Consider the following: > > import os, commands > os.environ['QWE']="string with foo" > a = '$QWE ${QWE/foo/baz}' > b = commands.getoutput('echo ' + a) > > > This does what I want, which is to expand > a according to the standard bash expansion rules > (so b n

Re: pyvm -- faster python

2005-05-12 Thread Mike Meyer
Paul Rubin writes: > Andrew Dalke <[EMAIL PROTECTED]> writes: > >> Years ago, presented at one of the Python conferences, was a program >> to generate C code from the byte code The conclusion I recall >> was that it wasn't faster - at best a few percent - and there

Re: Launch file in Notepad

2005-05-12 Thread Brian van den Broek
Fredrik Lundh said unto the world upon 2005-05-12 13:52: > Brian van den Broek wrote: > > >>>I'm trying to lauch Notepad from Python to open a textfile: >>> >>>import os >>>b1="c:\test.txt" >>>os.system('notepad.exe ' + b1) >>> >>>However, the t of test is escaped by the \, resulting in Notepad t

Re: pyvm -- faster python

2005-05-12 Thread Paul Rubin
Rocco Moretti <[EMAIL PROTECTED]> writes: > Python, as a procedural language, makes extensive use of globals & > mutable variables IIUC, in Lisp, as a functional language, "all > politics is local." Global-like variables are much rarer, and > mutability is severely limited. Some people write

Re: Problems with csv module

2005-05-12 Thread John Machin
On Wed, 11 May 2005 23:52:56 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: >John Machin <[EMAIL PROTECTED]> writes: >> The CSV format is not defined at all, AFAIK. > >Just for the record, http://www.ietf.org/internet-drafts/draft-shafranovich-mime-csv-05.txt > " Bletch" ,"""Bletch""", "Ble

Re: Python Documentation (should be better?)

2005-05-12 Thread Rocco Moretti
Terry Hancock wrote: > *But you do have to remember that strings are documented under "sequences" > this is probably my biggest complaint about the Library Reference --- > something > as important as string methods should have its own heading in the top-level > outline. But that's a nitpick, of

Re: Launch file in Notepad

2005-05-12 Thread Greg Krohn
George wrote: > Newbie question: > > I'm trying to lauch Notepad from Python to open a textfile: > > import os > b1="c:\test.txt" > os.system('notepad.exe ' + b1) > > However, the t of test is escaped by the \, resulting in Notepad trying > to open "c: est.txt". > > How do I solve this? > > (

Re: TAKE_FOCUS

2005-05-12 Thread phil
Thanks, works great. >>I have a function I need to run when the window >>gets the focus. How do you do that in Tkinter >>on Win32? >> > > binding the event should work. > > (and make sure that the takefocus option is set) -- http://mail.python.org/mailman/listinfo/python-list

Re: pyvm -- faster python

2005-05-12 Thread Rocco Moretti
Paul Rubin wrote: > Despite the shrieks of the "Python is not Lisp!" crowd, Python > semantics and Lisp semantics aren't THAT different, and yet compiled > Lisp implementations com completely beat the pants off of interpreted > Python in terms of performance. I know little about Lisp compilatio

Re: bash like expansion

2005-05-12 Thread Paul McGuire
Something in this vein? >>> baseString = "string with %s" >>> [ baseString % ss for ss in ('foo', 'baz') ] ['string with foo', 'string with baz'] >>> b = " ".join([ baseString % ss for ss in ('foo', 'baz') ]) >>> b 'string with foo string with baz' >>> -- Paul -- http://mail.python.org/mailman/

Re: Launch file in Notepad

2005-05-12 Thread Bengt Richter
On Thu, 12 May 2005 16:30:36 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On Thu, 12 May 2005 15:14:09 GMT, [EMAIL PROTECTED] (Bengt Richter) declaimed >the following in comp.lang.python: > > >> >> I don't know why MS used backslashes when unix had a perfectly good path >> syntax >> (not t

Re: Exception value cut off

2005-05-12 Thread Fredrik Lundh
"Ryan, Adam" wrote: > sys.exc_info()[1] returns the first 308 characters of an error message from > a module. Is there a way to increase the length so it doesn't get cut off? sys.exc_info()[1] returns the entire contents of the exception parameter. if it's cut off, it's either cut off by the cod

Re: Python features

2005-05-12 Thread david . tolpin
> There are three main types of programming languages. > > * Imperative > * Functional > * Declarative > animals are divided into: * those that belong to the Emperor, * embalmed ones, * those that are trained, * suckling pigs, * mermaids, * fabulous ones, * stray dogs, * those incl

Re: Problem combining python code and html

2005-05-12 Thread Hansan
Hi all and thanks for the help, With help from Fredrik I got the code working, I will also look into the links you guys have suggested. Hope you all are feeling well and happy. "has" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hansan wrote: > >> And is there a nother way to c

Re: Interactive shell for demonstration purposes

2005-05-12 Thread Bengt Richter
On Thu, 12 May 2005 17:41:29 +0200, Brian Quinlan <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> If you make your console 96 wide and set the font to Lucida Console Bold >> 24point, >> it will probably expand to near full screen on 1024x768. You can set the >> scroll buffer >> to a couple h

Re: How "return" no return ?

2005-05-12 Thread kaerbuhez
Ximo a écrit : > I am doing my own interpreter with the Python languaje. > > Do you understand me? > I will do my best : I guess that you are about to write your own non python interpreter (I mean, it will interpret some language that is not Python) and your interpreter sadly writes "None" whe

Re: Escape spaces in strings

2005-05-12 Thread Jp Calderone
On Fri, 13 May 2005 00:49:21 +0200, Florian Lindner <[EMAIL PROTECTED]> wrote: >Hello, >is there a function to escape spaces and other characters in string for >using them as a argument to unix command? In this case rsync >(http://samba.anu.edu.au/rsync/FAQ.html#10) > >Thx, > >Florian Yes, but y

Re: Python Polymorphism

2005-05-12 Thread Fredrik Lundh
Carlos Moreira wrote: > Supose that I want to create two methos (inside a > class) with exactly same name, but number of > parameters different: that's known as multimethods, or multiple dispatch. it's a kind of polymorphism; it's not the only way to do it, nor is it the only thing that qualifie

Escape spaces in strings

2005-05-12 Thread Florian Lindner
Hello, is there a function to escape spaces and other characters in string for using them as a argument to unix command? In this case rsync (http://samba.anu.edu.au/rsync/FAQ.html#10) Thx, Florian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 & BLT ?

2005-05-12 Thread StepH
Ron Adam a écrit : > StepH wrote: > >> Ron Adam a écrit : >> >>> StepH wrote: >>> >>> Hi, I'm not able to install BLT on my Python 2.4 (upgraded to 2.4.1) distibution... I'v try to download btlz-for-8.3.exe, but when i try to install it, i've a msgbox saying to

Re: pyvm -- faster python

2005-05-12 Thread François Pinard
[Paul Rubin] > François Pinard <[EMAIL PROTECTED]> writes: > > > Deep down, why or how not having a [traditional, to-native-code] > > compiler is a deficiency for CPython? We already know that such a > > beast would not increase speed so significantly, while using much > > more memory. > I'd say

Re: tkinter puzzler

2005-05-12 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: >I have a gui with a bunch of buttons, labels, the usual stuff. It >uses the grid manager: > > gui = Frame() > gui.grid() > gui.Label().grid() # put some widgets into the gui > ...# more widgets > >Now

Re: Python Polymorphism

2005-05-12 Thread infidel
carlos> Supose that I want to create two methos (inside a carlos> class) with exactly same name, but number of carlos> parameters different That isn't polymorphism, that's function overloading. carlos> Look, I don't want to use things like: carlos> carlos> def myMethod(self, myValue=None):

Re: Python Polymorphism

2005-05-12 Thread Roel Schroeven
Carlos Moreira wrote: > So, let's try again. > Supose that I want to create two methos (inside a > class) with exactly same name, but number of > parameters different: > > class myClass: > myAttribute = 0 > def myMethod(self): > self.myAttribute += 1 > def myMethod(self,

Re: Python Polymorphism

2005-05-12 Thread Dan Sommers
On Thu, 12 May 2005 13:00:45 -0700 (PDT), Carlos Moreira <[EMAIL PROTECTED]> wrote: > Look, I don't want to use things like: > > def myMethod(self, myValue=None): >if(not myValue): > self.myAttribute += 1 >else: > self.myAttribute

Re: Python features

2005-05-12 Thread Gary D. Duzan
In article <[EMAIL PROTECTED]>, Peter Dembinski <[EMAIL PROTECTED]> wrote: > > >On Sun, 08 May 2005 10:02:42 +0200, André Roberge ><[EMAIL PROTECTED]> wrote: > >> Imperative programming languages are the most commonly used languages. >> Examples of this type of language are C, C++, Ada, Fortra

Re: Problem combining python code and html

2005-05-12 Thread has
Hansan wrote: > And is there a nother way to combine python code and html templates? There's a decent list of Python templating engines at: http://www.python.org/moin/WebProgramming Look about a third of the way down down under "Variable Insertion-Replacement Templating Applications (Pre-proces

Exception value cut off

2005-05-12 Thread Ryan, Adam
sys.exc_info()[1] returns the first 308 characters of an error message from a module. Is there a way to increase the length so it doesn't get cut off? Cheers, Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Polymorphism

2005-05-12 Thread Carlos Moreira
--- Fredrik Lundh <[EMAIL PROTECTED]> wrote: > so phrases like > (etc) > > doesn't tell you that polymorphism is a fundamental > part of the language, > and used all over the place. or did you have a > non-OO meaning of the > word in mind? Ok, I prefer to think that I could be more

Re: Unique Elements in a List

2005-05-12 Thread Edvard Majakari
Scott David Daniels <[EMAIL PROTECTED]> writes: > Normally this is called a polynomial, rather than exponential increase. > Exponential increases are typically of the form (C^N) (they are all > equivalent). > Polynomial times are hallways characterized by their largest exponent, > So you never cal

Re: exPyCrypto confusion

2005-05-12 Thread Kip Lehman
The example[2,3,4].py files in the ezPyCrypto are instructive. Using the techniques in those files and modifying your test script, the desired behavior is attainable. Two items had to be changed. Instead of k.exportKey(), you have to use k.exportKeyPrivate(). On the other end instead of ke.de

Re: pyvm -- faster python

2005-05-12 Thread david . tolpin
> I don't think Python can ever beat > carefully coded C for running speed, but it can and should aim for > parity with compiled Lisp. But common lisp compilers often beat C compilers in speed for similar tasks of moderate complexity. In particular, CMUCL beats GCC in numerical computations. Davi

Re: increment bits

2005-05-12 Thread Bill Mill
On 12 May 2005 12:19:15 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > How do i manipulate arrays to increment 8 bits at a time. > > I need to generate a pattern like > 01,02,03,.0xFF >>> [hex(n) for n in range(256)] ['0x0', '0x1', '0x2', '0x3', '0x4', '0x5', '0x6', '0x7',

Re: pyvm -- faster python

2005-05-12 Thread Paul Rubin
Andrew Dalke <[EMAIL PROTECTED]> writes: > Years ago, presented at one of the Python conferences, was a program > to generate C code from the byte code The conclusion I recall > was that it wasn't faster - at best a few percent - and there was a > big memory hit because of all the duplicated

Re: pyvm -- faster python

2005-05-12 Thread Paul Rubin
François Pinard <[EMAIL PROTECTED]> writes: > Deep down, why or how not having a [traditional, to-native-code] > compiler is a deficiency for CPython? We already know that such a beast > would not increase speed so significantly, while using much more memory. I'd say the opposite. The 4x speedup

increment bits

2005-05-12 Thread [EMAIL PROTECTED]
Hello, How do i manipulate arrays to increment 8 bits at a time. I need to generate a pattern like 01,02,03,.0xFF Thanks, -Ashton -- http://mail.python.org/mailman/listinfo/python-list

Re: How "return" no return ?

2005-05-12 Thread Michael Spencer
Ximo wrote: > I am doing my own interpreter with the Python languaje. > > Do you understand me? > > > > "Fredrik Lundh" <[EMAIL PROTECTED]> escribió en el mensaje > news:[EMAIL PROTECTED] > >>"Ximo" wrote: >> >> >>>I am doing a interpret of lines and it show me a prompt, and I want if I >>>wr

Re: pyvm -- faster python

2005-05-12 Thread Kay Schluehr
Stelios Xanthakis wrote: > Kay Schluehr wrote: > > > > > Yes. What we are seeking for and this may be the meaning of Armins > > intentiously provocative statement about the speed of running HLLs is a > > successor of the C-language and not just another VM interpreter that is > > written in C and li

Re: Python features

2005-05-12 Thread Peter Dembinski
On Sun, 08 May 2005 10:02:42 +0200, Andrà Roberge <[EMAIL PROTECTED]> wrote: [...] > google for "python" and "functional"; first link: > http://www-106.ibm.com/developerworks/linux/library/l-prog.html [...] > Imperative programming languages are the most commonly used languages. > Examples

Re: urllib download insanity

2005-05-12 Thread Paul Rubin
Skip Montanaro <[EMAIL PROTECTED]> writes: > Timothy> downloading the OLD file i've deleted! if i download it via IE, > Timothy> i get the new file. SO, my only conculsion is that urllib is > Timothy> caching it some where. BUT i'm already calling urlcleanup(), so > Timothy> what el

Re: working directory for debugging in pythonwin

2005-05-12 Thread Colin J. Williams
Thomas Pfaff wrote: > Hello all, > > I started using the nice Pythonwin IDE together with Python 2.3 (I have > come to prefer its editor to IDLE). > My problem is, that when I want to run a script in the debugger, I can > give the script name and arguments, but I can't tell it in which > directory

Re: Python Documentation (vs PHP stuff)

2005-05-12 Thread Paul Rubin
Roel Schroeven <[EMAIL PROTECTED]> writes: > In my experience, the user comments in many cases are almost useless. > Sometimes just confusing, sometimes contradicting each other, sometimes > even incorrect. Sometimes correct and useful too, but IMO that gets > drown between all the others. One thi

bash like expansion

2005-05-12 Thread bill
Consider the following: import os, commands os.environ['QWE']="string with foo" a = '$QWE ${QWE/foo/baz}' b = commands.getoutput('echo ' + a) This does what I want, which is to expand a according to the standard bash expansion rules (so b now references "string with foo string with baz"), but i

Re: Importing modules

2005-05-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Another item (for me...) difficult, is "import modules", and "plenty of > information" (as you said) does not help me much: the mechanism of > variable visibility and namespaces is not clear to me. have you read this http://effbot.org/zone/python-objects.htm and

Re: How "return" no return ?

2005-05-12 Thread Bill Mill
On 5/12/05, Ximo <[EMAIL PROTECTED]> wrote: > I am doing my own interpreter with the Python languaje. > > Do you understand me? Well, to be frank, no. However, Frederik's point still stands; in the python langage, "int a" is syntactically invalid. If you're writing your own interpreter, it should

Re: win32com Dispatch() and SetPriorityClass()

2005-05-12 Thread Roger Upole
The ie object exposes its window handle as attribute HWND, and you should be able to use win32process.GetWindowThreadProcessId to get the thread id and process id that created the window. hth Roger "Chris Curvey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > if I'm usin

Re: Python Documentation (should be better?)

2005-05-12 Thread Steven Bethard
Skip Montanaro wrote: > Mike> Given that Python hides the difference between user-defined > Mike> objects and built-in objects, it's not clear to me that anything > Mike> other than the current system, with all the classes/types in one > Mike> place, makes sense. > > Maybe the Modu

Re: Python Polymorphism

2005-05-12 Thread Fredrik Lundh
Carlos Moreira wrote: > Are you talking about: > http://docs.python.org/tut/tut.html > > I fear that doesn't exist one word about polymorphism > (in an explicit way). so phrases like "Strings can be concatenated (glued together) with the + operator, and repeated with *" "Like string

Re: How "return" no return ?

2005-05-12 Thread Ximo
I am doing my own interpreter with the Python languaje. Do you understand me? "Fredrik Lundh" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > "Ximo" wrote: > >> I am doing a interpret of lines and it show me a prompt, and I want if I >> write a declaration as "int a" my pro

Re: Python Documentation (should be better?)

2005-05-12 Thread Fredrik Lundh
Christopher J. Bottaro wrote: > My idea for a manual's table of contents: > > 1. Variables python doesn't have variables. the corresponding construct is described in chapter 4 in the language reference. > 2. Conditional and Branching Constructs chapter 6 and 7 in the language reference: > 3

Re: Launch file in Notepad

2005-05-12 Thread Fredrik Lundh
Brian van den Broek wrote: > > I'm trying to lauch Notepad from Python to open a textfile: > > > > import os > > b1="c:\test.txt" > > os.system('notepad.exe ' + b1) > > > > However, the t of test is escaped by the \, resulting in Notepad trying > > to open "c: est.txt". > > > > How do I solve this

Re: Problem combining python code and html

2005-05-12 Thread Fredrik Lundh
"Hansan" wrote: > The change did remove the error message, and I can see what was wrong. > However there is now a new problem, the only thing that is displayed is one > single character and that is: < > > Do you or anyone else have a suggestion to what the cause to this new > problem is ? my faul

Re: Python Documentation (should be better?)

2005-05-12 Thread Bill Mill
On 5/12/05, Terry Reedy <[EMAIL PROTECTED]> wrote: > > "Skip Montanaro" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Maybe the Module Index should be renamed "Module/Type Index" and > > embellished > > with the builtin types, so that you'd find "float (builtin)", "string > > (

Re: Python Polymorphism

2005-05-12 Thread Carlos Moreira
--- Fredrik Lundh <[EMAIL PROTECTED]> wrote: > www.python.org :-/ > > (have you read the tutorial?) Are you talking about: http://docs.python.org/tut/tut.html I fear that doesn't exist one word about polymorphism (in an explicit way). Anyway, I use Python since 2000 year and already use OO P

Re: How "return" no return ?

2005-05-12 Thread Fredrik Lundh
"Ximo" wrote: > I am doing a interpret of lines and it show me a prompt, and I want if I > write a declaration as "int a" my progrtam return de prompt and nothing > more, for exemple: > > >>> 2+2 > 4 > >>> int a > >>> > > Then I'm finding that de function which execute "int a" return me nothing, >

Re: Python Polymorphism

2005-05-12 Thread Fredrik Lundh
Carlos Moreira wrote: > How could I use Python polymorphism? > Which kind of structures Python give me to use > polymorphism? > Where can I find specific documentation? www.python.org (have you read the tutorial?) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Documentation (should be better?)

2005-05-12 Thread Terry Reedy
"Skip Montanaro" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Maybe the Module Index should be renamed "Module/Type Index" and > embellished > with the builtin types, so that you'd find "float (builtin)", "string > (builtin)", "dict (builtin)", etc. in the appropriate alphabetic

Re: Speed of the different python-based HTTP-servers

2005-05-12 Thread Irmen de Jong
Thomas W wrote: > I don't expect this project to have alot of traffic once online, but it > would kinda suck if my software couldn't handle it if it really took > off. What would be "a lot" > So my question is; based on the very brief description above, are there > any of the python-based fr

Re: Can get reference of a part of a list?

2005-05-12 Thread F. Petitjean
Le Fri, 13 May 2005 00:58:49 +0800, flyaflya a écrit : > I want make a 2-D array from a list,all elements is references of > list's,like this: > a = [1,2,3,4] > b = [ [1,2], [3,4] ] > when change any elements of a, the elements of b will change too, so I > can use some function for list to chang

Re: Can get reference of a part of a list?

2005-05-12 Thread Terry Reedy
"flyaflya" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want make a 2-D array from a list,all elements is references of > list's,like this: > a = [1,2,3,4] > b = [ [1,2], [3,4] ] > when change any elements of a, the elements of b will change too, so I > can use some function fo

Re: Python Graphing Utilities.

2005-05-12 Thread Petr Mikulik
> A pslatex backend certainly would be interesting. A Gnuplot backend > would probably not be feasible. Does it expose its raw drawing operations? There is a patch [ 1027032 ] Connect gnuplot_x11 to exterior application window http://sourceforge.net/tracker/index.php?func=detail&aid=1027032&group_

Can get reference of a part of a list?

2005-05-12 Thread flyaflya
I want make a 2-D array from a list,all elements is references of list's,like this: a = [1,2,3,4] b = [ [1,2], [3,4] ] when change any elements of a, the elements of b will change too, so I can use some function for list to change b. c/c++ can work in this way,I think let b[0] = a[0:2], b[1] = a

Re: Finding startup files

2005-05-12 Thread Bernhard Herzog
Grant Edwards <[EMAIL PROTECTED]> writes: > On 2005-05-11, jeff elkins <[EMAIL PROTECTED]> wrote: > >> I'm totally new to Python (obvious,yes?) so how might argv[0] fail? > > argv[0] contains whatever is put there by the program that > exec'ed you, and can therefore contain just about anything (or

Python with MSC.Mentat

2005-05-12 Thread Jeroen Kleijer
Hi all, I'm running into a very strange problem at work. We're using an application called MSC.Mentat (modelling/meshing application) which provides a programmable interface through Python. Because we were told that the Python version they ship is missing some libraries we compiled it ourselves

Tix hlist and item_exists

2005-05-12 Thread theoryboy
I can't seem to get this function to work. If the item does not exist I get an exception, rather than a return value of false. Here's an example: #!/usr/bin/python from Tix import * root = Tk() listBox = HList(root) item = "some item" if not listBox.item_exists(item, 0): listBox.add(ite

Debugging python with c++ extensions under windows with eclipse CDT

2005-05-12 Thread peter
Hello all, I would like to debug my python libraries, written in c++, with GDB (gnu debugger) I'm using the mingw compiler in a windows environment. As development environment I use eclipse with the CDT plugin. This plugin also has a nice GUI frontend for the GDB. I've already tried several set

Re: Unique Elements in a List

2005-05-12 Thread Scott David Daniels
Edvard Majakari wrote: > I realized that, but maybe I should've pointed it out too. For the OP if > he/she is unaware - notation O(N^2) (big O n squared) means the computing time > of the algorithm increases exponentially (where exponent is 2) relative to the > size of the input. Normally this is c

Python Polymorphism

2005-05-12 Thread Carlos Moreira
Dear all, How could I use Python polymorphism? Which kind of structures Python give me to use polymorphism? Where can I find specific documentation? Thanks and Best regards. Cadu Moreira __ Do you Yahoo!? Make Yahoo! y

Re: Python Documentation (should be better?)

2005-05-12 Thread Skip Montanaro
Mike> Given that Python hides the difference between user-defined Mike> objects and built-in objects, it's not clear to me that anything Mike> other than the current system, with all the classes/types in one Mike> place, makes sense. Maybe the Module Index should be renamed "Modul

Re: urllib download insanity

2005-05-12 Thread Andrew Dalke
Timothy Smith wrote: > ok what i am seeing is impossible. > i DELETED the file from my webserver, uploaded the new one. when my app > logs in it checks the file, if it's changed it downloads it. the > impossible part, is that on my pc is downloading the OLD file i've > deleted! if i download it

Re: How "return" no return ?

2005-05-12 Thread Tim Williams
- Original Message - From: "Corrado Gioannini" <[EMAIL PROTECTED]> > On Thu, May 12, 2005 at 04:42:34PM +0100, Tim Williams wrote: > > Just don't use a return statement at all, or do something like > > > > [function body] > > if not val = None: > > return val > > [end of function]

Re: Compiling Tcl apps redux

2005-05-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: . . . >Absolutely! Looking at the wiki there are a bunch of solutions, all of >which work in specialized circumstances. Nothing like, say the "freeze" >script of Pyt

Re: Python Documentation (should be better?)

2005-05-12 Thread Mike Meyer
"Christopher J. Bottaro" <[EMAIL PROTECTED]> writes: > because there are no namespaces or classes, but still I think Python could > do something similar. Say for instance search for "append" and it will > come back with a page for list's append, a page for array's append, etc. A seperate page fo

Re: a cx_Oracle ORA-01036 problem

2005-05-12 Thread Damjan
>> SQL = """insert into D.D_NOTIFY values (:CARDREF, :BANKKEY, :OK1, :OK2 \ >> :DEBTEUR, :DEBTDEN, to_date(:INVOICE_DATE,'DD.MM.YY'), >> to_date(:PAYMENT_DEADLINE,'DD.MM.YY'), :POINTS)""" >> > Try using a variable name other than "id" for the CARDREF variable... say > "card_id".

Re: How "return" no return ?

2005-05-12 Thread Corrado Gioannini
On Thu, May 12, 2005 at 04:42:34PM +0100, Tim Williams wrote: > Just don't use a return statement at all, or do something like > > [function body] > if not val = None: > return val > [end of function] i didn't understood that. if you don't return nothing explicitly the function returns None.

Re: pyvm -- faster python

2005-05-12 Thread Andrew Dalke
Paul Rubin wrote: > Yes, there are several Python compilers already ... > It's true that CPython doesn't have a compiler and that's a serious > deficiency. A lot of Python language features don't play that well > with compilation, and that's often unnecessary. So I hope the baseline > implem

  1   2   >