Re: Microsoft Hatred FAQ

2005-10-20 Thread Peter T. Breuer
In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: > "Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> There would be if an engine manufacturer refused to provide car >> manufacturers with ANY engines for any model, unless all buyers were >> charged for T

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread fumanchu
[EMAIL PROTECTED] wrote: > These objects (such as sqlstring.Select), represent > complex SQL Statements, but as Python objects. The benefit is that you > can, at run-time, "build" the statement pythonically, without > getting bogged down in String Manipulation. The theory is that once in > use, thi

Re: Abstract Methods & Abstract Class

2005-10-20 Thread Fredrik Lundh
Andreas Kostyrka wrote: > > Do we have something like abstract methods & Abstract class. > > > > So that my class would just define the method. And the implementation > > would be defined by somebody else. > > class AbstractBase: > def method(self): > raise TypeError("abstract method c

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread Steve Holden
Jason Stitt wrote: > On Oct 19, 2005, at 9:18 PM, [EMAIL PROTECTED] wrote: > > > >>My solution is sqlstring. A single-purpose library: to create SQL >>statement objects. These objects (such as sqlstring.Select), represent >>complex SQL Statements, but as Python objects. > > > > > First of al

Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Antoon Pardon
I was wondering how people would feel if the cmp function and the __cmp__ method would be a bit more generalised. The problem now is that the cmp protocol has no way to indicate two objects are incomparable, they are not equal but neither is one less or greater than the other. So I thought that e

Re: Extention Woes

2005-10-20 Thread Fredrik Lundh
"Tuvas" wrote: > Well, the point of declaring it as a char was to have it as an 8 bit > integer, as is requested later on in the program. since ParseTuple writes an integer to the address you pass in, that's likely to overwrite some random stuff on the stack. like- wise, passing in a character b

Re: Some more odd behaviour from the Regexp library

2005-10-20 Thread Steve Holden
Mike Meyer wrote: > "David Veerasingam" <[EMAIL PROTECTED]> writes: [...] > Of course, being the founder of SPARE, I have to point out that > a.split(': ') will get you the same two strings as the re I used > above. > Let me guess: the Society for the Prevention of Abuse of Regular Expressions?

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Duncan Booth
Antoon Pardon wrote: > The problem now is that the cmp protocol has no way to > indicate two objects are incomparable, they are not > equal but neither is one less or greater than the other. If that is the case then you implement __eq__ and __ne__ to return True/False and make cmp throw an excep

Re: Microsoft Hatred FAQ

2005-10-20 Thread robic0
On 14 Oct 2005 19:01:42 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote: Xah Lee, I went through some of your web site, because of time couldn't examine (but a few) code guides. Read all you philosophy pages though, even about languages I didn't know. I took a course in my Mechanical Engineering study

Any SOAPpy users here?

2005-10-20 Thread Alvin A. Delagon
Hello python programmers! I would like to add myself to the ever increasing number of python users. Here's my first question. I've written two SOAP clients using PERL and a PHP. I tried to wirte a new SOAP client using python but I'm having problems. First, I can't seem to find a good documenta

Re: Abstract Methods & Abstract Class

2005-10-20 Thread Gerald Klix
Isn't class AbstractBase: def method(self): raise NotImplementedError( "abstract method called" ) the right thing to do? Gerald - Original Message - From: "Andreas Kostyrka" <[EMAIL PROTECTED]> To: "Iyer, Prasad C" <[EMAIL PROTECTED]> Cc: Sent: Thursday, October 20, 2005

Check it Out!

2005-10-20 Thread nikool29
Friend, Check out http://ChezBrandon.com As are you, Brandon is highly intelligent, knowledgeable, and good. May you have an awesome day. A Succinct Warning: Elements of Mossad, sated with cash from the murderous and destructive narcotics trade - for example, according to Reader's Digest, cocaine a

Re: Python vs Ruby

2005-10-20 Thread bruno modulix
Bryan wrote: > Amol Vaidya wrote: > >> Hi. I am interested in learning a new programming language, and have >> been debating whether to learn Ruby or Python. (snip) > > why don't you do what i did? download ruby and spend a day or two > reading "programming ruby" from www.ruby-lang.org/en. the

Re: destroy your self????

2005-10-20 Thread James
Doesn't work for classes because self has no global reference. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-20 Thread bruno modulix
Amol Vaidya wrote: > Hi. I am interested in learning a new programming language, and have been > debating whether to learn Ruby or Python. How do these compare and contrast > with one another, and what advantages does one language provide over the > other? I would like to consider as many opinio

Re: Set an environment variable

2005-10-20 Thread the_crazy88
Just use os.system("export PYTHONPATH = %s" %("your_pythonpath")) -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I call a subclass method from parent class ?

2005-10-20 Thread Jason Lai
If you use a newstyle class, e.g. class A(object), then you can get the superclass with cls.__base__. You could also use super(cls,cls), although note that it returns a object that isn't exactly the same thing as a class -- but good enough for just accessing attributes. Make sure to check that yo

Re: override a property

2005-10-20 Thread Kay Schluehr
Robin Becker wrote: > I thought that methods were always overridable. > In this case the lookup on the > class changes the behaviour of the one and only property. How can something be made overridable that is actually overridable? I didn't know how to better express the broken polymorphism of Pyt

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Antoon Pardon
Op 2005-10-20, Duncan Booth schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> The problem now is that the cmp protocol has no way to >> indicate two objects are incomparable, they are not >> equal but neither is one less or greater than the other. > > If that is the case then you implement _

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Duncan Booth
Antoon Pardon wrote: > Op 2005-10-20, Duncan Booth schreef <[EMAIL PROTECTED]>: >> Antoon Pardon wrote: >> >>> The problem now is that the cmp protocol has no way to >>> indicate two objects are incomparable, they are not >>> equal but neither is one less or greater than the other. >> >> If that i

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Mikael Olofsson
Antoon Pardon wrote: > Op 2005-10-20, Duncan Booth schreef <[EMAIL PROTECTED]>: > >>Antoon Pardon wrote: >> >> >>>The problem now is that the cmp protocol has no way to >>>indicate two objects are incomparable, they are not >>>equal but neither is one less or greater than the other. >> >>If that i

Re: Python vs Ruby

2005-10-20 Thread beza1e1
Depends on your experience. If you know C,C++,Java and the whole C-syntax-bunch. I'd recommend Python just to learn to adapt a different syntax. If you want to learn for the learnings sake, i'd also recommend Haskell to try functional programming, if you do not already know it. Ruby has some inter

Re: Sequence and/or pattern matching

2005-10-20 Thread Séb
Hi everybody, Thanks for the time taken to answer my question. Unfortunatly, it seems that there's a little confusion about what I want to do. In fact, I don't want to search for a particular path between computers. What I really want is to detect sequences of connection that are repeated along t

All What You Are Looking For And Mor ...

2005-10-20 Thread savatage4ever
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 ... Applications Movies PC Games Animes Musics Mobile e-books and many many more So please come and see what we can offer for you at http://s14.in

Re: How can I call a subclass method from parent class ?

2005-10-20 Thread [EMAIL PROTECTED]
thanks, it works. Though I don't quite understand what super(cls,cls) returns, and it doesn't work if I do a super(cls,cls).foo(). But cls.__base__.foo() do the trick. thankfully, I don't have multiple inheritance. Jason Lai wrote: > If you use a newstyle class, e.g. class A(object), then you ca

Re: Microsoft Hatred FAQ

2005-10-20 Thread robic0
On 14 Oct 2005 19:01:42 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote: I think this guy should run for President. Anybody says M$oft is trying to screw the little guy is "alright" in my book. >Microsoft Hatred, FAQ > >Xah Lee, 20020518 > >Question: U.S. Judges are not morons, and quite a few othe

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Antoon Pardon
Op 2005-10-20, Mikael Olofsson schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Op 2005-10-20, Duncan Booth schreef <[EMAIL PROTECTED]>: >> >>>Antoon Pardon wrote: >>> >>> The problem now is that the cmp protocol has no way to indicate two objects are incomparable, they are not e

Re: Microsoft Hatred FAQ

2005-10-20 Thread David Schwartz
"Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Not if they abuse a monopoly position in doing so, which is where we > started. In other words, what they did was wrong because it was them who did it. It is fine if anyone else does, just not fine if Microsoft

Re: Minimizing Connection reset by peer exceptions

2005-10-20 Thread Ben Sizer
[EMAIL PROTECTED] wrote: > Occasionally (perhaps 5% of the time) the following exception gets > raised: > > (10054, 'Connection reset by peer') Generally this just means the connection has closed through some unusual means, perhaps by being turned off, or a network cable being unplugged, or a ti

Re: How can I call a subclass method from parent class ?

2005-10-20 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Jason Lai wrote: > >>If you use a newstyle class, e.g. class A(object), then you can get the >>superclass with cls.__base__. You could also use super(cls,cls), >>although note that it returns a object that isn't exactly the >>same thing as a class -- but good enough fo

Perl-Python-a-Day: one-liner loop Functional Style

2005-10-20 Thread Xah Lee
One-Liner Loop in Functional Style Xah Lee, 200510 Today we show a example of a loop done as a one-liner of Functional Programing style. Suppose you have a list of file full paths of images: /Users/t/t4/oh/DSCN2059m-s.jpg /Users/t/t4/oh/DSCN2062m-s.jpg /Users/t/t4/oh/DSCN2097m-s.jpg /Users/t/t4

Re: Minimizing Connection reset by peer exceptions

2005-10-20 Thread Steve Holden
Ben Sizer wrote: > [EMAIL PROTECTED] wrote: > > >>Occasionally (perhaps 5% of the time) the following exception gets >>raised: >> >>(10054, 'Connection reset by peer') > > > Generally this just means the connection has closed through some > unusual means, perhaps by being turned off, or a netwo

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Steve Holden
Antoon Pardon wrote: > I was wondering how people would feel if the cmp function and > the __cmp__ method would be a bit more generalised. > > The problem now is that the cmp protocol has no way to > indicate two objects are incomparable, they are not > equal but neither is one less or greater tha

在消息 "Hi"中发现病毒

2005-10-20 Thread cc
The message contains Unicode characters and has been sent as a binary attachment. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-20 Thread gene tani
http://blog.ianbicking.org/ruby-python-power.html http://www.ruby-doc.org/RubyEyeForThePythonGuy.html http://onestepback.org/index.cgi/Tech/Ruby/PythonAndRuby.rdoc http://www.approximity.com/ruby/Comparison_rb_st_m_java.html http://www.jvoegele.com/software/langcomp.html http://reflectivesurface.co

Re: How can I call a subclass method from parent class ?

2005-10-20 Thread [EMAIL PROTECTED]
Thanks for the explanation but some how my code fail and since I don't need multiple inheritance for the moment, I would settle for the not so clean version. The documentation of super is not very clear to me too. As seen in my code, I am using classmethod which may cause some problem. Steve Hold

Re: Microsoft Hatred FAQ

2005-10-20 Thread Roedy Green
On Wed, 19 Oct 2005 03:15:03 -0700, "David Schwartz" <[EMAIL PROTECTED]> wrote or quoted : >Did I say their obligation was to secure their shareholders as much >profit as possible? I said their obligation was to their shareholders. You are literally saying people work for a company have an o

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Antoon Pardon
Op 2005-10-20, Steve Holden schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> I was wondering how people would feel if the cmp function and >> the __cmp__ method would be a bit more generalised. >> >> The problem now is that the cmp protocol has no way to >> indicate two objects are incompara

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Toby Dickenson
On Thursday 20 October 2005 11:53, Steve Holden wrote: > Personally I'm still not convinced that your requirement reflects a > substantial use case (but then I'm getting used to that ;-). Just > because an ordering is partial that doesn't mean that two instances of a > class shouldn't be compar

