Re: testing '192.168.1.4' is in '192.168.1.0/24' ?

2005-10-23 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > Is there standard library modules handling this ? currently I need to > turn it into a long integer and do the shift and compare. A little Googling turned up this: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440560 -Peter -- http://mail.python.org/mailman/

Re: Syntax across languages

2005-10-23 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On Sun, 23 Oct 2005 20:59:46 -0400, Mike Meyer <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > >> Hopefully user defined. Rexx has a global control that lets you set >> the number of digits to be considered significant in doing an

hello

2005-10-23 Thread hydrol-eo
The message contains Unicode characters and has been sent as a binary attachment. KWF Email scanner was unable to check following file (i.e. corrupted/encrypted zip archive): Name: doc.zip Content type: application/octet-stream This file was removed by Firewall. -- http://m

Re: Microsoft Hatred FAQ

2005-10-23 Thread Roedy Green
On Sun, 23 Oct 2005 23:16:24 GMT, Roedy Green <[EMAIL PROTECTED]> wrote or quoted : >>As well as blame. The commercialization of the Internet was grossly >>mismanaged. Take the InterNIC - please! > >As global bureaucracies go, I think they have done a good job. Can >you imagine herding the cats o

Re: output from external commands

2005-10-23 Thread James Colannino
Mike Meyer wrote: >This is a scripting language feature. Python doesn't have direct >support for it, any more than C++ does. To get that functionality, you >want to use either the os.popen function, or - preferable, but only >available in newer Pythons - the subprocess module. > > Thanks. Jame

testing '192.168.1.4' is in '192.168.1.0/24' ?

2005-10-23 Thread [EMAIL PROTECTED]
Hi, Is there standard library modules handling this ? currently I need to turn it into a long integer and do the shift and compare. -- http://mail.python.org/mailman/listinfo/python-list

Re: output from external commands

2005-10-23 Thread Mike Meyer
James Colannino <[EMAIL PROTECTED]> writes: > Hey everyone. First off, I'm new to the list. I had had a little bit > of experience with Perl before discovering Python. The more Python I > learn, the more I love it :) I just have a quick question to ask. I > know that this is probably a simple

Re: Syntax across languages

2005-10-23 Thread bearophileHUGS
Thank you for all the answers, some people have already answered for me about most details I don't agree :-) Mike Meyer>Rexx has a global control that lets you set the number of digits to be considered significant in doing an FP equality test.< Mathematica too, I think. Tom Anderson>There are a

Re: An interesting question about "print '\a'"

2005-10-23 Thread [EMAIL PROTECTED]
I thought that is just a "terminal" thing(extend ASCII that interpreted by the terminal)? If you have a terminal attached to a host, shouldn't this be making sound on the terminal rather than the server ? This not alsa or output to the server device, but straightly sending '\a' back to the client m

Re: An interesting question about "print '\a'"

2005-10-23 Thread Chris F.A. Johnson
On 2005-10-24, Anthony Liu wrote: > We know that if we do > > print '\a' > > the bell will sound. > > Now, why do I hear the sound on my local machine when > I run a python script on a remote host? > > I understand if I hear it when I do > > print '\a' > > on my local machine. > > Does the command

Re: An interesting question about "print '\a'"

2005-10-23 Thread Erik Max Francis
Anthony Liu wrote: > We know that if we do > > print '\a' > > the bell will sound. > > Now, why do I hear the sound on my local machine when > I run a python script on a remote host? Because print '\a' just prints the BEL ASCII character, which most terminals respond by beeping. Since, when

output from external commands

2005-10-23 Thread James Colannino
Hey everyone. First off, I'm new to the list. I had had a little bit of experience with Perl before discovering Python. The more Python I learn, the more I love it :) I just have a quick question to ask. I know that this is probably a simple question, but I've been googling around, and par

An interesting question about "print '\a'"

2005-10-23 Thread Anthony Liu
We know that if we do print '\a' the bell will sound. Now, why do I hear the sound on my local machine when I run a python script on a remote host? I understand if I hear it when I do print '\a' on my local machine. Does the command get sent back to the client machine? Thanks. ___

Re: High Order Messages in Python

2005-10-23 Thread [EMAIL PROTECTED]
counting that out(regardless whether it is (dis)advantage or not), what else a block can do but not a named function ? Alex Martelli wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > could someone enlighten me what is the advantage of block over named > > function ? > > > > One thing tha

