Re: distributing a app frozen by cx_freeze

2006-05-12 Thread Carl Banks
Flavio wrote: > Traceback (most recent call last): > File > "/home/fccoelho/Downloads/cx_Freeze-3.0.2/initscripts/Console.py", line > 26, in ? > File "epigrass.py", line 4, in ? > ImportError: /home/flavio/freeze/qt.so: undefined symbol: > _ZNK9QSGIStyle9classNameEv > > It is looking for the Or

Re: Broken essays on python.org

2006-05-12 Thread Tim Parkin
Steven Bethard wrote: > Brian Cole wrote: > >>I'm not sure if this is the proper place to post this... >> >>A lot of the essays at http://www.python.org/doc/essays/ have a messed >>up layout in Firefox and IE. > > > The proper place to post this is to follow the "Report website bug" link > at t

Re: where do you run database scripts/where are DBs 'located'?

2006-05-12 Thread Gerard Flanagan
John Salerno wrote: > Ok, I've been browsing through the MySQLdb docs, and I *think* I know > the kind of code I need to write (connect, cursor, manipulate data, > commmit, etc. -- although I probably need to get more familiar with > actual SQL commands too), but here's my problem: I don't know whe

Re: where do you run database scripts/where are DBs 'located'?

2006-05-12 Thread John Salerno
BartlebyScrivener wrote: > Add the mysql db to your datasources using Administrative > Tools/Datasources(ODBC). Once that's done it's simple to access it, > using mxODBC. > > I'm assuing you are on Windows XP? > > Here's mxODBC > > http://www.egenix.com/files/python/mxODBC.html > > and you'll

How to pass variables between scripts

2006-05-12 Thread Gross, Dorit (SDRN)
Title: How to pass variables between scripts Dear list, I am an absolute newbie to python and would appreciate your help very much  :) I am trying to write a little python script that wraps a set of external scripts. The external scripts are either also written in python or are simple bas

Re: where do you run database scripts/where are DBs 'located'?

2006-05-12 Thread BartlebyScrivener
Add the mysql db to your datasources using Administrative Tools/Datasources(ODBC). Once that's done it's simple to access it, using mxODBC. I'm assuing you are on Windows XP? Here's mxODBC http://www.egenix.com/files/python/mxODBC.html and you'll need the MySql connector http://dev.mysql.com/

Re: where do you run database scripts/where are DBs 'located'?

2006-05-12 Thread BartlebyScrivener
John, I had nothing but trouble connecting to my Access and MySql dbs until I started using mxODBC. Search on it in this group, and you'll find the links that were given to me and that I've shared with others. It works like a charm. If you come up short, I'll send you the links. I can't dig them

Re: getting rid of pass

2006-05-12 Thread John Machin
On 13/05/2006 11:40 AM, David Murmann wrote: > Hi all! > > i just had this crazy idea: You said it. > late-in-the-night idea. You said it again. > > what do you people think? I agree with you. -- http://mail.python.org/mailman/listinfo/python-list

Re: getting rid of pass

2006-05-12 Thread Terry Reedy
"David Murmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > i just had this crazy idea: Agreed ;-) > instead of > while cond(): >pass > write > while cond(). Viewing statememts as functions of the program state, pass is the identity function/statement. Many languages ha

Re: How to install pyTrix?

2006-05-12 Thread Robert Kern
DeepBlue wrote: > Hi all, > > can any1 please tell me how to install pyTrix? Apparently, you put pytrix.py and any of the other modules that it depends on (you can look at the top of the file) where Python can see it. http://docs.python.org/tut/node8.html#SECTION00811 -- Robert

getting rid of pass

2006-05-12 Thread David Murmann
Hi all! i just had this crazy idea: instead of while cond(): pass write while cond(). or try: import xyz except ImportError: pass compared to try: import xyz except ImportError. i don't know whether this is syntactically unambiguous or replaces all uses of pass, but i find

Re: Python Translation of C# DES Encryption

2006-05-12 Thread Paul Rubin
Gary Doades <[EMAIL PROTECTED]> writes: > http://twhiteman.netfirms.com/des.html I'm not sure if that's the same DES lib that I used in a project last year but as I remember, the lib I used had a bug in 3DES CBC mode that made it give answers incompatible with the NIST test vectors. It took consi