Re: make: circular dependency for Modules/signalmodule.o

2005-10-20 Thread James Buchanan
Neal Norwitz wrote: > I've never heard of this problem. The Makefile is generated by > configure so this is possibly a configure issue. In my (generated) > Makefile, signalmodule.o is listed in MODOBJS, but not in SIGNAL_OBJS. > Maybe your signalmodule.o is listed in both? > > Search through t

Re: Microsoft Hatred FAQ

2005-10-20 Thread Peter T. Breuer
In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: > "Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Not if they abuse a monopoly position in doing so, which is where we >> started. > In other words, what they did was wrong because it was them

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Steve Holden
Antoon Pardon wrote: > Op 2005-10-20, Steve Holden schreef <[EMAIL PROTECTED]>: > >>Antoon Pardon wrote: >> >>>I was wondering how people would feel if the cmp function and >>>the __cmp__ method would be a bit more generalised. >>> >>>The problem now is that the cmp protocol has no way to >>>indic

New Website

2005-10-20 Thread sina sodagar
Hi This website can help you to find any links about computer you want: http://lxlinks.ati-net.net/ Enjoy -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing an immutable object in python

2005-10-20 Thread Magnus Lycka
Mapisto wrote: > Ok, I've understood my mistake. > > Now, my list contains a shared entry of an empty object. When an entry > is needed to be changed, I check if the entry is the shared empty > object; in that case I create a new unique instance. If the entry is > already a unique instance, I use