Re: High Order Messages in Python

2005-10-23 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > could someone enlighten me what is the advantage of block over named > function ? > > One thing that I can see a difference may be lexical scope ? "Yes, but" -- according to the latest Ruby book, the "mixed lexical scope" of blocks is a highly contr

Re: High Order Messages in Python

2005-10-23 Thread [EMAIL PROTECTED]
could someone enlighten me what is the advantage of block over named function ? One thing that I can see a difference may be lexical scope ? vdrab wrote: > On a (somewhat) related note, > I've always wondered whether it is possible to emulate ruby blocks > using a python generator '+ alpha'. In m

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
"Alan Connor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > AC You wouldn't be this Alan Connor would you: http://www.killfile.org/dungeon/why/connor.html DS -- http://mail.python.org/mailman/listinfo/python-list

Re: High Order Messages in Python

2005-10-23 Thread gene tani
http://www.artima.com/intv/closures.html http://www.rubyist.net/~matz/slides/oscon2005/index.html It's a read-write closure, a co-routine, sort of a continuation (tho Kernel.callcc is considered the real continuation mechanism). And you can make it a Proc object (basically an unbound object you ca

Re: Tricky Areas in Python

2005-10-23 Thread Alex Martelli
Andrew Durdin <[EMAIL PROTECTED]> wrote: > On 10/24/05, Alex Martelli <[EMAIL PROTECTED]> wrote: > > I may branch out into more advanced stuff such as asking > > for an example use case for a closure, a custom descriptor, or an import > > hook, for example > > Isn't that approaching things from t

OSDC 2005 Registration

2005-10-23 Thread Richard Jones
G'day folks, This is a quick note to let you know that registrations for Australia's second Open Source Developers' Conference are now open. Last year's conference was a huge hit with 60 high quality talks running in three streams over three days. If you weren't able to join us last year make s

Re: High Order Messages in Python

2005-10-23 Thread vdrab
On a (somewhat) related note, I've always wondered whether it is possible to emulate ruby blocks using a python generator '+ alpha'. In my limited understanding of the ruby block, the generator can inject values into a block, I suppose, but what is the block itself? can it be a function? a class in

Re: Tricky Areas in Python

2005-10-23 Thread Andrew Durdin
On 10/24/05, Alex Martelli <[EMAIL PROTECTED]> wrote: > I may branch out into more advanced stuff such as asking > for an example use case for a closure, a custom descriptor, or an import > hook, for example Isn't that approaching things from the wrong angle? You're asking them to synthesise a pro

Re: IDE recommendation please

2005-10-23 Thread Brendan
As mentioned, there isn't a whole lot. I've beta tested Komodo, and it looks promising. SPE might start working now that stani has a mac. For now I use TextWrangler - a free text editor with good python support. http://www.barebones.com/products/textwrangler/index.shtml For interactive python,

Re: Microsoft Hatred FAQ

2005-10-23 Thread Matt Garrish
"Alan Connor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > /kooks/alanconnor.shtml Yeah, that pretty much sums it up... Matt -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-23 Thread Matt Garrish
"David Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Matt Garrish" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>>A right is a scope of authority. That is, a sphere within which one's >>> decision is sovereign. > >> Then why were you claiming

Re: Syntax across languages

2005-10-23 Thread Mike Meyer
Tom Anderson <[EMAIL PROTECTED]> writes: > On Sun, 23 Oct 2005, Fredrik Lundh wrote: >> [EMAIL PROTECTED] wrote: >>> - ~== for approximate FP equality >> str(a) == str(b) > This is taken from the AI 754 standard, i take it? :) > > Seriously, that's horrible. Fredrik, you are a bad man, and

Re: how to count and extract images

