Re: which feature of python do you like most?

2005-11-09 Thread Szabolcs Nagy
> which feature of python do you like most? i cannot chose one but here is my list: iterpreter (i can try out things at once) dir(obj) (using dir() i can learn a new library quickly) identation (code is readable, no need for {} and ;) dynamictyping (no type declaration -> less code to write) light

Re: A Tcl/Tk programmer learns Python--any advice?

2005-11-09 Thread Svenn Are Bjerkem
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Ah, another one leaves the fold... : \ I think I saw somebody say about OO in Python: "It's there, but you don't have to use it." Every time somebody wants OO in the core of tcl, he is asked: "Why do you want it?" If OO was as easy i

Re: How do I create a dir using Python?

2005-11-09 Thread Klaus Alexander Seistrup
Sumi wrote: > How do i create a dir using python. #v+ os.makedirs = makedirs(name, mode=511) makedirs(path [, mode=0777]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmo

$$$$$make tons of cash EASY$$$$$

2005-11-09 Thread alanmikaluk
What is $5 and 15 minutes when it can make you earn $100,000 ? Not much, if you ask me... You've probably seen a lot of those kind of messages over forums and newsgroups, and the explanation for this can be given in two words: IT WORKS! But how on earth, will you ask me, does it actually works?

tkinter and visual ocx

2005-11-09 Thread Rony
I've managed to register succesfuly an oxc with makepy and my python programm reconises the ocx. But now i have a problem to place the ocx on a tkinter frame. Perhaps somebody could show me a code snippet how to do it ? tia Rony -- http://mail.python.org/mailman/listinfo/python-list

Re: Cursor Position.

2005-11-09 Thread Juho Schultz
Samantha wrote: > I will be using Tkinter. All I need is a way to get the X,Y position from a > mouse click. I am trying to have an image loaded to click on, but that seems > to be a problem. So if I can just get the position from the screen of a > graphics program, showing an image, it will wor

Installing Tkinter on knoppix

2005-11-09 Thread Jon Monteleone
Greetings, Does anybody have a website where I can download a copy of Tkinter to install onto knoppix? Is it a pretty straightforward install? Cheers -Jon -- http://mail.python.org/mailman/listinfo/python-list

Re: Cursor Position.

2005-11-09 Thread Diez B. Roggisch
Samantha wrote: > I will be using Tkinter. All I need is a way to get the X,Y position from a > mouse click. I am trying to have an image loaded to click on, but that seems > to be a problem. So if I can just get the position from the screen of a > graphics program, showing an image, it will wor

page faults when spawning subprocesses

2005-11-09 Thread Dave Kirby
I am working on a network management program written in python that has multiple threads (typically 20+) spawning subprocesses which are used to communicate with other systems on the network. This runs fine for a while, but eventually slows down to a crawl. Running sar shows that when it is runni

Looking Python script to compare two files

2005-11-09 Thread yys2000
hi: I want to compare two PDF or WORD files. Any Help? thx -- http://mail.python.org/mailman/listinfo/python-list

Is it a bug?

2005-11-09 Thread Darren Cui Liang
Hi, there! Now I am working around with the "logging" module. Here is the code: >>> import logging >>> log1=logging.getLogger("a") >>> log1.critical("msg") No handlers could be found for logger "a" >>> logging.critical("msg") CRITICAL:root:msg Since every "logger" is under the "root logger"

Re: cx_Oracle callproc output parameters

2005-11-09 Thread Diez B. Roggisch
infidel wrote: > I have a stored procedure that has a single output parameter. Why do I > have to pass it a string big enough to hold the value it is to receive? > Why can't I pass an empty string or None? > > import cx_Oracle as oracle connection = oracle.connect('usr/[EMAIL PROTECTED]

Re: Installing Tkinter on knoppix

2005-11-09 Thread Diez B. Roggisch
Jon Monteleone wrote: > Greetings, > Does anybody have a website where I can download a copy of Tkinter to install > onto > knoppix? > Is it a pretty straightforward install? Knoppix is debian-based - you can use apt-get. But installing on a CD is impossible - do you want to alter the packages t