Re: Writing an immutable object in python

2005-10-20 Thread Magnus Lycka
Mapisto wrote: > Ok, I've understood my mistake. > > Now, my list contains a shared entry of an empty object. When an entry > is needed to be changed, I check if the entry is the shared empty > object; in that case I create a new unique instance. If the entry is > already a unique instance, I use

Re: Set an environment variable

2005-10-20 Thread jepler
In Unix, you generally can't affect the environment of your parent program (in a broad sense, which includes environment variables, current working directory, opened files, effective user ID, etc). You have two basic choices to achieve an effect like this. First, you can start a subshell with the

Re: Set an environment variable

2005-10-20 Thread Christian
Thanks Jeff and the crazy 88. -- http://mail.python.org/mailman/listinfo/python-list

Re: Minimizing Connection reset by peer exceptions

2005-10-20 Thread Ben Sizer
Steve Holden wrote: > Do note, though, that if you aren't using some means (threading, > forking, etc) of handling the connections asynchronously then your > server will normally only queue a very limited number of connections > (usually 5 at most). The example given by the original poster seeme

Re: Python vs Ruby

2005-10-20 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, bruno modulix <[EMAIL PROTECTED]> wrote: >Bryan wrote: >> Amol Vaidya wrote: >> >>> Hi. I am interested in learning a new programming language, and have >>> been debating whether to learn Ruby or Python. >(snip) >> >> why don't you do what i did? download ruby a