2005-10-23 Thread Mike Meyer
Joe <[EMAIL PROTECTED]> writes: > start = s.find(' stop = s.find('">Save File', > start) fileName = s[start:stop] > and then construct the url with the filename to download the image > which works fine as cause every image has the Save File link and I can > count number of images easy the problem

Re: Tricky Areas in Python

2005-10-23 Thread Alex Martelli
PyPK <[EMAIL PROTECTED]> wrote: > What possible tricky areas/questions could be asked in Python based > Technical Interviews? I like to present code that seems like it should work, but has some kind of relatively subtle problem, either of correctness in some corner case, or of performance, etc --

Re: how to count and extract images

2005-10-23 Thread Alex Martelli
Joe <[EMAIL PROTECTED]> wrote: > I'm trying to get the location of the image uisng > > start = s.find(' stop = s.find('">Save File', > start) fileName = s[start:stop] > and then construct the url with the filename to download the image > which works fine as cause every image has the Save File l

Re: Syntax across languages

2005-10-23 Thread Alex Martelli
Tom Anderson <[EMAIL PROTECTED]> wrote: ... > What would approximate FP equality even mean? How approximate? In APL, it meant "to within [a certain quad-global whose name I don't recall] in terms of relative distance", i.e., if I recall correctly, "a=b" meant something like "abs(a-b)/(abs(a)+ab

All kind of download just here

2005-10-23 Thread aasava
All What You Are Looking For And More Hello Dear friend... Here http://s14.invisionfree.com/SaVaTaGe4eVeR/ you can find all what you are looking for in all the internet to download it like ... New Applications just here http://s14.invisionfree.com/SaVaTaGe4eVeR/index.php?showtopic=94 New Mov

how to count and extract images

2005-10-23 Thread Joe
I'm trying to get the location of the image uisng start = s.find('Save File', start) fileName = s[start:stop] and then construct the url with the filename to download the image which works fine as cause every image has the Save File link and I can count number of images easy the problem is when

Re: Syntax across languages

2005-10-23 Thread Tom Anderson
On Sun, 23 Oct 2005, Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > >> - ~== for approximate FP equality > > str(a) == str(b) This is taken from the AI 754 standard, i take it? :) Seriously, that's horrible. Fredrik, you are a bad man, and run a bad railway. However, looking at the

Re: Microsoft Hatred FAQ

2005-10-23 Thread Roedy Green
On Sat, 22 Oct 2005 19:54:58 -0300, "Shmuel (Seymour J.) Metz" <[EMAIL PROTECTED]> wrote or quoted : >As well as blame. The commercialization of the Internet was grossly >mismanaged. Take the InterNIC - please! As global bureaucracies go, I think they have done a good job. Can you imagine herdin

Re: calling a dylib in python on OS X

2005-10-23 Thread Victor Ng
You can use Pyrex which will generate a C module for you. vic On 22 Oct 2005 23:40:17 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > Is there something similar to python's windll for calling DLLs on win32 > but meant for calling dylib's on OS X? > > thanks, > > r.s. > > -- > http://

Re: Tricky Areas in Python

2005-10-23 Thread Chris Curvey
I usually start by asking how you make variables "private" within classes. That seems to tell me if they understand something about the design of the language and it's a quick filter to tell if they know something about the syntax. The other question that I use is asking about 3rd party libraries

Re: Microsoft Hatred FAQ

2005-10-23 Thread Steven D'Aprano
On Sun, 23 Oct 2005 13:52:38 -0700, David Schwartz wrote: > The court's determination of the relevent > market, on wich all of their other decisions were predicated, was arbitrary > and bizarre, and the law did not provide any notice of how the market would > be determined. You keep saying tha

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
"Matt Garrish" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >>A right is a scope of authority. That is, a sphere within which one's >> decision is sovereign. > Then why were you claiming that a government can infringe on a person's > rights if those rights are not codified

Re: Microsoft Hatred FAQ