not able to HTTPS page from python

2005-11-09 Thread muttu2244
Hi all, Am trying to read a email ids which will be in the form of links ( on which if we click, they will redirect to outlook with their respective email ids). And these links are in the HTTPS page, a secured http page. The point is that am able to read some links with HTTP page, but am not abl

RE: Looking Python script to compare two files

2005-11-09 Thread Tim Golden
[yys2000] > I want to compare two PDF or WORD files. Could you be more precise, please? + Do you only want to compare PDF-PDF or Word-Word? Or do you want to be able to do PDF-Word? + In either case, are you only bothered about the text, or is the formatting significant? + If it's only te

Re: Is it a bug?

2005-11-09 Thread Diez B. Roggisch
Darren Cui Liang wrote: > Hi, there! > > Now I am working around with the "logging" module. Here is the code: > > > >>> import logging > >>> log1=logging.getLogger("a") > >>> log1.critical("msg") > No handlers could be found for logger "a" > >>> logging.critical("msg") > CRITICAL:root:msg >

Re: Using python for writing models: How to run models in restricted python mode?

2005-11-09 Thread Jeremy Sanders
vinjvinj wrote: > 2. restrict the amount of memory a module uses as well. For instance > how can I restrict a user from doing a = range(100) or similar > tasks so that my whole compute farm does not come down. The safest way to do this in unix is to run the model in a separate process, a

Re: Installing Tkinter on knoppix

2005-11-09 Thread Michele Simionato
sudo apt-get install python2.4-tk -- http://mail.python.org/mailman/listinfo/python-list

Re: not able to HTTPS page from python

2005-11-09 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > AM NOT GETTING ANY ERRORS EITHER BUT ITS NOT READING THE LINKS, THAT > ARE PRESENT IN THE GIVEN HTTPS PAGE HAVE YOU TRIED ADDING A PRINT STATEMENT TO THE FEED LOOP SO YOU CAN SEE WHAT YOU'RE GETTING BACK FROM THE SERVER ? -- http://mail.python.org/mailman/listin

Re: how to modify code while debugging it without having to stop and then restart debugger

2005-11-09 Thread Fabio Zadrozny
Hi Dave, Currently there is no python debugger (that I know of) that does it, altough tools are beggining to get to it (another example outside of the python world is that eclipse already does it for java). If you use the pdb (that is the command-line debugger that comes along with python), yo

Re: Application monitor

2005-11-09 Thread Magnus Lycka
dcrespo wrote: > Hi to all, > > I'd like to have an app monitor that gets rid of another app, in the > way that if it closes unspectedly, the app monitor just wake it up one > more time, and viceversa. Twisted contains such a thing. I think it's called twisted.runner, and no, it's not just for ke

Re: How to convert a number to hex number?

2005-11-09 Thread Ron Adam
Bengt Richter wrote: > On Wed, 09 Nov 2005 00:42:45 GMT, Ron Adam <[EMAIL PROTECTED]> wrote: > > >> >>Bengt Richter wrote: >> >>>On 08 Nov 2005 08:07:34 -0800, Paul Rubin wrote: >>> >>> >>> "dcrespo" <[EMAIL PROTECTED]> writes: hex(255)[2:] >

Re: python server