Re: Microsoft Hatred FAQ

2005-10-20 Thread axel
In comp.lang.perl.misc Roedy Green <[EMAIL PROTECTED]> wrote: > On Wed, 19 Oct 2005 03:15:03 -0700, "David Schwartz" > <[EMAIL PROTECTED]> wrote or quoted : >>Did I say their obligation was to secure their shareholders as much >>profit as possible? I said their obligation was to their shareh

Accessing a dll from Python

2005-10-20 Thread dcrespo
Hi to all, Can someone give me lights on how can I deal with dlls from python? My main purpose is to get access to a Unitech PT600 Bar Code system. I have the dll that works fine through Visual Basic. But I'm migrating to Python, so I need a way to use the same dll, or a C library. I tried to ac

Re: Accessing a dll from Python

2005-10-20 Thread Richie Hindle
[Daniel] > I tried the ctypes module. ctypes is the right way to do it. You need to post your code and whatever errors you received. Here's an example of using ctypes to call a DLL: >>> from ctypes import * >>> windll.user32.MessageBoxA(None, "Hello world", "ctypes", 0); You use "windll" for

KeyboardInterrupt vs extension written in C

2005-10-20 Thread Tamas Nepusz
Hi everyone, I have tried to do some googling before asking my question here, but I haven't found any suitable answer. I am developing a Python API for a graph library written in pure C. The library is doing an awful lot of math computations, and some of them can take a pretty long time (depending

Re: Extention Woes

2005-10-20 Thread Tuvas
Never mind, problem solved. The other problem I was having was I forgot to put the .so at the end of a file, so it didn't change anything. Thanks for all of the help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-20 Thread Steven D'Aprano
On Thu, 20 Oct 2005 13:17:14 +, axel wrote: > Employees have *no* obligations towards the shareholders of a company. > They are not employed or paid by the shareholders, they are employed > by the company itself which is a separate legal entity. > > It is a different matter for the board of d

Re: How to extract a part of html file

2005-10-20 Thread Mike Meyer
Ben Finney <[EMAIL PROTECTED]> writes: > Joe <[EMAIL PROTECTED]> wrote: >> I'm trying to extract part of html code from a tag to a tag > For tag soup, use BeautifulSoup: > http://www.crummy.com/software/BeautifulSoup/> Except he's trying to extract an apparently random part of the file. Beaut

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread Jason Stitt
On Oct 20, 2005, at 2:19 AM, Steve Holden wrote: > Jason Stitt wrote: >> Using // for 'in' looks really weird, too. It's too bad you can't >> overload Python's 'in' operator. (Can you? It seems to be hard-coded >> to iterate through an iterable and look for the value, rather than >> calling a pri