2005-10-23 Thread Alan Connor
"Matt Garrish" wrote: That does it. From this point on my newsfilter is killing (leaving on the server) any articles cross-posted to more than three groups. To all of the snivelling punks polluting the Usenet with their verbal diarrhea here: Shut up and go away. Done. (I haven't read a single

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "David Schwartz" <[EMAIL PROTECTED]> writes: >>> Instead, you outline a class of actions and tag them >>> all as illegal. That's why we have laws against assault and battery >>> and unsafe driving. And laws against exerc

Re: Python variables are bound to types when used?

2005-10-23 Thread Tom Anderson
On Sat, 22 Oct 2005, Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > >>> reset your brain: >>> >>> http://effbot.org/zone/python-objects.htm Is it really a good idea to say that objects have names? Isn't it cleaner to describe objects without any reference to names or variables or whatnot

Re: Microsoft Hatred FAQ

2005-10-23 Thread Steven D'Aprano
On Sun, 23 Oct 2005 11:43:44 -0700, David Schwartz wrote: > You are dishonest, lying sack of shit. And David posts his true colours to the mast at last. When rational argument and logical thoughts fails, fall back on personal insults. -- Steven. -- http://mail.python.org/mailman/listinf

Re: Microsoft Hatred FAQ

2005-10-23 Thread Matt Garrish
"David Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Matt Garrish" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> I'd be interested in hearing what you think a right is? > >A right is a scope of authority. That is, a sphere within which one's

Re: Tricky Areas in Python

2005-10-23 Thread PyPK
hmm Thats one thing. Also I was thinking of something like benefites of python over other languages. Probably that coould be one ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-23 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: >> Instead, you outline a class of actions and tag them >> all as illegal. That's why we have laws against assault and battery >> and unsafe driving. And laws against exercising monopoly power in an >> unfair manner. > Interesting how you, again, equ

Re: IDE recommendation please

2005-10-23 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 microsnot wrote: | I'm new to Python but am wondering what IDE Python developers use? I use Mac | OS X 10.4.2. I have PythonIDE which comes with MacPython but I don't think | that has even rudimentary "intellisense". Xcode and Eclipse don't seem to | s

Re: IDE recommendation please

2005-10-23 Thread Steve Holden
Gian Mario Tagliaretti wrote: > microsnot wrote: > > >>I'm new to Python but am wondering what IDE Python developers use? I use >>Mac OS X 10.4.2. I have PythonIDE which comes with MacPython but I don't >>think that has even rudimentary "intellisense". Xcode and Eclipse don't >>seem to support Py

PyGTK color blackout

2005-10-23 Thread egbert
Without success I try to understand the color mechanism in PyGTK. It's about the classes Color an Colormap, and their methods and related functions and other paraphernalia. If anyone knows about a tutorial-like systematic description, I will be very grateful. -- Egbert Bouwman - Keizersgracht 197

Hengelsportbeurs

2005-10-23 Thread Henk-Jan de Jong
http://www.drentorganisatiebureau.nl/beurs/indexfront.html Nog zin om te gaan? -- http://mail.python.org/mailman/listinfo/python-list

TurboGears the Podcast

2005-10-23 Thread rdsteph
Can be found at http://www.awaretek.com/python/index.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
"Matt Garrish" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd be interested in hearing what you think a right is? A right is a scope of authority. That is, a sphere within which one's decision is sovereign. > In Florida, for example, you have the right to gun someone do

Re: Tricky Areas in Python

2005-10-23 Thread Gerhard Häring
PyPK wrote: > What possible tricky areas/questions could be asked in Python based > Technical Interviews? I would try to check if the applicant understands the Python data model: http://docs.python.org/ref/objects.html Because I thinkt that's fundamental to understanding the Python language and

Re: Localized strftime()

2005-10-23 Thread Sebastjan Trepca
Great, it works, thanks :) On 23/10/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Sebastjan Trepca wrote: > > > I'm trying to get a localized date format from strftime() but it seems > > that is doesn't have any parameters for that or any information about > > this issue in Python docs. > > > > F

Tricky Areas in Python

2005-10-23 Thread PyPK
What possible tricky areas/questions could be asked in Python based Technical Interviews? -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-23 Thread Matt Garrish
"David Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> David claimed that everyone had a right to do whatever they wanted >> with their property. This is simply false throughout most of the

Re: Microsoft Hatred FAQ

2005-10-23 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: ... > David claimed that everyone had a right to do whatever they wanted > with their property. This is simply false throughout most of the > civilized world - zoning laws control what kinds of business you can Incidentally, the perfectly good rationale fo

Re: wxpython - passing arg to wx.app OnInit

2005-10-23 Thread Peter Hansen
Stuart McGraw wrote: > I simplied the my code for posting. In my real program, the > thing being passed is not a command line argument per se, > but the result of signifigant processing dependent on the > command line argument. I do not want to repeat that > processing in the wx.App method. > W

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > David claimed that everyone had a right to do whatever they wanted > with their property. This is simply false throughout most of the > civilized world - zoning laws control what kinds of business you can > run on your pr

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In comp.lang.perl.misc David Schwartz <[EMAIL PROTECTED]> wrote: >> "Mike Meyer" <[EMAIL PROTECTED]> wrote in message >>> Sorry, but nobody but the government actually owns property. In most >>> places, you can't make non-trivial cha

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I am not saying Microsoft did not know the law. I am saying that no rational person could have expected the law to be applied to Microsoft that way it was. The law *must* put a person on notice of pr

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 22 Oct 2005 18:02:44 -0700, David Schwartz wrote: >> I see you are a totalitarianist or perhaps a communist. If you want >> to >> live in America and discuss things that are relevent to America, let me