distributing a app frozen by cx_freeze

2006-05-12 Thread Flavio
Hi, After a good deal of tunig I managed to freeze my application. I ended up with an executable, and a Bunch of .so files in the install-dir. It runs fine in the original machine. I copied the install folder to another machine but the executable wont run. Here's the traceback: Traceback (most

Re: where do you run database scripts/where are DBs 'located'?

2006-05-12 Thread John Salerno
John Salerno wrote: > Traceback (most recent call last): >File "C:\Python24\myscripts\db_test.py", line 6, in -toplevel- > db='bbdatabank') >File "C:\Python24\lib\site-packages\MySQLdb\__init__.py", line 66, in > Connect > return Connection(*args, **kwargs) >File "C:\Python2

How to install pyTrix?

2006-05-12 Thread DeepBlue
Hi all, can any1 please tell me how to install pyTrix? thx! -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Everything else responded to separately, but... > I'd like to see a demonstration that using the same binding syntax for special > and lexical variables buys you something apart from bugs. Buys me something? Why do I have to sell simplicity, transparency, and clean syntax on c.l.python? kenny

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Paul Rubin wrote: > Alexander Schmolck <[EMAIL PROTECTED]> writes: > >>>(defvar *x*) ;; makes it special >>>(setf *x* 1) >>>(print *x*) ;;-> 1 >>>(let ((*x* 2)) >>> (print *x*)) ;; -> 2 >>>(print *x*) ;; -> 1 >> >>You seem to think that conflating special variable bindi

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Alexander Schmolck wrote: > Duane Rettig <[EMAIL PROTECTED]> writes: > > >>Alexander Schmolck <[EMAIL PROTECTED]> writes: >> >> >>>Ken Tilton <[EMAIL PROTECTED]> writes: >>> >>> In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Ken Tilton <[EMAIL PROTECTED]> writes: > Alexander Schmolck wrote: > > Ken Tilton <[EMAIL PROTECTED]> writes: > > > > >>In Common Lisp we would have: > >> > >>(defvar *x*) ;; makes it special > >>(setf *x* 1) > >>(print *x*) ;;-> 1 > >>(let ((*x* 2)) > >> (print *x*)) ;; ->

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
jayessay <[EMAIL PROTECTED]> writes: > > Great -- so can I see some code? Can't be that difficult, it takes about > > 10-15 > > lines in python (and less in scheme). > > Do you actually need the code to understand this relatively simple concept??? Yes. I'd be genuinely curious to see how an imp

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Duane Rettig <[EMAIL PROTECTED]> writes: > My reason for responding to you in the first place was due to your poor use > of the often misused term "bug". You could have used many other words or > phrases to describe the situation, and I would have left any of those alone. I'm happy to accept you

Re: unzip zip files

2006-05-12 Thread Edward Elliott
Marcelo Ramos wrote: > DataSmash escribió: >> file into the subdirectory, but unzips the contents into the >> root (current) directory. I want the contents of the zip file >> unloaded into the newly created subdirectory where the zip file is. >> > > See "-d" zip's parameter in man zip. or chang

Re: compiling module from string and put into namespace

2006-05-12 Thread Edward Elliott
glomde wrote: > Tanks but that isn't what I am looking for. > I really want a function that you can call and imports > the module into the calling functions namespace. > > I dont want the caller to call import but a function. come again? >>> type (__builtins__.__import__) -- Edward Elliott

Re: Slow network reading?

2006-05-12 Thread Ivan Voras
Andrew MacIntyre wrote: > Comparative CPU & memory utilisation statistics, not to mention platform > and version of Python, would be useful hints... During benchmarking, all versions cause all CPU to be used, but Python version has ~1.5x more CPU time allocated to it than PHP. Python is 2.4.1

Re: compiling module from string and put into namespace

2006-05-12 Thread glomde
Tanks but that isn't what I am looking for. I really want a function that you can call and imports the module into the calling functions namespace. I dont want the caller to call import but a function. -- http://mail.python.org/mailman/listinfo/python-list

Re: unzip zip files

2006-05-12 Thread Marcelo Ramos
DataSmash escribió: > I need to unzip all zip file(s) in the current directory > into their own subdirectories. The zip file name(s) always > start with the string "usa" and end with ".zip". > The code below will make the subdirectory, move the zip > file into the subdirectory, but unzips the cont

Re: find all index positions

2006-05-12 Thread John Machin
On 13/05/2006 1:55 AM, vbgunz wrote: > I forgot to explain my reason for over shadowing the 'string' built-in > within my iterator. To me, it doesn't matter because the string > identifier is temporary within the function and dies when the function > dies. Also, I personally don't use the string fu

Re: How to pass variables between scripts?

2006-05-12 Thread Marcelo Ramos
Gross, Dorit (SDRN) escribió: > Dear list, > > I am an absolute newbie to python and would appreciate your help very much > :) > > I am trying to write a little python script that wraps a set of external > scripts. The external scripts are either also written in python or are simple > bash scripts.

LocaWapp 09 - localhost web applications (add thread, add "Request" object, new "locawapp_main" function, fixed files.py, " ...)

2006-05-12 Thread .
http://daviderognoni.blogspot.com?locawapp - MAIN NEWS === * add thread * add "Request" object * new "locawapp_main" function * fixed files.py * ... - DESCRIPTION = LocaWapp want use HTML and Python not only for the web, but also for the local applications: Local + HTML +

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Duane Rettig
Alexander Schmolck <[EMAIL PROTECTED]> writes: > Duane Rettig <[EMAIL PROTECTED]> writes: > >> Alexander Schmolck <[EMAIL PROTECTED]> writes: >> >> > Ken Tilton <[EMAIL PROTECTED]> writes: >> > >> >> In Common Lisp we would have: >> >> >> >> (defvar *x*) ;; makes it special >> >> (setf *

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread jayessay
Alexander Schmolck <[EMAIL PROTECTED]> writes: > Ken Tilton <[EMAIL PROTECTED]> writes: > > > Alexander Schmolck wrote: > > > jayessay <[EMAIL PROTECTED]> writes: > > > > > > > >>"Michele Simionato" <[EMAIL PROTECTED]> writes: > > >> > > >> > > >>>I was interested in a proof of concept, to show

Re: having trouble importing a module from local directory

2006-05-12 Thread Marcelo Ramos
vduber6er escribió: > First off this is in unix. > > I have a C file that has python embedded in it. In the script I have > the following > > PyRun_SimpleString(code); > > where > code = "import mymodule" > > however I get this error > > Traceback (most recent call last): > File "", line 1, in ?

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread jayessay
Ken Tilton <[EMAIL PROTECTED]> writes: > Alexander Schmolck wrote: > > jayessay <[EMAIL PROTECTED]> writes: > > > >>"Michele Simionato" <[EMAIL PROTECTED]> writes: > >> > >> > >>>I was interested in a proof of concept, to show that Python can > >>>emulate Lisp special variables with no big effort.

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread jayessay
Alexander Schmolck <[EMAIL PROTECTED]> writes: > Ken Tilton <[EMAIL PROTECTED]> writes: > > > In Common Lisp we would have: > > > > (defvar *x*) ;; makes it special > > (setf *x* 1) > > (print *x*) ;;-> 1 > > (let ((*x* 2)) > >(print *x*)) ;; -> 2 > > (print *x*) ;; -

Re: where do you run database scripts/where are DBs 'located'?

2006-05-12 Thread John Salerno
John Salerno wrote: > If more information is needed, I will try my local DB when I get home > later. Ok, here we go: import MySQLdb db = MySQLdb.connect(host='localhost', user='johnjsal', passwd='seinfeld', db='bbdatabank') cu

Re: which windows python to use?

2006-05-12 Thread Robert Kern
Don Taylor wrote: > Robert Kern wrote: > >>>Which C compiler will you be using for the Enthought 2.4 Windows release? >> >>Define "using". We build Python with whatever compiler the official build is >>compiled with. In this case, MSVC 7., I think . For this release, we >>will ship the latest avai

Re: find all index positions

2006-05-12 Thread John Machin
On 13/05/2006 1:45 AM, vbgunz wrote: > Hello John, > > Thank you very much for your pointers! I decided to redo it and try to > implement your suggestion. I think I did a fair job and because of your > suggestion have a better iterator. Thank you! > > def indexer(string, substring, overlap=1): >

unzip zip files

2006-05-12 Thread DataSmash
I need to unzip all zip file(s) in the current directory into their own subdirectories. The zip file name(s) always start with the string "usa" and end with ".zip". The code below will make the subdirectory, move the zip file into the subdirectory, but unzips the contents into the root (current) d

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Alexander Schmolck wrote: > Ken Tilton <[EMAIL PROTECTED]> writes: > > >>In Common Lisp we would have: >> >>(defvar *x*) ;; makes it special >>(setf *x* 1) >>(print *x*) ;;-> 1 >>(let ((*x* 2)) >> (print *x*)) ;; -> 2 >>(print *x*) ;; -> 1 > > > You seem to think tha

Re: Python Translation of C# DES Encryption

2006-05-12 Thread Gary Doades
On Fri, 12 May 2006 11:00:23 +0200, Andreas Pauley <[EMAIL PROTECTED]> wrote: >Hi all, > >I'm trying to implement a Python equivalent of a C# method that encrypts >a string. >My Python attempt is in the attached file, but does not return the same >value as the C# method (see below). > >Any hints

Re: which windows python to use?

2006-05-12 Thread Don Taylor
Robert Kern wrote: >>Which C compiler will you be using for the Enthought 2.4 Windows release? > > > Define "using". We build Python with whatever compiler the official build is > compiled with. In this case, MSVC 7., I think . For this release, we > will ship the latest available gcc available

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Duane Rettig <[EMAIL PROTECTED]> writes: > Alexander Schmolck <[EMAIL PROTECTED]> writes: > > > Ken Tilton <[EMAIL PROTECTED]> writes: > > > >> In Common Lisp we would have: > >> > >> (defvar *x*) ;; makes it special > >> (setf *x* 1) > >> (print *x*) ;;-> 1 > >> (let ((*x* 2)) >

Re: Time to bundle PythonWin

2006-05-12 Thread jUrner
The ctypes.com package is no longer part of ctypes. It has been split by Thomas Heller into a separate package comtypes. See: http://sourceforge.net/projects/comtypes/ Still in its childhood but as easy as com can get, I guess, way easier and better than pythonWin at least. Juergen -- http

Re: Time to bundle PythonWin

2006-05-12 Thread Martin v. Löwis
Dave Benjamin wrote: > Why is PythonWin (win32all) still a separate download from a third > party? Is it legal, technical, or what? I think it's about time it be > part of the standard distribution. Both legal and technical. The PythonWin author and maintainer (Mark Hammond) hasn't contributed thi

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Paul Rubin
Alexander Schmolck <[EMAIL PROTECTED]> writes: > > (defvar *x*) ;; makes it special > > (setf *x* 1) > > (print *x*) ;;-> 1 > > (let ((*x* 2)) > >(print *x*)) ;; -> 2 > > (print *x*) ;; -> 1 > > You seem to think that conflating special variable binding and lexical > va

Re: New tail recursion decorator

2006-05-12 Thread Casey Hawthorne
Your examples are not tail recursive because an extra step is needed before returning from the function call and that step cannot be thrown away! Alexander Schmolck <[EMAIL PROTECTED]> wrote: >def even(n): >return n == 0 or not odd(n-1) > >def odd(n): >return n == 1 or not even(n-1) > --

having trouble importing a module from local directory

2006-05-12 Thread vduber6er
First off this is in unix. I have a C file that has python embedded in it. In the script I have the following PyRun_SimpleString(code); where code = "import mymodule" however I get this error Traceback (most recent call last): File "", line 1, in ? ImportError: No module named mymodule Obje

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Ken Tilton <[EMAIL PROTECTED]> writes: > Alexander Schmolck wrote: > > jayessay <[EMAIL PROTECTED]> writes: > > > > >>"Michele Simionato" <[EMAIL PROTECTED]> writes: > >> > >> > >>>I was interested in a proof of concept, to show that Python can > >>>emulate Lisp special variables with no big effo

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Duane Rettig
Alexander Schmolck <[EMAIL PROTECTED]> writes: > Ken Tilton <[EMAIL PROTECTED]> writes: > >> In Common Lisp we would have: >> >> (defvar *x*) ;; makes it special >> (setf *x* 1) >> (print *x*) ;;-> 1 >> (let ((*x* 2)) >>(print *x*)) ;; -> 2 >> (print *x*) ;; -> 1 > > Y

Re: New tail recursion decorator

2006-05-12 Thread Duncan Booth
Kay Schluehr wrote: > Duncan Booth wrote: > >> The decorator also fails for functions which are tail-recursive but >> which contain other non-tail recursive calls within themselves. For >> example I would be pretty sure you couldn't write a working >> implementation of Ackermann's function using

Re: New tail recursion decorator

2006-05-12 Thread Terry Reedy
"Alexander Schmolck" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Duncan Booth <[EMAIL PROTECTED]> writes: >> Tail recursion is when a function calls itself and then immediately >> returns >> the result of that call as its own result. Which means that the value returned by the

Re: Decorator

2006-05-12 Thread Martin Blume
"bruno at modulix" schrieb > > [lucid introduction into decorators] > Thanks for the help in understanding decorators. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Ken Tilton <[EMAIL PROTECTED]> writes: > In Common Lisp we would have: > > (defvar *x*) ;; makes it special > (setf *x* 1) > (print *x*) ;;-> 1 > (let ((*x* 2)) >(print *x*)) ;; -> 2 > (print *x*) ;; -> 1 You seem to think that conflating special variable binding and

Re: Discussion: Python and OpenMP

2006-05-12 Thread Paul McGuire
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey everyone, > > I know I've posted several questions regarding python and python's > parallel capabilities so bear with me as I've never attempted to incite > discussion. However, today I'm interested in sparking

Re: Broken essays on python.org

2006-05-12 Thread Steven Bethard
Brian Cole wrote: > I'm not sure if this is the proper place to post this... > > A lot of the essays at http://www.python.org/doc/essays/ have a messed > up layout in Firefox and IE. The proper place to post this is to follow the "Report website bug" link at the bottom of the sidebar and post a

Re: deleting texts between patterns

2006-05-12 Thread Ravi Teja
>> I don't think that's what you really meant ^ 2 Right! That was very buggy. That's what I get for posting past 1 AM :-(. -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Alexander Schmolck wrote: > jayessay <[EMAIL PROTECTED]> writes: > > >>"Michele Simionato" <[EMAIL PROTECTED]> writes: >> >> >>>I was interested in a proof of concept, to show that Python can >>>emulate Lisp special variables with no big effort. >> >>OK, but the sort of "proof of concept" given

Re: How to get a part of string which follows a particular pattern usingshell script

2006-05-12 Thread Edward Elliott
Anthra Norell wrote: > This is the third problem today which I propose to solve with my stream > editor SE. If the group thinks it could be useful I would submit it the > moment I'm done with the doc, which is in the final stage. You keep saying that and getting no response, so I'll take a stab a

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Michele Simionato wrote: > jayessay wrote: > >>I was saying that you are mistaken in that pep-0343 could be used to >>implement dynamically scoped variables. That stands. > > > Proof by counter example: > > from __future__ import with_statement > import threading > > special = threading.loc

Re: nix logon in Python

2006-05-12 Thread Philippe Martin
Philippe Martin wrote: > Hi, > > Are there any (even prototypes/proof of concept) gdm/kdm/xdm.../-style > packages written in Python ? > > Regards, > > Philippe I guess to further define my problem: I am looking for clues as to how to launch an X11 session (remote or not) from a Python-TKint

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-12 Thread Edward Elliott
Piet van Oostrum wrote: >> [EMAIL PROTECTED] (T) wrote: > >>T> As you can see, the "constant" A can be modified this easily. But if >>T> there were an intuitive mechanism to declare a symbol to be immutable, >>T> then there won't be this problem. > > Mutability is not a property of symbols b

Broken essays on python.org

2006-05-12 Thread Brian Cole
I'm not sure if this is the proper place to post this... A lot of the essays at http://www.python.org/doc/essays/ have a messed up layout in Firefox and IE. -Brian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Translation of C# DES Encryption

2006-05-12 Thread Edward Elliott
Andreas Pauley wrote: > Hi all, > > I'm trying to implement a Python equivalent of a C# method that encrypts > a string. > My Python attempt is in the attached file, but does not return the same > value as the C# method (see below). > > Any hints? I can't tell from the code you posted what a DE

Re: Tkinter: ability to delete widgets from Text and then re-add them

2006-05-12 Thread nholtz
Sigh. Of course, near the middle is supposed to be: delete the last one from Text widget = widgets[-1] -- http://mail.python.org/mailman/listinfo/python-list

How to pass variables between scripts?

2006-05-12 Thread Gross, Dorit (SDRN)
Title: How to pass variables between scripts? Dear list, I am an absolute newbie to python and would appreciate your help very much  :) I am trying to write a little python script that wraps a set of external scripts. The external scripts are either also written in python or are simple b

Tkinter: ability to delete widgets from Text and then re-add them

2006-05-12 Thread nholtz
Is there any way to delete a widget (window) from a Text widget, and then add it back to the Text, without re-creating the original widget. For example, I think I would like to do something like the following: ## from Tkinter import * root =

Re: Decorator

2006-05-12 Thread bruno at modulix
Martin Blume wrote: > "bruno at modulix" schrieb > >>[snip] >> >>The use case for @decorator is for wrapping functions >>or method *in the module/class itself*. > > That was the question. What's the use of doing it > like that in the module *itself* Readability. Since the decoration (in the

Re: [OT] Unix Tools (was: deleting texts between patterns)

2006-05-12 Thread Edward Elliott
Dan Sommers wrote: > Or even > > awk '/abc/,/xyz/' file.txt > > Excluding the abc and xyz lines is left as an exercise to the > interested reader. Once again, us completely disinterested readers get the short end of the stick. :) -- Edward Elliott UC Berkeley School of Law (Boalt Hall) com

Wrong args when issuing a SIGUSR1 signal

2006-05-12 Thread Sori Schwimmer
Hi All, Say I launch a shell under KDE and start typing: $ python Python 2.4.2 (#10, Feb 16 2006, 17:44:37) [GCC 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7. on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> def fn(a=0,b=0): ...

Re: which windows python to use?

2006-05-12 Thread Robert Kern
James Stroud wrote: > Robert Kern wrote: > >>James Stroud wrote: >> >>>Enthought does not play well with cygwin, I've noticed. >> >>In what way? Does the mingw gcc that we distribute interfere with Cygwin's >>gcc? > > One can not run the enthought python interactive interpreter from a > cygwin

Re: Decorator

2006-05-12 Thread Martin Blume
"bruno at modulix" schrieb > > > > Well, if you're changing the original module, > Who's talking about "changing the original module" ? > Well, you have to apply @deco in the module where func_to_decorated is placed. > > > Isn't the point of a decorator to change the > > behavior externally,

Re: which is better, string concatentation or substitution?

2006-05-12 Thread bruno at modulix
Ted wrote: > Thank you Roy. > > It seems if you lurk here long enough you eventually get all you > questions answered without even asking! > ;-) > +1 QOTW please avoid top-posting, and please avoid posting back a long message just to add three lines. -- bruno desthuilliers python -c "print '

Re: How to get a part of string which follows a particular pattern usingshell script

2006-05-12 Thread Anthra Norell
This is the third problem today which I propose to solve with my stream editor SE. If the group thinks it could be useful I would submit it the moment I'm done with the doc, which is in the final stage. Frederic >>> se = SE.SE (' ~addr=[0-9.]+~==(10) | addr\== ') >>> string = """(a)test="192.168.

Discussion: Python and OpenMP

2006-05-12 Thread Carl J. Van Arsdall
Hey everyone, I know I've posted several questions regarding python and python's parallel capabilities so bear with me as I've never attempted to incite discussion. However, today I'm interested in sparking discussion over having an OpenMP style of interface in python. For those of you famili

Re: Decorator

2006-05-12 Thread bruno at modulix
Martin Blume wrote: > "Sybren Stuvel" schrieb > >>Martin Blume enlightened us with: > > Don't know if I enlightened anybody ... :-) Not sure... But let's hope someone else having doubts about @decorator will find this thread, so we won't have to point him/her to the documentation. >>>Another q

Re: Decorator

2006-05-12 Thread Martin Blume
"bruno at modulix" schrieb > > [snip] > > The use case for @decorator is for wrapping functions > or method *in the module/class itself*. That was the question. What's the use of doing it like that in the module *itself* (I mean, you change directly the original function)? > It's not for modul

Re: Decorator

2006-05-12 Thread Martin Blume
"Sybren Stuvel" schrieb > Martin Blume enlightened us with: Don't know if I enlightened anybody ... :-) > > Another question: Isn't decorating / wrapping > > usually done at runtime, so that the @deco > > notation is pretty useless (because you'd > > have to change the original code)? > > Pleas

Best Mobile Devices for Python

2006-05-12 Thread Jeremy Winters
I have a project where I need to remote control one computer through a wireless tcp/ip connection in my home through a linksys router.I know there are versions of python that have been ported to mobile devices... but the whole arena of mobile devices is kind of intimidating... as it's hard to get t

Re: Reg Ex help

2006-05-12 Thread Anthra Norell
>>> se = SE.SE (' "~/[A-Za-z0-9_]+/CHECKEDOUT~==" | /= CHECKEDOUT=') >>> se ('/main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT') 'dbg_for_python' If I understand your problem, this might be a solution. It is a stream editor I devised on the impression that it could handle in a

Re: New tail recursion decorator

2006-05-12 Thread Alexander Schmolck
Duncan Booth <[EMAIL PROTECTED]> writes: > Tim N. van der Leeuw wrote: > > > The other thing I do not understand, due to my limited understanding of > > what is tail-recursion: factorial2 (Duncan's definition) is not proper > > tail-recursion. Why not? How does it differ from 'real' tail recursio

TkTable for info gathering

2006-05-12 Thread Gary Wessle
Hi I just finished with 1.5 tutorials about Tkinter, my thought is to use a table "maybe TkTable" to gather info from the user as to what file to chart data from, as well as info provided by the TkTable properties. each cell of the table will be either empty or contains a file path, let x=1 be t

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
jayessay <[EMAIL PROTECTED]> writes: > "Michele Simionato" <[EMAIL PROTECTED]> writes: > > > I was interested in a proof of concept, to show that Python can > > emulate Lisp special variables with no big effort. > > OK, but the sort of "proof of concept" given here is something you can > hack up

Re: which windows python to use?

2006-05-12 Thread Robert Kern
Don Taylor wrote: > Robert Kern wrote: > >>In what way? Does the mingw gcc that we distribute interfere with Cygwin's >>gcc? > > Robert: > > Which C compiler will you be using for the Enthought 2.4 Windows release? Define "using". We build Python with whatever compiler the official build is co

Re: New tail recursion decorator

2006-05-12 Thread Kay Schluehr
Duncan Booth wrote: > The decorator also fails for functions which are tail-recursive but which > contain other non-tail recursive calls within themselves. For example I > would be pretty sure you couldn't write a working implementation of > Ackermann's function using the decorator: > > def Ack(M,

Re: Replace

2006-05-12 Thread Anthra Norell
se = SE.SE (r' "~=.~=\=#') >>> se ('tyrtrbd =ffgtyuf == =tyryr =u=p ff') 'tyrtrbd =#fgtyuf =# =#yryr =#=# ff' I am in the final stages of documenting my stream editor SE. There are quite a few problems raised on this list which SE would handle elegantly. Where do I propose it for distribu

Re: which windows python to use?

2006-05-12 Thread Robert Kern
Robert Kern wrote: > James Stroud wrote: > >>Robert Kern wrote: >> >>>James Stroud wrote: >>> Enthought does not play well with cygwin, I've noticed. >>> >>>In what way? Does the mingw gcc that we distribute interfere with Cygwin's >>>gcc? >> >>One can not run the enthought python interactive

Re: listener program in Python

2006-05-12 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > >>I basically want to remotely shut down windows from linux and write >>such a program in python. > FWIW, s/from linux/from another machine/ -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p

Re: NEWBIE: Tokenize command output

2006-05-12 Thread bruno at modulix
Duncan Booth wrote: > bruno at modulix wrote: > > >>>Otherwise, just to be informed, what advantage does rstrip() have over >>>[:-1] (if the two cases are considered uneventfully the same)? >> >>1/ if your line doesn't end with a newline, line[:-1] will still remove >>the last caracter. >> > > I

Re: Decorator

2006-05-12 Thread bruno at modulix
Martin Blume wrote: > "bruno at modulix" schrieb > (snip) >>def deco(func): >> print "decorating %s" % func.__name__ >> def _wrapper(*args, **kw): >>print "%s called " % func.__name__ >>res = func(*args, **kw) >>print "%s returned %s" % (func.__name__, str(res)) > > return re

Re: Time to bundle PythonWin

2006-05-12 Thread Dave Benjamin
On Thu, 11 May 2006, Alex Martelli wrote: > Dave Benjamin <[EMAIL PROTECTED]> wrote: > ... >> It's time to bundle PythonWin. > > No: the Python Standard Distribution, in 2.5, includes instead ctypes, > which is lower-level than PythonWin but more general (exists for other > platforms, lets you c

Re: Decorator

2006-05-12 Thread Sybren Stuvel
Martin Blume enlightened us with: > Another question: Isn't decorating / wrapping usually done at > runtime, so that the @deco notation is pretty useless (because you'd > have to change the original code)? Please explain why that would make the @deco notation pretty useless. Sybren -- The proble

Re: find all index positions

2006-05-12 Thread vbgunz
I forgot to explain my reason for over shadowing the 'string' built-in within my iterator. To me, it doesn't matter because the string identifier is temporary within the function and dies when the function dies. Also, I personally don't use the string function and prefer ''.join('hi'), etc. Also, a

Re: where do you run database scripts/where are DBs 'located'?

2006-05-12 Thread John Salerno
CatDude wrote: > On Fri, 12 May 2006 14:01:51 +, John Salerno wrote: > >> Ok, I've been browsing through the MySQLdb docs, and I *think* I know >> the kind of code I need to write (connect, cursor, manipulate data, >> commmit, etc. -- although I probably need to get more familiar with >> ac

Re: find all index positions

2006-05-12 Thread vbgunz
Hello John, Thank you very much for your pointers! I decided to redo it and try to implement your suggestion. I think I did a fair job and because of your suggestion have a better iterator. Thank you! def indexer(string, substring, overlap=1): '''indexer(string, substring, [overlap=1]) -> int

Re: listener program in Python

2006-05-12 Thread simon . hibbs
[EMAIL PROTECTED] wrote: > I basically want to remotely shut down windows from linux and write > such a program in python. You probably don't need to write a service in windows for this. All you need is to write your Linux python program with an SNMP library and configure the Windows box to accep

Re: where do you run database scripts/where are DBs 'located'?

2006-05-12 Thread CatDude
On Fri, 12 May 2006 14:01:51 +, John Salerno wrote: > Ok, I've been browsing through the MySQLdb docs, and I *think* I know > the kind of code I need to write (connect, cursor, manipulate data, > commmit, etc. -- although I probably need to get more familiar with > actual SQL commands too),

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread jayessay
"Michele Simionato" <[EMAIL PROTECTED]> writes: > I was interested in a proof of concept, to show that Python can > emulate Lisp special variables with no big effort. OK, but the sort of "proof of concept" given here is something you can hack up in pretty much anything. So, I wouldn't call it es

listener program in Python

2006-05-12 Thread diffuser78
I want to write a simple clinet/server program that does the following. On Windows, the program listens to the request from linux box On Linux Box, client program send server a shutdown request and the program at server i.e windows shuts windows sown, I basically want to remotely shut down windo

Re: Threads

2006-05-12 Thread Grant Edwards
On 2006-05-12, Sybren Stuvel <[EMAIL PROTECTED]> wrote: > placid enlightened us with: >>> Did you read the documentation for Queue methods? >> >> there is no need to be patronizing about this dude, im just learning >> Python in my spare time, as im a Intern Software Engineer > > There is nothin

Re: Threads

2006-05-12 Thread Grant Edwards
On 2006-05-12, antred <[EMAIL PROTECTED]> wrote: Nerver knew what? Please quote for context. > Aww shoot, I never knew that!! http://docs.python.org/lib/QueueObjects.html get([block[, timeout]]) Remove and return an item from the queue. If optional args block is true and timeout is

  1   2   >