Re: New Website

2005-10-20 Thread Diez B. Roggisch
I get a 404 - as Linux and MacOs-User, I'm pretty ignorant of Viruses/Malware. So, I'm not sure but I think it's possible that this site is spreading such malicious content. -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting 2bit hex representation to integer ?

2005-10-20 Thread Larry Bates
No you can't convert using str(). Binary data is stored in a Python string object, but it isn't really a string. It is rather just a bunch of bits packed into a string variable. struct.unpack() will unpack those bits into any number of different types of variables and is what you need. Example:

Re: Set an environment variable

2005-10-20 Thread Eric Brunel
On 20 Oct 2005 01:58:44 -0700, the_crazy88 <[EMAIL PROTECTED]> wrote: > Just use > os.system("export PYTHONPATH = %s" %("your_pythonpath")) ... except it won't work: os.system will execute the command in a new process, so the environment variable change will only be visible in *this* process. S

Re: Sequence and/or pattern matching

2005-10-20 Thread Mike Meyer
"Séb" <[EMAIL PROTECTED]> writes: > Hi everybody, > > Thanks for the time taken to answer my question. Unfortunatly, it seems > that there's a little confusion about what I want to do. > > In fact, I don't want to search for a particular path between > computers. What I really want is to detect se

Re: Accessing a dll from Python

2005-10-20 Thread Larry Bates
If you want you can also take a look at something I wrote a while ago (before ctypes was really well known). It has worked for me with .DLLS form Castelle and Expervision that both have extensive APIs. It is located here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847 Larry Bate

Re: Set an environment variable

2005-10-20 Thread Grant Edwards
On 2005-10-20, the_crazy88 <[EMAIL PROTECTED]> wrote: > os.system("export PYTHONPATH = %s" %("your_pythonpath")) No, that won't work. That will set the environment variable in the shell spawned by the os.system command. That shell will then immediately exit, leaving the caller's environment u

Re: Set an environment variable

2005-10-20 Thread Grant Edwards
On 2005-10-20, Christian <[EMAIL PROTECTED]> wrote: > How do I export an environment variable in a .py script? http://www.python.org/doc/current/lib/os-procinfo.html#l2h-1548 -- Grant Edwards grante Yow! My BIOLOGICAL ALARM at

Re: Abstract Methods & Abstract Class

2005-10-20 Thread sébastien
or [...] def method(self): assert not "must be overrided" -- http://mail.python.org/mailman/listinfo/python-list

Re: UI toolkits for Python

2005-10-20 Thread Ed Jensen
Kenneth McDonald <[EMAIL PROTECTED]> wrote: > I'd have to agree with this. Unfortunately, the only way to use Swing > (in a > reasonable manner) from Python is to use Jython, and Jython has other > shortcomings that make me not want to use it. What shortcomings? -- http://mail.python.org/mailma

Re: destroy your self????

2005-10-20 Thread Ron Adam
James wrote: > Doesn't work for classes because self has no global reference. True. To make it work one would need to track instances and names and do comparisons... and so on. So it's not worth it. ;-) Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread Jason Stitt
On Oct 19, 2005, at 11:55 PM, [EMAIL PROTECTED] wrote: > > Jason Stitt wrote: > >> >> Using // for 'in' looks really weird, too. It's too bad you can't >> overload Python's 'in' operator. (Can you? It seems to be hard-coded >> to iterate through an iterable and look for the value, rather than >> c

__getattr__, __setattr__

2005-10-20 Thread Thomas Heller
Just wondering about this behaviour, why is it this way? Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> object.__setattr__ >>> object.__getattr__ Traceback (most recent call last): File ""

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-20 Thread Rocco Moretti
James Stroud wrote: > I propose that any time anyone suggests switching to Windows, the reasons for > such should be explicitly described, and not left to interpretation. I propose that any time anyone suggests switching to Linux ... I propose that any time anyone suggests switching to Mac ... I

best way to replace first word in string?

2005-10-20 Thread [EMAIL PROTECTED]
I am looking for the best and efficient way to replace the first word in a str, like this: "aa to become" -> "/aa/ to become" I know I can use spilt and than join them but I can also use regular expressions and I sure there is a lot ways, but I need realy efficient one -- http://mail.python.org/m

Modules and Namespaces