Re: Microsoft Hatred FAQ

2005-10-23 Thread David Schwartz
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> No, not at all. It is the gravest act of self-contradiction to >> maintain >> that one should be allowed to pursue one's own interest while denying >> that >> same right to others. > This is perhaps the most

Re: Localized strftime()

2005-10-23 Thread Fredrik Lundh
Sebastjan Trepca wrote: > I'm trying to get a localized date format from strftime() but it seems > that is doesn't have any parameters for that or any information about > this issue in Python docs. > > For example I want to turn this: > 19 Oct, 2005 > to this(slovene language): > 19 Okt, 2005 you

Re: IDE recommendation please

2005-10-23 Thread Wolfgang Keller
> I'm new to Python but am wondering what IDE Python developers use? > I use Mac OS X 10.4.2. Just look in the archives of the Pythonmac mailinglist. We have discussed this very subject intensively recently, with a pretty extensive review of the different IDEs available. I'll get a copy of Win

Localized strftime()

2005-10-23 Thread Sebastjan Trepca
Hi! I'm trying to get a localized date format from strftime() but it seems that is doesn't have any parameters for that or any information about this issue in Python docs. For example I want to turn this: 19 Oct, 2005 to this(slovene language): 19 Okt, 2005 Thanks for help, Sebastjan -- http://

ANN: PyLZMA 0.1.0 released

2005-10-23 Thread Joachim Bauch
Hi, I'm pleased to announce the release of PyLZMA 0.1.0 PyLZMA is a platform independent python library that provides compression using the LZMA algorithm by Igor Pavlov. The LZMA algorithm usually performs better than the zlib or bz2 algorithms. Changes from 0.0.3: * updated to 7-zip 4.23 and

Re: wxpython - passing arg to wx.app OnInit

2005-10-23 Thread Stuart McGraw
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Stuart McGraw wrote: > > I have a wxPython app, conventionally structured > > with a Application class derived from wx.App. > > My problem is that the app accepts a command > > line argument that must be acted upon within

Re: Microsoft Hatred FAQ

2005-10-23 Thread Mike Meyer
entropy <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote... >> [EMAIL PROTECTED] wrote... >> > In comp.lang.perl.misc David Schwartz <[EMAIL PROTECTED]> wrote: >> > > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message >> > >> Sorry, but nobody but the government actually owns property. In most

Re: calling a dylib in python on OS X

2005-10-23 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Hi > > Is there something similar to python's windll for calling DLLs on win32 > but meant for calling dylib's on OS X? ctypes should work just fine on Macs, just as well as on Windows and Linux machines as well as many other Unix dialects. Try http://starship.pytho

Re: Syntax across languages