2005-11-09 Thread Frithiof Andreas Jensen
"linuxpld" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello > > I`m writing a program (server in future) in python. > I would like to write it in such a way that I will be able to write gui > in any language and connect to my python program and use functionality > included with

Hi, from my login i want to login as a other user ,

2005-11-09 Thread sumi
Hi, from my login i want to login as a other user , how can i do it using python. -- http://mail.python.org/mailman/listinfo/python-list

Re: page faults when spawning subprocesses

2005-11-09 Thread Kasper Dupont
Dave Kirby wrote: > > 5) WTF can I do about it? Maybe using vfork rather than fork would help. But I'm not sure that will work as intended when there are multiple threads, in fact I'm not sure fork will work either. You could have fork racing against another thread being in a critical region thus

How to use generators?

2005-11-09 Thread Ian Vincent
I have never used generators before but I might have now found a use for them. I have written a recursive function to solve a 640x640 maze but it crashes, due to exceeding the stack. The only way around this I can think of is to use Generator but I have no idea how to. The function is as b

Re: Hi, from my login i want to login as a other user ,

2005-11-09 Thread bruno at modulix
sumi wrote: > Hi, from my login i want to login as a other user , how can i do it > using python. http://www.catb.org/~esr/faqs/smart-questions.html -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http:/

Re: debugger

2005-11-09 Thread mclaugb
is there a way to only look at specific variable names in Winpdb? It takes forever to debug something when i constantly have to search for variables. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Benji York wrote: >> [EMAIL PROTECTED] wrote: >> > Benji York wrote: >> >>You mi

Re: Hi, from my login i want to login as a other user ,

2005-11-09 Thread sumi
Hi, i am very new to python , it is just 2 days i started reading abt it. I did not understand the above statement. what i want to do is , i want to login as a super user eg : $su xyz , and then i need to enter the passwd, i want to do these steps using python , how can i do it?? -- http

Re: Newb ??

2005-11-09 Thread jmdeschamps
## Here you always get 100... This is false , sorry for the wrong comment on this part, it should rather be: ## randrange is from start to end-1 the_number = random.randrange(1,101) JM (But the rest of my comment seems OK) -- http://mail.python.org/mailman/listinfo/python-list

Re: cx_Oracle callproc output parameters

2005-11-09 Thread Gerhard Häring
infidel wrote: > I have a stored procedure that has a single output parameter. Why do I > have to pass it a string big enough to hold the value it is to receive? > Why can't I pass an empty string or None? > [...] > Am I missing something obvious here? You have to use variable objects to the call

Re: Hi, from my login i want to login as a other user ,

2005-11-09 Thread Gerhard Häring
sumi wrote: > Hi, i am very new to python , it is just 2 days i started reading abt > it. I did not understand the above statement. what i want to do is , i > want to login as a super user eg : > $su xyz , and then i need to enter the passwd, i want to do these steps > using python , how can i do

triangulation

2005-11-09 Thread Shi Mu
is there any sample code to triangulation? many thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHON LOOSING FOR JAVA???????

2005-11-09 Thread Stefan Arentz
"Fcamattti" <[EMAIL PROTECTED]> writes: > Hello for everybody OH MY GOD!?!?!?!?!?!?! I BETTER FIND A NEW JOB!?!?!?!? S. -- http://mail.python.org/mailman/listinfo/python-list

Re: Goto XY

2005-11-09 Thread ale . of . ginger
OK - I added the import WConio line. But when I run import WConio print "going to x10,y10..." WConio.gotoxy(10,10) print "Done" the above, I get the following error: WConio.gotoxy(10,10) error: GetConOut Failed I installed the WConio to the ../site-packages/ folder in Python24, and when it did

Any available SAML 2.0 tools in Python ?

2005-11-09 Thread Roland Hedberg
Hi! The subject says it all. If there isn't anything already available, does anyone know about anyone working on something ? -- Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Goto XY

2005-11-09 Thread Richie Hindle
[ale.of.ginger] > WConio.gotoxy(10,10) > error: GetConOut Failed Are you running at a Windows Command Prompt, or in an IDE? As I understand it, WConio will only work in a Windows Command Prompt. -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: python server

2005-11-09 Thread Frithiof Andreas Jensen
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thee are many solutions. An XML-RPC server springs to mind as a > solution. There are several Python XML-RPC servers . Good Idea. Seems that those particular batteries are included with Python 2.2 and up: OP: See h

append to non-existing list

2005-11-09 Thread Yves Glodt
Hello, if I do this: for row in sqlsth: pkcolumns.append(row[0].strip()) etc without a prior: pkcolumns = []; I get this error on first iteration: UnboundLocalError: local variable 'pkcolums' referenced before assignment I guess that's normal as it's the way python works..

Re: triangulation

2005-11-09 Thread Robert Kern
Shi Mu wrote: > is there any sample code to triangulation? many thanks! Triangulation of what? Scattered points in a plane? 2D manifolds embedded in a 3D space? Delaunay triangulations? Constrained triangulations? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows hi

Re: append to non-existing list

2005-11-09 Thread dcrespo
Hi I think there's no way to append to a non existing list. Sorry about my question, but the English is my second language, and I don't know what is the meaning of IHMO (or IMHO). I googled and found that it means "In My Humbled Opinion", is that true? Thanks and accept my appologies for not talk

Re: Get the pid of a os.startfile(filename)

2005-11-09 Thread dcrespo
Hi! That works perfect! But how I do it in a Win98? Does the win32all library have a standard way to do it? Thank you Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: append to non-existing list

2005-11-09 Thread [EMAIL PROTECTED]
I am afraid you have to either go back to php or whatever programming language that fits your style or change your style to fit python. There is a lot I don't like about python but if you have to use it, you have to cope with it. Yves Glodt wrote: > My question is: Is there no way to append to a

Re: append to non-existing list

2005-11-09 Thread Fredrik Lundh
Yves Glodt wrote: > if I do this: > > for row in sqlsth: > pkcolumns.append(row[0].strip()) > etc > > without a prior: > > pkcolumns = []; > > I get this error on first iteration: > UnboundLocalError: local variable 'pkcolums' referenced before assignment > > I guess that's normal

Re: Application monitor

2005-11-09 Thread Daniel Crespo
Many thanks for your answers. Respect Init, I need a cross platform solution. Most of times my system will run in Win98 and XP (more on XP than 98) Respect Twisted... Mmm... I already started with another networking library (TCPServer and SimpleXMLRPCServer), and I wouldn't like to mix things bec

Re: PYTHON LOOSING FOR JAVA???????

2005-11-09 Thread Nicola Musatti
Steven D'Aprano wrote: > Alex Martelli wrote: [...] > Taking a leaf from the various publishers and author's > guilds out there... > > Obviously Google is threatening the profitability of > programmers and their ability to make a honest day's > living. Why would people hire programmers to create n

Re: append to non-existing list

2005-11-09 Thread skip
Yves> My question is: Is there no way to append to a non existing list? My question in return is: How is Python supposed to know that pkcolumns is supposed to be a list instead of some other type of object that happens to define an append() method? For example, my code might contain this cla

Re: page faults when spawning subprocesses

2005-11-09 Thread Daniel Kabs
Dave Kirby wrote: > I am working on a network management program written in python that has > multiple threads (typically 20+) spawning subprocesses which are used > to communicate with other systems on the network. ... Let me check if I got you right: You are using fork() inside a thread in a mu

Re: append to non-existing list

2005-11-09 Thread Juho Schultz
Yves Glodt wrote: > Hello, > > if I do this: > > for row in sqlsth: > pkcolumns.append(row[0].strip()) > etc > > > without a prior: > > pkcolumns = []; > > > I get this error on first iteration: > UnboundLocalError: local variable 'pkcolums' referenced before assignment > >

Re: append to non-existing list

2005-11-09 Thread [EMAIL PROTECTED]
If PHP is heavily influenced by Perl(as I read some where), the variable name determine it I believe. @myvar is an array ? [EMAIL PROTECTED] wrote: > I don't know php, but would also have to wonder how it knows to create a > list instead of an integer (for example). > Skip -- http://mail.python.

Re: append to non-existing list

2005-11-09 Thread Yves Glodt
[EMAIL PROTECTED] wrote: > Yves> My question is: Is there no way to append to a non existing list? > > My question in return is: How is Python supposed to know that pkcolumns is > supposed to be a list instead of some other type of object that happens to > define an append() method? I am fair

Re: append to non-existing list

2005-11-09 Thread Yves Glodt
[EMAIL PROTECTED] wrote: > I am afraid you have to either go back to php or whatever programming > language that fits your style or change your style to fit python. sorry for offending... I just asked a question, and now I know one more thing about python... And btw I really am surprised by the

Re: append to non-existing list

2005-11-09 Thread Yves Glodt
Juho Schultz wrote: > Yves Glodt wrote: >> Hello, >> >> if I do this: >> >> for row in sqlsth: >> pkcolumns.append(row[0].strip()) >> etc >> >> >> without a prior: >> >> pkcolumns = []; >> >> >> I get this error on first iteration: >> UnboundLocalError: local variable 'pkcolums' ref

Re: append to non-existing list

2005-11-09 Thread bruno at modulix
Yves Glodt wrote: > Hello, > > if I do this: > > for row in sqlsth: > pkcolumns.append(row[0].strip()) > etc > > > without a prior: > > pkcolumns = []; > > > I get this error on first iteration: > UnboundLocalError: local variable 'pkcolums' referenced before assignment > >

Re: append to non-existing list

2005-11-09 Thread [EMAIL PROTECTED]
Juho Schultz wrote: > Yves Glodt wrote: > > Hello, > > > > if I do this: > > > > for row in sqlsth: > > pkcolumns.append(row[0].strip()) > > etc > > > You mean you want to type "pkcolumns" only once to keep your code short? > Would something like this be useful? > > pkcolumns = [ro

Re: cx_Oracle callproc output parameters

2005-11-09 Thread Diez B. Roggisch
Gerhard Häring wrote: > You have to use variable objects to the callproc() that will hold the > output values. This is an example using three VARCHAR output parameters. Oh boy, one never stops learning... I still thing a single in-out-value is crying for a function - but in case of several parame

Re: Diff. between Class types and classic classes

2005-11-09 Thread Colin J. Williams
Bruno Desthuilliers wrote: > Colin J. Williams a écrit : > >> bruno at modulix wrote: >> >>> venk wrote: >>> Hi, can some one properly explain the differences between class types and classic classes? ... Still face problems in identifying what is what. >>> >>> >>> >>> >>> I'm not s

Re: append to non-existing list

2005-11-09 Thread Thomas Bellman
Yves Glodt <[EMAIL PROTECTED]> writes: > I guess that's normal as it's the way python works...?!? Yes, that's the way Python works. > My question is: Is there no way to append to a non existing list? The next time you go shopping at your local super-market, do *not* get a shopping-cart (or shop

PyCon 2006 Call for Tutorials

2005-11-09 Thread A.M. Kuchling
PyCon 2006 Call for Tutorials -- Enjoy teaching classes or tutorials? PyCon 2006 is looking for proposals for a pre-conference tutorials day. PyCon 2006 will be held February 24-26 in Addison, Texas (near Dallas). Tutorials will be held on February 23, at

Re: Python doc problem example: gzip module (reprise)

2005-11-09 Thread Jeffrey Schwab
Mike Meyer wrote: > "Xah Lee" <[EMAIL PROTECTED]> writes: > > >>Newsgroups: comp.lang.perl.misc >>PS: I won't cross-post as I'm not subscribed to the Python group. > > > Very wisely done. Then from Xah Lee, we get; > > >>I have cross posted it for you. > > > Proving once again that he's stu

Re: how to modify code while debugging it without having to stop and then restart debugger

2005-11-09 Thread Magnus Lycka
python wrote: > so how can i use python to debug code and change that code without having to > restart the code. I don't know how well the commercial GUIs, such as Wing IDE manage to handle debugging. Perhaps that's worth looking into. It's my impression that debugger support in Python is weaker

Re: Any available SAML 2.0 tools in Python ?

2005-11-09 Thread Robert Boyd
On 11/9/05, Roland Hedberg <[EMAIL PROTECTED]> wrote: Hi!The subject says it all.If there isn't anything already available, does anyone know aboutanyone working on something ? Have you talked to any developers of Lasso? (http://lasso.entrouvert.org) It has Python bindings, and the project also prod

Re: append to non-existing list

2005-11-09 Thread Yves Glodt
bruno at modulix wrote: > Yves Glodt wrote: >> Hello, >> >> if I do this: >> >> for row in sqlsth: >> pkcolumns.append(row[0].strip()) >> etc >> >> >> without a prior: >> >> pkcolumns = []; >> >> >> I get this error on first iteration: >> UnboundLocalError: local variable 'pkcolums'

Wrapping C functions in Pyrex and distutils problem

2005-11-09 Thread TPJ
I'm trying to get a wrapper for my C code in order to be able to use it as a module in Python. I'm doing it as follows: C code (file_c.c): --- #include void hello( int size ) { printf("Hello! %d\n", size); } --- Pyrex code (file.pyx): ---

Re: append to non-existing list

2005-11-09 Thread [EMAIL PROTECTED]
Thomas Bellman wrote: > The next time you go shopping at your local super-market, do > *not* get a shopping-cart (or shopping-basket, or any similar > container). As you pick up the things you want to buy, try > to put them into the non-existing cart. Perhaps you will then > become enlightened.

need an example of Python numarray to C++ and back again, Boost / SWIG?

2005-11-09 Thread PL
I want to pass a 2D array from Python to C++, manipulate it in C++ (for example, add 1 to each element) and pass it back to Python. With these building blocks I will be able to figure out all the rest of what I need to do for my project. I am very familiar with Python, but less so with C++ and Bo

Re: cx_Oracle callproc output parameters

2005-11-09 Thread Lao Tzu
Thanks! On 11/9/05, Gerhard Häring <[EMAIL PROTECTED]> wrote: > infidel wrote: > > I have a stored procedure that has a single output parameter. Why do I > > have to pass it a string big enough to hold the value it is to receive? > > Why can't I pass an empty string or None? > > [...] > > Am I mi

Re: struct.calcsize problem

2005-11-09 Thread Chandu
Thanks for the helpful feedback. I guessed it was the alignment issue, but could not find the exact format for changing the default. It is not mystery any more! Bengt Richter wrote: > On 7 Nov 2005 15:27:06 -0800, "Chandu" <[EMAIL PROTECTED]> wrote: > > >In using the following struct format I get t

Re: append to non-existing list

2005-11-09 Thread Yves Glodt
[EMAIL PROTECTED] wrote: > Thomas Bellman wrote: >> The next time you go shopping at your local super-market, do >> *not* get a shopping-cart (or shopping-basket, or any similar >> container). As you pick up the things you want to buy, try >> to put them into the non-existing cart. Perhaps you wi

Re: How to use generators?

2005-11-09 Thread Sybren Stuvel
Ian Vincent enlightened us with: > I have never used generators before but I might have now found a use > for them. I have written a recursive function to solve a 640x640 > maze but it crashes, due to exceeding the stack. The only way > around this I can think of is to use Generator but I have no

Re: append to non-existing list

2005-11-09 Thread Fredrik Lundh
Yves Glodt wrote: > I am fairly new to python (and I like it more and more), but I can not > answer this question... As I said, where I come from it is possible, and > how they do it is explained a little here: > http://lu.php.net/manual/en/language.types.type-juggling.php but that page doesn't d

Re: append to non-existing list

2005-11-09 Thread Yves Glodt
Max M wrote: > Yves Glodt wrote: >> bruno at modulix wrote: >> >>> Yves Glodt wrote: >>> Hello, if I do this: for row in sqlsth: pkcolumns.append(row[0].strip()) etc without a prior: pkcolumns = []; I get thi

Pythonising the vim (e.g. syntax popups)

2005-11-09 Thread Christoph Haas
Evening, I'm an addicted vim user and don't really use the IDLE for anything more than calculations where I'm too lazy to start KCalc. But one feature is very pretty: the built-in help for function calls while you type. Like you enter... var1,var2=mystring.split( ...and the IDLE shows me a pop

Re: append to non-existing list

2005-11-09 Thread Max M
Yves Glodt wrote: > bruno at modulix wrote: > >> Yves Glodt wrote: >> >>> Hello, >>> >>> if I do this: >>> >>> for row in sqlsth: >>> pkcolumns.append(row[0].strip()) >>> etc >>> >>> >>> without a prior: >>> >>> pkcolumns = []; >>> >>> >>> I get this error on first iteration: >>> U

Re: append to non-existing list

2005-11-09 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > x = "10" + 20 # should this be 30 or 1020 or "1020" or ...? > I think Perl handles this case pretty well and sane. In fact, this strict but dynamic type checking is quite painful to work with, especially the new decimal class. I can do a : decimal + int but not deci

parse data

2005-11-09 Thread py
I have some data (in a string) such as person number 1 Name: bob Age: 50 person number 2 Name: jim Age: 39 ...all that is stored in a string. I need to pull out the names of the different people and put them in a list or something. Any suggestions...besides doing data.index("name")...ov

Winpdb question

2005-11-09 Thread mclaugb
Is there any way to either restrict the number of variables displayed in the Globals or Locals section. It is a pain having to search through this list all of the time just to look at the values of variables in my program. Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Lie Hetland book: Beginning Python..

2005-11-09 Thread Vittorio
Magnus Lycka <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: Thank you for your message I found really illuminating. > Using the same symbol for both string substitutions and SQL placeholder > such as pysqlite 1 and the MySQL interface does, is not really a bright > idea in my opinion. Who

Re: append to non-existing list

2005-11-09 Thread Roy Smith
Yves Glodt <[EMAIL PROTECTED]> wrote: > My question is: Is there no way to append to a non existing list? Nope. The problem (well, part of the problem, anyway) is that when you do: foo.append (bar) what's happening is you're calling foo's append method. If foo doesn't already exist, it has n

Re: append to non-existing list

2005-11-09 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Yves Glodt <[EMAIL PROTECTED]> wrote: > > You mean you want to type "pkcolumns" only once to keep your code short? > > Would something like this be useful? > > > > pkcolumns = [row.strip() for row in sqlsth] > > I will look into this, maybe it's what I need, than

Re: Web automation

2005-11-09 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > The contribution of Paul Boddie is valuable. I too examined DCOP > and even chose as browser Konqueror, being a KDE application. > But DCOP doesn't go to such a low level. It is not possible > to send a simulated keystroke from one KDE application to another. I imagine t

Re: Winpdb question

2005-11-09 Thread Gerhard Häring
mclaugb wrote: > Is there any way to either restrict the number of variables displayed in the > Globals or Locals section. It is a pain having to search through this list > all of the time just to look at the values of variables in my program. IMO, if you have too many locals or globals then th

Re: Lie Hetland book: Beginning Python..

2005-11-09 Thread Gerhard Häring
Vittorio wrote: > [...] > Nonetheless, I was unable to find any documentation about such a > different behaviour between Pysqlite and Pysqlite2; from my beginner > point of view the Pysqlite (Magnus' version) paramstyle looks a better > and more pythonic choice and I don't grasp the Pysqlite2 de

Re: A Tcl/Tk programmer learns Python--any advice?

2005-11-09 Thread Robert Hicks
Svenn Are Bjerkem wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] says... > > Ah, another one leaves the fold... : \ > > I think I saw somebody say about OO in Python: "It's there, but you > don't have to use it." Every time somebody wants OO in the core of tcl, > he is asked: "Why d

seeking ncpfs library bindings for Python

2005-11-09 Thread Martin Maney
After hacking up a first cut that works through the existing ncpfs CLI tools, I was looking to move to a more integrated solution (if only to avoid so many spawns of external tasks just to, eg., update a queue's pending print job list). I couldn't find any hint of such a thing - the long-gone ndsl

Re: append to non-existing list

2005-11-09 Thread Steven D'Aprano
On Wed, 09 Nov 2005 13:46:52 +0100, Yves Glodt wrote: > My question is: Is there no way to append to a non existing list? > > I am lazy for declaring it first, IMHO it bloats the code, and (don't > know if it's good to say that here) where I come from (php) I was used > to not-needing it... Bu

Re: Invoking Python from Python

2005-11-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: . . . >Since Cameron didn't provide examples, let me grab a simple one. The >cheetah templating system works by creating Python programs from the >template.

Re: parse data

2005-11-09 Thread MooMaster
If you know the indices of where the data should be in your string, you can use substrings... ie: >>> stringy = " Happy Happy Cow, 50, 1234 Your Mom's House AllTheTime,USA " >>> stringy[0:16] ' Happy Happy Cow' If the data isn't set all the time (for example, and address doesn't have a mandatory

Re: Hi, from my login i want to login as a other user ,

2005-11-09 Thread Steven D'Aprano
On Wed, 09 Nov 2005 04:01:00 -0800, sumi wrote: > Hi, i am very new to python , it is just 2 days i started reading abt > it. I did not understand the above statement. what i want to do is , i > want to login as a super user eg : > $su xyz , and then i need to enter the passwd, i want to do these

Re: parse data

2005-11-09 Thread MooMaster
If you know the indices of where the data should be in your string, you can use substrings... ie: >>> stringy = " Happy Happy Cow, 50, 1234 Your Mom's House AllTheTime,USA " >>> stringy[0:16] ' Happy Happy Cow' If the data isn't set all the time (for example, and address doesn't have a mandatory

Make an exe file as a Windows Service

2005-11-09 Thread Daniel Crespo
Hi to all, How can I install an exe file as a service through Python? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: parse data

2005-11-09 Thread Dennis Benzinger
py schrieb: > I have some data (in a string) such as > > person number 1 > > Name: bob > Age: 50 > > > person number 2 > > Name: jim > Age: 39 > > ...all that is stored in a string. I need to pull out the names of the > different people and put them in a list or something. Any > suggest

Re: PIL-> Tkinter

2005-11-09 Thread Fredrik Lundh
"Tuvas" <[EMAIL PROTECTED]> wrote > Is there a way to put an image loaded from PIL into a TKinter GUI? > Without converting the image to a .bmp, and using a canvas? If that's > the only way it'll work, I'll take it, but... It would be nice > otherwise... hmm. is google down today? here's a rand

Re: Wrapping C functions in Pyrex and distutils problem

2005-11-09 Thread Diez B. Roggisch
Use additional_objects: LINKBASE = "link-4.1b" setup( name = "LinkWrapper", ext_modules = [ Extension("link", ["link.pyx"], include_dirs = ["%s/include" % LINKBASE], extra_objects = glob.glob("%s/obj/*" % LINKBASE), ) ], cmdclass

Re: PIL-> Tkinter

2005-11-09 Thread Kevin Walzer
Tuvas wrote: > Is there a way to put an image loaded from PIL into a TKinter GUI? > Without converting the image to a .bmp, and using a canvas? If that's > the only way it'll work, I'll take it, but... It would be nice > otherwise... > Can you use PIL to convert it to a GIF? Tk can display GIF's

PIL-> Tkinter

2005-11-09 Thread Tuvas
Is there a way to put an image loaded from PIL into a TKinter GUI? Without converting the image to a .bmp, and using a canvas? If that's the only way it'll work, I'll take it, but... It would be nice otherwise... -- http://mail.python.org/mailman/listinfo/python-list

Re: how to modify code while debugging it without having to stop and then restart debugger

2005-11-09 Thread Steven D'Aprano
On Tue, 08 Nov 2005 13:38:28 -0500, python wrote: > thanks for all that have replied so far. > i still find it __very__ hard to believe that i cannot edit code inside a > function while debugging it. You write a function: def myfunct(s): # input arg s is a string foo = s*3 bar = s.u

Re: parse data

2005-11-09 Thread Micah Elliott
On Nov 09, Dennis Benzinger wrote: > Use the re module: > > import re > your_data = """person number 1 > > Name: bob > Age: 50 > > > person number 2 > > Name: jim > Age: 39""" > > names = [] > for match in re.finditer("Name:(.*)", your_data): > names.append(match.group(1)) > print names

Re: PIL-> Tkinter

2005-11-09 Thread robert . dowell
I have an app that I wrote to move images from a camera/portable media to an archive directory. It is using TKInter and PIL to display each jpg as it is transfered. I can email you the code if you would like. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyFLTK - an underrated gem for GUI projects

2005-11-09 Thread Claudio Grondi
> So I hope this humble message might inspire some folks to have a serious > look at pyfltk. For many situations, PyFLTK can take you to break-even > point quickly, and deliver net savings in time and effort after that. Animated by your posting I have downloaded: fltk-1.1.6-source.zip (3.073.43

  1   2   3   >