2005-10-20 Thread Jelle Feringa / EZCT Architecture & Design Research
##I'm sorry to stir up such a well discussed topic yet again, but namespaces are a point of confusion to me... I took the effort of organizing my Python code (scripting a cad program calles Rhino) in well defined classes, which would be a terrific thing if I didn't got stuck in namespace issues.

Popularity of blogging tools used by python programmers

2005-10-20 Thread Stewart Midwinter
I've made a comparison of the relative popularity of blogging tools used by python programmers. I was surprised by the number of python developers not using python for their blogs; isn't that like GM employees driving Toyota cars? See my post at: http://midtoad.homelinux.org/wp/?p=117 S -- htt

Re: Python vs Ruby

2005-10-20 Thread Casey Hawthorne
What languages do you know already? What computer science concepts do you know? What computer programming concepts do you know? Have you heard of Scheme? Ruby is a bit Perl like -- so if you like Perl, chances are you might like Ruby. Python is more like Java. I have heard, but have not bee

Re: __getattr__, __setattr__

2005-10-20 Thread [EMAIL PROTECTED]
for new style classes __getattribute__ is defined, see eg. http://www.python.org/2.2.3/descrintro.html -- http://mail.python.org/mailman/listinfo/python-list

Re: possible bug in cherrypy.lib.autoreload

2005-10-20 Thread infidel
Ok, so it turns out that the problem the cherrypy.lib.autoreload module is having, is that kid imports elementtree and on my machine the elementtree modules are inside a zip file (.egg). So the "path" to the elementtree __init__.py file is not a valid OS path because everything after the .egg file

need some advice on x y plot

2005-10-20 Thread nephish
Hey there, i have tried about every graphing package for python i can get to work on my system. gnuplot, pychart, biggles, gdchart, etc.. (cant get matplot to work) so far, they all are working ok. I need to make an x y chart for some data that comes in from sensors at different times durring the d

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-20 Thread Steve Holden
Rocco Moretti wrote: > James Stroud wrote: > > >>I propose that any time anyone suggests switching to Windows, the reasons for >>such should be explicitly described, and not left to interpretation. > > > I propose that any time anyone suggests switching to Linux ... > I propose that any time a

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread [EMAIL PROTECTED]
> The big operator question will be: how will "and" and "or" be > implemented? This is always a sticking point because of Python's > short-circuiting behaviors regarding them (the resultant bytecode will > include a JUMP). I'm using the Boolean | and & operators for logical groups, eg (a | b | (b

Re: __getattr__, __setattr__

2005-10-20 Thread Steve Holden
Thomas Heller wrote: > Just wondering about this behaviour, why is it this way? > > Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > object.__setattr__ > > > object.__getattr__ > >

Re: Popularity of blogging tools used by python programmers

2005-10-20 Thread beza1e1
I just see a database error on your blog, perhaps you should have used Python instead of PHP? Ok, kidding ;) Since i can't see your comparison, i have to guess. PHP wins? Would not surprise me, because PHP+MySQL is the easiest hosting to get. Wordpress, Textpattern, ... are also much more polished

Re: Popularity of blogging tools used by python programmers

2005-10-20 Thread beza1e1
Uh, no good style to comment myself, sorry. I just found why i could't see your blog entry. Since i read your message through groups.google.de i just clicked on the link. Your Google Highlight plugin seems to be confused about that: Warning: Unknown modifier '/' in /var/www/html/wp/wp-content/plug

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread [EMAIL PROTECTED]
> >> Using // for 'in' looks really weird, too. It's too bad you can't > >> overload Python's 'in' operator. (Can you? It seems to be hard-coded > >> to iterate through an iterable and look for the value, rather than > >> calling a private method like some other builtins do.) > >> > > > > // was a

Re: Some more odd behaviour from the Regexp library

2005-10-20 Thread David Veerasingam
Thanks for all your replies. I guess I've always used .*? as sort of an idiom for a non-greedy match, but I guess it only works if I specify the end point (which I didn't in the above case). e.g. re.search(r'exit: (.*?)$', a) Thanks for pointing that out! David -- http://mail.python.org/mail

Searching for txt file and importing to ms access

2005-10-20 Thread Mark Line
Hello! I'm a python n00b! I've been writing in c++ for a few years so programming's not new to me, just python that I don't know the syntax! What I'm trying to do is get an email from an pop3 account, and then search the email for some CVS data and import that information into MS Access.

Ruby on Rails Agile role