2005-10-23 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Alex> I've seen enough occurrences of "lambda x: x" in Python code with > Alex> a generally functional style that I'd love to have > Alex> operator.identity (and a few more trivial functions like that) for > Alex> readability;-) > > But, but, but [Skip

Re: calling a dylib in python on OS X

2005-10-23 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: | Hi | | Is there something similar to python's windll for calling DLLs on win32 | but meant for calling dylib's on OS X? | | thanks, | | r.s. | Can you be more specific about what you are trying to do/what dylib you want to ca

Re: Syntax across languages

2005-10-23 Thread skip
Alex> I've seen enough occurrences of "lambda x: x" in Python code with Alex> a generally functional style that I'd love to have Alex> operator.identity (and a few more trivial functions like that) for Alex> readability;-) But, but, but [Skip gets momentarily apoplectic, then reco

Re: Syntax across languages

2005-10-23 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > just curious, how can this identity function be used ? In haskell, > because all functions are curried, I can sort of visualize/understand > how id is used. Not quite understand how it can be used in python. There was a very recent example posted to

Re: Syntax across languages

2005-10-23 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > - Information about the current line and file as Ruby: > __LINE__ __FILE__ > Instead of the python version: > inspect.stack()[0][2] inspect.stack()[0][1] __file__ is around in Python, too, but there's no __line__ (directly). > - identity function: "identity" as

Re: How to separate directory list and file list?

2005-10-23 Thread Alex Martelli
Gonnasi <[EMAIL PROTECTED]> wrote: > With > >glob.glob("*") > > or > >os.listdir(cwd) > > I can get a combined file list with directory list, but I just wanna a > bare file list, no directory list. How to get it? I see everybody's suggesting os.path.* solutions, and they're fine, but an interes

Re: Python vs Ruby

2005-10-23 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: ... > > Of course, these results only apply where the "complexity" (e.g., number > > of operators, for example) in a single line of code is constant. > > I'm not sure what you're trying to say here. The tests ranged over > things from PL/I to assembler. Are

Re: How to separate directory list and file list?

2005-10-23 Thread George Sakkis
"Gonnasi" <[EMAIL PROTECTED]> wrote: > With > >glob.glob("*") > > or > >os.listdir(cwd) > > I can get a combined file list with directory list, but I just wanna a > bare file list, no directory list. How to get it? > > Tons of thanks in advance! > > Gonnasi Using the path module (http://www.joren

Re: bsddb version?

2005-10-23 Thread Peter Hansen
leasun wrote: > Anybody knows which version bsddb is released with py2.3 and py2.4? Is this what you wanted? Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 >>> import bsddb >>> bsddb.__version__ '4.3.0' I'll leave it up to you to do the work to find out what it is

Re: How to separate directory list and file list?

2005-10-23 Thread Peter Hansen
Gonnasi wrote: > With >>glob.glob("*") > or >>os.listdir(cwd) > > I can get a combined file list with directory list, but I just wanna a > bare file list, no directory list. How to get it? Using Jason Orendorff's path module, it's just this: >>> from path import path >>> path('.').files() # r

bsddb version?

2005-10-23 Thread leasun
Anybody knows which version bsddb is released with py2.3 and py2.4? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: High Order Messages in Python

2005-10-23 Thread Michael
[EMAIL PROTECTED] wrote: > I'm reading about "high order messages" in Ruby by Nat Pryce, and > thinking if it could be util and if so, if it could be done in Python. Nice sunday afternoon exercise. Yes, you can do this in python. This is based on a relatively naive translation of the ruby versio

ANN: CherryPy-2.1.0-final released

2005-10-23 Thread remi
Hello everyone, I am happy to announce the release of CherryPy-2.1.0 If is the result of 6 months of intense development since the last stable release and the work of a growing number of contributors. CherryPy has become increasingly popular these past few months (the mailing lists now have more

Re: How to separate directory list and file list?

2005-10-23 Thread Fredrik Lundh
"Gonnasi" wrote: > With > >glob.glob("*") > > or > >os.listdir(cwd) > > I can get a combined file list with directory list, but I just wanna a > bare file list, no directory list. How to get it? use os.path.isfile on the result. for file in glob.glob("*"): if not os.path.isfile(file)

Re: How to separate directory list and file list?

2005-10-23 Thread Oliver Andrich
Hi, 2005/10/23, Gonnasi <[EMAIL PROTECTED]>: > With > >glob.glob("*") > > or > >os.listdir(cwd) > > I can get a combined file list with directory list, but I just wanna a > bare file list, no directory list. How to get it? don't know if it is the best solution, but it looks nice. :) path = "/hom

How to separate directory list and file list?

2005-10-23 Thread Gonnasi
With >glob.glob("*") or >os.listdir(cwd) I can get a combined file list with directory list, but I just wanna a bare file list, no directory list. How to get it? Tons of thanks in advance! Gonnasi -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax across languages

2005-10-23 Thread garabik-news-2005-05
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > >> - comparison returns 4 values (i.e. inferior, equal, superior or not >> comparable), as in Pliant: "compare" > cmp("a", "b") > -1 cmp("a", "a") > 0 cmp("b", "a") > 1 cmp("ä", u"ä") > Traceback (most recent call last): > File "", l

Re: Microsoft Hatred FAQ

2005-10-23 Thread Shmuel (Seymour J.) Metz
In <[EMAIL PROTECTED]>, on 10/18/2005 at 01:21 PM, [EMAIL PROTECTED] said: >Yes, he deserves credit for what he did. As well as blame. The commercialization of the Internet was grossly mismanaged. Take the InterNIC - please! -- Shmuel (Seymour J.) Metz, SysProg and JOAT

Re: Syntax across languages

2005-10-23 Thread Fredrik Lundh
"beza1e1" wrote: > It has is uses. I had some kind of parser and had a dict like this: > {case: function, ...} It had to be a dict, because i wanted to > dynamically add and remove cases. In some cases nothing had to be done. > To represent this in the dict a identity function is needed. in Pytho

Re: Syntax across languages

2005-10-23 Thread [EMAIL PROTECTED]
just curious, how can this identity function be used ? In haskell, because all functions are curried, I can sort of visualize/understand how id is used. Not quite understand how it can be used in python. beza1e1 wrote: > >>> id("blub") > -1210548288 > > This is not identity in a mathematical view.

Re: IDE recommendation please

2005-10-23 Thread SPE - Stani's Python Editor
Mac users of SPE collected money for me to buy a Mac. This means that in the near future SPE will be especially improved for Mac. So feedback from Mac users is more than welcome and will probably be taken into account. SPE is a free, open source IDE with a lot of features like a debugger, UML diagr

Re: Syntax across languages

2005-10-23 Thread beza1e1
>>> id("blub") -1210548288 This is not identity in a mathematical view. def identity(x): return x It has is uses. I had some kind of parser and had a dict like this: {case: function, ...} It had to be a dict, because i wanted to dynamically add and remove cases. In some cases nothing had to be d

Re: wxpython - passing arg to wx.app OnInit

2005-10-23 Thread Peter Hansen
Stuart McGraw wrote: > I have a wxPython app, conventionally structured > with a Application class derived from wx.App. > My problem is that the app accepts a command > line argument that must be acted upon within the > OnInit() method of the Application class. How do > I pass it cleanly from main

Re: Microsoft Hatred FAQ

2005-10-23 Thread entropy
[EMAIL PROTECTED] wrote... > [EMAIL PROTECTED] wrote... > > In comp.lang.perl.misc David Schwartz <[EMAIL PROTECTED]> wrote: > > > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > > > > >> Sorry, but nobody but the government actually owns property. In most > > >> places, you can't make non-t

Re: Missing modules '_ssl', 'ext.IsDOMString', 'ext.SplitQName'

2005-10-23 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > i get the following error message when i use py2exe on my application: > > The following modules appear to be missing > ['_ssl', 'ext.IsDOMString', 'ext.SplitQName'] > > I've installed PyXML-0.8.4.win32-py2.4.exe. My version of python is 2.4 > I've checked in the pyxml

Re: Microsoft Hatred FAQ

2005-10-23 Thread entropy
[EMAIL PROTECTED] wrote... > In comp.lang.perl.misc David Schwartz <[EMAIL PROTECTED]> wrote: > > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > > >> Sorry, but nobody but the government actually owns property. In most > >> places, you can't make non-trivial changes to "your" property witho

Re: C replacement for Queue module

2005-10-23 Thread Peter Hansen
Jason Lai wrote: > As far as Queues go, the adding/popping is apparently done with deque > which are implemented in C. The Queue class pretty much just provides > blocking operations and is otherwise a very thin layer around deque. As > far as primitives go, only threading.Lock is written in C and

Re: Listening for keypress in the background

2005-10-23 Thread Peter Hansen
Mathias Dahl wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: >>>How can I make it listen for a certain keypress (say, Windows-key + >>>space) in a controlled fashion even when it is not the program having >>>focus? >>> >>>I need to do this running under GNOME in Mandrake GN/Linux 10. >> >>Search

Re: Problem with subprocess.call and cp

2005-10-23 Thread Fredrik Lundh
Torsten Bronger wrote: > The following code > > from subprocess import call > call(['cp', 'subdir/*.jpg', 'othersubdir/']) > > yields > > cp: call of stat for "subdir/*.jpg" not possible: File or directory not found > > (This may not be the real error message since it's back-translated > from Germ

Problem with subprocess.call and cp

2005-10-23 Thread Torsten Bronger
Hallöchen! The following code from subprocess import call call(['cp', 'subdir/*.jpg', 'othersubdir/']) yields cp: call of stat for "subdir/*.jpg" not possible: File or directory not found (This may not be the real error message since it's back-translated from German.) I could use shell=True,

Re: System tray Icon

2005-10-23 Thread bearophileHUGS
Questo non e' sufficiente, ma puo' essere un punto di partenza: http://www.pycode.com/modules/?id=2&tab=download Bearophile -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >