In message <[EMAIL PROTECTED]>,
Serge Orlov <[EMAIL PROTECTED]> writes
>The next step is to find out what type of objects contributes to the
>growth most of all,
Shame you aren't on Windows, as Python Memory Validator does all of
this.
>after that print several object of that type that
>didn't
[EMAIL PROTECTED] wrote:
> I am a newbie to Python. I want to call python functions from C. I
> looked for examples but I couldn't get any simple one. Lets say my
> python code is :
> def add(a,b)
> return (a+b)
>
> I want to call add from C. Could anybody please help me? Thanks in
> advance
Dennis Lee Bieber wrote:
> On 11 May 2006 17:02:51 -0700, "placid" <[EMAIL PROTECTED]> declaimed the
> following in comp.lang.python:
>
>
> > I have a thread that has a job Queue, it continuosly polls this queue
> > to see if there are any jobs for it, what i really wont to be able to
> > do is, w
Lad enlightened us with:
> I use Python 2.3.
> I have heard about decorators in Python 2.4.
> What is the decorator useful for?
A whole lot of stuff. I've used them for:
- Logging all calls to a function, including its arguments.
- Ensuring there is a database connection before the functio
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 nothing patronizing about the question, it's merely an
enquiry to a po
jayessay wrote:
> "Michele Simionato" <[EMAIL PROTECTED]> writes:
> I can't get this to work at all - syntax errors (presumably you must
> have 2.5?, I only have 2.4).
You can download Python 2.5 from www.python.org, but the important bit,
i.e. the use of threading.local to get thread-local variab
Hi Sven,
I don't have Matlab on my computer so the following is just a wild guess:
As far as I know you can include C code into Matlab or at least into
Simulink. Maybe you could try to execute your Python script in that C code?
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Sybren Stuvel 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 nothing patronizing about the questio
"Lad" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I use Python 2.3.
> I have heard about decorators in Python 2.4.
> What is the decorator useful for?
> Thanks for reply
> L.
>
Check out these examples on the Python wiki:
http://wiki.python.org/moin/PythonDecoratorLibrary
I've go
> Is there any reason why there isn't any python library that makes
> using soap as easy as how microsoft .net makes it.
SOAP with Python is easy too in a different sort of way. I don't know
about the equivalent for autogenerating WSDL bit as in .NET.
#!/usr/bin/env python
def hello():
return "
hi
say i have a text file
line1
line2
line3
line4
line5
line6
abc
line8 <---to be delete
line9 <---to be delete
line10 <---to be delete
line11 <---to be delete
line12 <---to be delete
line13 <---to be delete
xyz
line15
line16
line17
line18
I wish to delete lines that are in between 'abc' and
Hi all,
http://pyadmin.blogspot.com/
THis is my blog and This is related to python utilities for system and
network administration.plz comment on this
regards
Vineesh Kumar
begin:vcard
fn:Vineesh Kumar
n:Kumar;Vineesh
email;internet:[EMAIL PROTECTED]
tel;work:0484 2337929
tel;home:0480 2793090
[EMAIL PROTECTED] wrote:
> hi
> say i have a text file
>
> line1
> line2
> line3
> line4
> line5
> line6
> abc
> line8 <---to be delete
> line9 <---to be delete
> line10 <---to be delete
> line11 <---to be delete
> line12 <---to be delete
> line13 <---to be delete
> xyz
> line15
> line16
> lin
Thanks guys ! Growing and learning :)
--
http://mail.python.org/mailman/listinfo/python-list
Edward Elliott wrote:
(snip)
>>don a écrit :
>>
>>>Also if there is a better way than using regex, please let me know.
>>
(snip)
>
> I wouldn't call these better (or worse) than regexes, but a slight variation
> on the above:
>
> marker = s.index('/CHECKEDOUT')
> branch = s [s.rindex('/', 0, mark
wrote:
> hi
> say i have a text file
>
> line1
> line2
> line3
> line4
> line5
> line6
> abc
> line8 <---to be delete
> line9 <---to be delete
> line10 <---to be delete
> line11 <---to be delete
> line12 <---to be delete
> line13 <---to be delete
> xyz
> line15
> line16
> line17
> line18
>
<[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED]
> hi
> say i have a text file
>
> line1
> line2
> line3
> line4
> line5
> line6
> abc
> line8 <---to be delete
> line9 <---to be delete
> line10 <---to be delete
> line11 <---to be delete
> line12 <---to be delete
> line13 <---to b
placid enlightened us with:
> its always said that (in programming) that the easiest solution to a
> problem is hard to find
Yeah, that's true allright!
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take th
Lad wrote:
> I use Python 2.3.
> I have heard about decorators in Python 2.4.
What Python 2.4 adds is only syntactic sugar for decorators. You can do
the same - somewhat more explicitely - in 2.3.
> What is the decorator useful for?
FWIW, I'm not sure the name 'decorator' is such a great idea. A
Mirco Wahab wrote:
> In Python, you have to deconstruct
> the 2D-lists (here: long list of
> short lists [a,2] ...) by
> 'slicing the slice':
>
>char,num = list[:][:]
>
> in a loop and using the apropriate element then:
>
>import re
>
>t = 'a1a2a3Aa4a35a6b7b8c9c';
>r = r'(\w)(?=(.
which files?
On Fri, 12 May 2006 [EMAIL PROTECTED] wrote:
> Send Python-list mailing list submissions to
> python-list@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.python.org/mailman/listinfo/python-list
> or, via email, send a message with su
Fredrik Lundh wrote:
> hint:
>
> $ python -c 'import sys; print sys.argv' 'else: print "no"'
>
>
Yeah the man page knows all.
About the only time I use python on the command line is with the timeit
module, which evals all arguments given. Hence the confusion.
--
Edward Elliott
UC Berke
Aww shoot, I never knew that!! LOL, I implemented my own worker thread
class using a mutex protected job list and a pair of connected sockets
for interprocess communication when I could just have used the darn
Queue module instead. Gr hehe.
--
http://mail.python.org/mailman/listinfo/pyth
bruno at modulix wrote:
> parts = s.replace(' ', '/').strip('/').split('/')
> branch = parts[parts.index('CHECKEDOUT') - 1]
>
> Edward Elliott wrote:
>>
>> marker = s.index('/CHECKEDOUT')
>> branch = s [s.rindex('/', 0, marker) + 1 : marker]
>
> Much cleaner than mine. I shouldn't try to code w
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?
Thanks,
Andreas
The C# method:
public static string Encrypt(string decrypted)
{
Ravi Teja wrote:
> Python has zip imports (similar to Java's jar files). You can put all
> your *.py files in a zip file and access them from it if this means so
> much to you.
Python also supports "frozen" modules, where the module bytecode is
linked into a Python interpreter as data. by combin
On 12/05/2006 6:11 PM, Ravi Teja wrote:
> [EMAIL PROTECTED] wrote:
>> hi
>> say i have a text file
>>
>> line1
[snip]
>> line6
>> abc
>> line8 <---to be delete
[snip]
>> line13 <---to be delete
>> xyz
>> line15
[snip]
>> line18
>>
>> I wish to delete lines that are in between 'abc' and 'xyz' and pr
[EMAIL PROTECTED] wrote:
> hi
> say i have a text file
>
> line1
> line2
> line3
> line4
> line5
> line6
> abc
> line8 <---to be delete
> line9 <---to be delete
> line10 <---to be delete
> line11 <---to be delete
> line12 <---to be delete
> line13 <---to be delete
> xyz
> line15
> line16
> lin
Hi,
I want to create a function that preprocesses a file and then imports
the parsed file.
What I found out is that you can do something like this:
def ImportFile(fileName):
parsedCode = Parser(fileName).Parse()
module = new.module(name)
exec parsedCode in module.__dict__
sys.mod
hello everyone!
sorry to disturb you with this, but i really cant find anything
suitable about the topic in the numarray documentation.
how can i find in an efficient way the index of the last occurrence of
a given element in a numarray array?
many thanks in advance!
--
http://mail.python.org/mai
> [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 but of values. So it doesn't make
se
Hello,
as the subject says, for an embedded application i need a 100% pure
python webserver that can talk to a FCGI process (which runs ruby on
rails). Of couse it also must be able to use simple CGI.
Please don't ask why i want a python webserver for a ruby application.
I just need it.
--
htt
bruno at modulix" wrote:
> *please* re-read carefully what I and Diez wrote earlier in this thread
> before jumping to possibly erroneous conclusion. I didn't say that the
> problem *actually* was with Python - just that it *may* have to do with
> a memory management issue fixed in 2.5.
the only
Heiko Wundram wrote:
> PIL isn't known to have any memory leaks, by the way (AFAICT), just to confirm
> what I've written before, but the effbot should be of more help here...
PIL is heavily used in 24/7 production systems, often by people who knows a lot
about how to run mission critical systems
Does anybody know what happened to the "Vaults of Parnassus" site at
http://www.vex.net/~x/parnassus/?
"Dr Dobb's weekly Python news" still claims that it "ambitiously
collects references to all sorts of Python resources." But I have the
impression that it does not do this any more since April
Butternut squash wrote:
> Is there any reason why there isn't any python library that makes
> using soap as easy as how microsoft .net makes it.
>
> I mean I write rudimentary asmx files call them from a webbrowser.
> The WSDL is generated and then there is documentation and a form to
> invoke a
glomde wrote:
> Hi,
>
> I want to create a function that preprocesses a file and then imports
> the parsed file.
>
> What I found out is that you can do something like this:
>
> def ImportFile(fileName):
> parsedCode = Parser(fileName).Parse()
> module = new.module(name)
> exec parse
bruno at modulix wrote:
> [EMAIL PROTECTED] wrote:
>
(snip)
>
> Don't know if it's better for your actual use case, but this avoids
> reading up the whole file:
> def skip(iterable, skipfrom, skipuntil):
> """ example usage :
> >>> f = open("/path/to/my/file.txt")
> >>> for line in s
Fredrik Lundh wrote:
(snip)
> to print to a file instead of stdout, just replace the print line with a
> f.write call.
>
Or redirect stdout to a file when calling the program !-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTEC
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?
Don.
--
http://mail.python.org/mailman/listinfo/python-list
Tim Chase wrote:
(snip)
> starLines = [line for line in p.readlines() if line.startswith("*")]
files are iterators, so no need to use readlines() (unless it's an old
Python version of course):
starLines = [line for line in p if line.startswith("*")]
> or you may optionally want to prune of the "
Fredrik Lundh wrote:
> bruno at modulix" wrote:
>
>
>>*please* re-read carefully what I and Diez wrote earlier in this thread
>>before jumping to possibly erroneous conclusion. I didn't say that the
>>problem *actually* was with Python - just that it *may* have to do with
>>a memory management is
Carl J. Van Arsdall wrote:
(snip)
> I just wanted to make the comment that there already exists a
> Condition() class in the threading module. If you plan on using your
> class with the threading module you might wish to use another name.
>
As far as I remember, Python has namespaces, so I don't
[...]
> >
> I'm not convinced by this. You have to recognise that the function is using
> tail recursion, and then you have to modify the code to know that it is
> using tail recursion. This is not always trivial. For example, the given
> example is:
>
> @tail_recursion
> def factorial(n, acc=1):
>
> I wish to delete lines that are in between 'abc' and
> 'xyz' and print the rest of the lines. Which is the best
> way to do it?
While this *is* the python list, you don't specify whether
this is the end goal, or whether it's part of a larger
program. If it *is* the end goal (namely, you just wan
[EMAIL PROTECTED] wrote:
> how can i find in an efficient way the index of the last occurrence of
> a given element in a numarray array?
Something like that:
>>> where(arange(100) == 10)
(array([10]),)
>>> _[-1][-1]
10
Or:
>>> your_array = arange(10)
>>> value = 3
>>> indices = where(your_array
Hi,
Does anyone know how I can create an Active Desktop window from within
a Python script? It would also be good to know how to refresh that
window and nothing else.
At present I have an application which writes to a file which is read
by the Active Desktop (embeded IE), then a refresh command
Tim N. van der Leeuw wrote:
>
> I don't know why it wouldn't work this way, or why it isn't
> tail-recursion?
>From the google page do "define: tail recursion"
> I tried the tail_recursion decorator from the cookbook-recipe with both
> definitions of factorial, and I tried both definitions of the
[EMAIL PROTECTED] wrote:
> Hello,
>
> i posted for suggestions a little idea even if it still needs further
> thoughts but as i'm sure you could help :)
>
> if would like to implement some kind of Condition class which i coud
> use to build bricks of more complex condition, conditions are based o
Am Donnerstag 11 Mai 2006 18:49 schrieb [EMAIL PROTECTED]:
> "importing math" as far as I can tell right now, invokes a shared
> library (math.so). Now I have a shared library dependency that I dont
> want. Is there a way to get the math functionality from a dot a or a
> dot o, so I dont have t
>>starLines = [line for line in p.readlines() if line.startswith("*")]
>
> files are iterators, so no need to use readlines() (unless it's an old
> Python version of course):
>
> starLines = [line for line in p if line.startswith("*")]
Having started with some old Python, it's one of those
thin
Am Donnerstag 11 Mai 2006 18:07 schrieb Michele Petrazzo:
> Heiko Wundram wrote:
> > As was said before: as long as you keep a reference to an object, the
> > object's storage _will not be_ reused by Python for any other objects
> > (which is sensible, or would you like your object to be overwritte
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> g] On Behalf Of pydev
> Sent: Tuesday, April 11, 2006 9:23 PM
> Subject: multi-threaded c++ callback problem
>
> void pyCallEventCallback( CALL hCall,
> LINE hLine,
>
Tim Chase wrote:
>>> starLines = [line for line in p.readlines() if line.startswith("*")]
>>
>>
>> files are iterators, so no need to use readlines() (unless it's an old
>> Python version of course):
>>
>> starLines = [line for line in p if line.startswith("*")]
>
>
> Having started with some old
Hi Michele,
I'm sorry, but you misunderstood me.
There are two definitions of the factorial() function, one given by the
OP and the other given by Duncan.
I tested both factorial() definitions with, and without the
tail_recursion decorator (the version of the OP). So I had 4
factorial-functions
Hi,
Are there any (even prototypes/proof of concept) gdm/kdm/xdm.../-style
packages written in Python ?
Regards,
Philippe
--
http://mail.python.org/mailman/listinfo/python-list
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 where
these scripts are sup
"bruno at modulix" schrieb
>
> What Python 2.4 adds is only syntactic sugar for decorators.
> You can do the same - somewhat more explicitely - in 2.3.
>
> > What is the decorator useful for?
>
>
> The whole things looks like this:
>
> def deco(func):
> print "decorating %s" % func.__name_
thanks alot!!
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 12 May 2006 07:29:54 -0500,
Tim Chase <[EMAIL PROTECTED]> wrote:
>> I wish to delete lines that are in between 'abc' and
>> 'xyz' and print the rest of the lines. Which is the best
>> way to do it?
> While this *is* the python list, you don't specify whether
> this is the end goal, or whe
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 recursion?
Tail recursion is when a function calls itself a
> I reeducated my fingers after having troubles with huge files !-)
I'll keep it in mind...the prospect of future trouble with
large files is a good kick-in-the-pants to remember.
>>Otherwise, just to be informed, what advantage does rstrip() have over
>>[:-1] (if the two cases are considered un
Duncan Booth wrote:
> Tim N. van der Leeuw wrote:
>
[...]
> @tail_recursion
> def factorial2(n):
> # do the stuff
> pass
>
> your 'do the stuff' actually had an erroneous call to 'factorial'. If you
> are going to rename the function you have to rename the recursive calls as
> well. (At le
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.
>
In particular, if the last line o
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
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
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
"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
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),
[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
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
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
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
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
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
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
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
[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
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
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
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,
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
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
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
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
>>> 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
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
"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
"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
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
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
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.
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 '
"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,
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
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):
...
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
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
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 =
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
1 - 100 of 164 matches
Mail list logo