2005-10-20 Thread [EMAIL PROTECTED]
I am looking for 2 Software Engineers with a Java / Python / Ruby background to work for a rapidly growing start-up using Ruby on Rails in an Agile environment. The role is paying between £40 - £45k and is based in central London. Please send your details to grant @ connectionsrecruit.co.uk or

How to retrieve the filename of a module

2005-10-20 Thread mku
Hi, there´s a function inside a module. How can these function retrieve the path+name of his module ? (The path is most important). That should also work if the module is part of a package. Thanks in advance Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing a dll from Python

2005-10-20 Thread mku
I used ctypes. It works really fine with DLLs. have a lool at http://starship.python.net/crew/theller/ctypes Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > [...] I need to make an x y chart for some data that comes in > from sensors at different times durring the day. i need it to > show the value in the y and the time in the x . no problem so > far. But what i cannot get to happen is to

sort problem

2005-10-20 Thread Michele Petrazzo
I have a list of lists (a grid table) that can have about 15000 - 2 "rows" and 10 "cols", so: 1 [ [ 'aaa', 'vv', 'cc', 23, ... ], 2 [ 'aav', 'vv', 'cc', 45, ... ], ... 15000 [ 'sad', 'ad', 'es', 123, ... ], ] I need to sort this list, but I need to specify two things: the "column"

Re: Modules and Namespaces

2005-10-20 Thread Steve Holden
Jelle Feringa / EZCT Architecture & Design Research wrote: > ##I'm sorry to stir up such a well discussed topic yet again, but namespaces > are a point of confusion to me... > > I took the effort of organizing my Python code (scripting a cad program > calles Rhino) in well defined classes, which w

Re: best way to replace first word in string?

2005-10-20 Thread Larry Bates
There is a "gotcha" on this: How do you define "word"? (e.g. can the first word be followed by space, comma, period, or other punctuation or is it always a space). If it is always a space then this will be pretty "efficient". string="aa to become" firstword, restwords=s.split(' ',1) newstring="/

Re: Modules and Namespaces

2005-10-20 Thread Larry Bates
One way is to pass the RS object when you instantiate an instance of srfBase, something like: class srfBase: '''Base class inherited by the srf* classes, binding general Rhino surface functionality to a particular surface generation method''' def __init__(self, RS): self.

Re: need some advice on x y plot

2005-10-20 Thread nephish
how ? i have tried to use unix timestamps, and i have also tried with DateTime objects do i need to use a scale that isn't linear (default in most) ? how do i putt this off ? thanks btw. sk -- http://mail.python.org/mailman/listinfo/python-list

Re: sort problem

2005-10-20 Thread Lasse Vågsæther Karlsen
How about: list.sort(key=lambda x: x[3]) Does that work? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to retrieve the filename of a module

2005-10-20 Thread Lawrence Oluyede
Il 2005-10-20, mku <[EMAIL PROTECTED]> ha scritto: > Hi, > > thereŽs a function inside a module. How can these function retrieve > the path+name of his module ? (The path is most important). > That should also work if the module is part of a package. [EMAIL PROTECTED]:~ $ cat > test.py print __

Re: need some advice on x y plot

2005-10-20 Thread Larry Bates
I would try to live with time scale being fixed and insert None (or whatever value is used by charting package) for times where observations were not taken. This will mean that you have to preprocess your data by determining a time step step value that will fit your data. If you get 3 observation

Re: How to retrieve the filename of a module

2005-10-20 Thread Jim O'D
mku wrote: > Hi, > > there´s a function inside a module. How can these function retrieve > the path+name of his module ? (The path is most important). > That should also work if the module is part of a package. > > Thanks in advance > > Martin > Try the following in the function: import tra

Re: How to retrieve the filename of a module

2005-10-20 Thread Lawrence Oluyede
Il 2005-10-20, Lawrence Oluyede <[EMAIL PROTECTED]> ha scritto: > Il 2005-10-20, mku <[EMAIL PROTECTED]> ha scritto: >> Hi, >> >> thereŽs a function inside a module. How can these function retrieve >> the path+name of his module ? (The path is most important). >> That should also work if the modu

Re: Modules and Namespaces

2005-10-20 Thread jelle
Dear Steve & Larry, Both your methods worked flawless, thanks to both of you! I have to say Larry's way wins on style points, doens't it? What an awefull thing to get stuck on something that simple, what a gorgeous solution, thanks so much! -Jelle -- http://mail.python.org/mailman/listinfo/pyth

  1   2   >