ANN: The first Porcupine tutorial is released

2005-10-20 Thread t . koutsovassilis
I'm pleased to announce the release of the first Porcupine tutorial. This tutorial presents all the steps required for building and deploying a simple Porcupine application from scratch. The sample application is a recipe manager used for storing and retrieving cooking recipes. The skills required

FunkLoad 1.2.0 released

2005-10-20 Thread Stefane Fermigier
FunkLoad 1.2.0 is out. About FunkLoad: FunkLoad is a open source functional and load web tester, written in Python, whose main use cases are functional and regression testing of web projects, performance testing by loading the web application and monitoring your servers, load testing to expose

[ANN] Boo Programming Language 0.7 Released

2005-10-20 Thread D H
Boo 0.7 was released by Rodrigo B. de Oliveira. Boo is a statically typed programming language for .NET/Mono with a python inspired syntax and a special focus on language and compiler extensibility. Boo is free and open source (MIT/BSD license). The source and binaries for Boo are available

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

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 super object that isn't exactly the same thing as a class -- but good enough for

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

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 network cable being

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 than the

在消息 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

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

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

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 incomparable, they

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 compared.

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 the

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 who did it.

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 indicate two objects are

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 it,

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 it,

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

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 seemed

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 and spend a day or

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 shareholders.

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 stdcall

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

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

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: URL:http://www.crummy.com/software/BeautifulSoup/ Except he's trying to extract an apparently random part of the file.

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 private

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.

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. Since

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

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

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? --

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 calling a

__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__ slot wrapper '__setattr__' of 'object' objects object.__getattr__ Traceback

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 --

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 --

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

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

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 anyone

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 c)).

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__ slot wrapper '__setattr__' of 'object' objects

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

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

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 bit of a stretch.

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 --

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

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

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 scale

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 and

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 would

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=/%s/ %s %

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):

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 __file__

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

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 traceback f

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 module is part of

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 --

Re: Set an environment variable

2005-10-20 Thread Mike Meyer
Eric Brunel [EMAIL PROTECTED] writes: -myScript.py-- print 'export MY_VARIABLE=value' -- -myScript.sh-- python myScript.py /tmp/chgvars.sh . /tmp/chgvars.sh It's simpler

Re: Modules and Namespaces

2005-10-20 Thread jelle
Ooops, Larry, forgive me being to overhauled here: Actually self.RS = RS does not make the RS object available in the module, Steve's method does however. -Jelle -- http://mail.python.org/mailman/listinfo/python-list

Re: sort problem

2005-10-20 Thread Michele Petrazzo
Lasse Vågsæther Karlsen wrote: How about: list.sort(key=lambda x: x[3]) Does that work? Yes, on my linux-test-box it work, but I my developer pc I don't have the 2.4 yet. I think that this is a good reason for update :) Thanks, Michele --

Re: Microsoft Hatred FAQ

2005-10-20 Thread T Beck
Peter T. Breuer wrote: 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. [snip] O/ses on PC platforms, as determined by

Re: best way to replace first word in string?

2005-10-20 Thread Micah Elliott
On Oct 20, [EMAIL PROTECTED] wrote: 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

Re: __getattr__, __setattr__

2005-10-20 Thread Thomas Heller
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: for new style classes __getattribute__ is defined, see eg. http://www.python.org/2.2.3/descrintro.html Steve Holden [EMAIL PROTECTED] writes: object.__getattribute__ slot wrapper '__getattribute__' of 'object' objects Ring any bells? Yes, of

Re: best way to replace first word in string?

2005-10-20 Thread Mike Meyer
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: 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

Re: need some advice on x y plot

2005-10-20 Thread nephish
i have thought about doing this, just a little different. i was going to list the value pairs. take the start time and end time and plot 100 empty plots between them. add the value pairs, sort by time, and then draw it. The only thing is it get kinda complicated when the times change a lot. they

Re: Searching for txt file and importing to ms access

2005-10-20 Thread Mike Meyer
Mark Line [EMAIL PROTECTED] writes: I'm managed to get some code to download a message from the email account and save it to a text file, does any one have a link to some sample code to search though a file until a string of characters is matched? Or could point me to some functions that

Cursor Location

2005-10-20 Thread Samantha
Is there any code that would allow a person to click a location on the screen and have that location saved for a future use? For example to imbed a watermark on an image or text, etc. S -- http://mail.python.org/mailman/listinfo/python-list

Re: How to extract a part of html file

2005-10-20 Thread Joe
Thanks Mike that is just what I was looking for, I have looked at beautifulsoup but it doesn't really do what I want it to do, maybe I'm just new to python and don't exactly know what it is doing just yet. However string find woks. Thanks On Thu, 20 Oct 2005 09:47:37 -0400, Mike Meyer wrote:

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have tried to use unix timestamps, That has always worked for me. What happened? and i have also tried with DateTime objects Never tried that. do i need to use a scale that isn't linear (default in most) ? No. how do i putt

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, Larry Bates [EMAIL PROTECTED] wrote: I would try to live with time scale being fixed I don't understand what you mean by the time scale being fixed. It's not. If you just pass the time,value pairs to gnuplot, it does exactly what it should. and insert None (or whatever value

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

2005-10-20 Thread Tim Peters
[Toby Dickenson] ... ZODB's BTrees work in a similar way but use the regular python comparison function, and the lack of a guarantee of a total ordering can be a liability. Described here in 2002, but I think same is true today:

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, Grant Edwards [EMAIL PROTECTED] wrote: 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

Re: best way to replace first word in string?

2005-10-20 Thread Fredrik Lundh
Micah Elliott wrote: And the regex is comparatively slow, though I'm not confident this one is optimally written: $ python -mtimeit -s'import re' ' re.sub(r^(\w*), r/\1/, a b c)' 1 loops, best of 3: 44.1 usec per loop the above has to look the pattern up in the

Re: need some advice on x y plot

2005-10-20 Thread Kent Johnson
[EMAIL PROTECTED] wrote: 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 ? Here is some code that works for me. It plots multiple datasets against time. The input

Re: Microsoft Hatred FAQ

2005-10-20 Thread Peter T. Breuer
In comp.os.linux.misc T Beck [EMAIL PROTECTED] wrote: Peter T. Breuer wrote: 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

Re: need some advice on x y plot

2005-10-20 Thread nephish
ok, yeah, thats exactly what i am looking for. i will give it a go. thanks a whole lot. putt this off is a typo, pull this off is what i was meaning to type. this is cool. -- http://mail.python.org/mailman/listinfo/python-list

Re: sort problem

2005-10-20 Thread Kent Johnson
Michele Petrazzo wrote: Lasse Vågsæther Karlsen wrote: How about: list.sort(key=lambda x: x[3]) Better to use key=operator.itemgetter(3) Yes, on my linux-test-box it work, but I my developer pc I don't have the 2.4 yet. I think that this is a good reason for update :) or learn about

A macro editor

2005-10-20 Thread jau
Hello mates. I'm part of a big project's developer team. We are writting an application in Java and we are planning to add scripting functionality to it. What we exactly are planning is to give a kind of tool that would allow our users to write their own scripts to perform their special

Question on re.IGNORECASE

2005-10-20 Thread chemag
Hi, I'm having some problems with basic RE in python. I was wondering whether somebody could provide a hint on what's going wrong with the following script. Comments are included. TIA. -myself python2.3 Python 2.3.4 (#1, Nov 18 2004, 13:39:30) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-39)] on

bypassing web forms hardcoding login and password

2005-10-20 Thread cgian31
I need to hide the complexity from users to access an information webpage, which is normally accessible after filling in a web form with the correct data. The address of the information webpage is like https://external.address.com/info.asp?numeric code where numeric code is a number generated by

Re: A macro editor

2005-10-20 Thread Diez B. Roggisch
My teammates and I were talking about to use one of Python, Ruby or Groovy. But, we haven't decided which to use. What seems to be easier is to use Python, you know.. because of the Jython thing. But, it is probably a mistake to take Jython without a extensive analysis of the all

Re: Question on re.IGNORECASE

2005-10-20 Thread Kent Johnson
[EMAIL PROTECTED] wrote: Hi, I'm having some problems with basic RE in python. I was wondering whether somebody could provide a hint on what's going wrong with the following script. Comments are included. TIA. -myself python2.3 Python 2.3.4 (#1, Nov 18 2004, 13:39:30) [GCC 3.2.3

Re: Question on re.IGNORECASE

2005-10-20 Thread chemag
OK, I got it. - The re module search function syntax is: search( pattern, string[, flags]) where re.IGNORECASE is a valid flag. - The RE Object search method syntax is: search( string[, pos[, endpos]]) where The optional second parameter pos gives an index in the string where

Re: Question on re.IGNORECASE

2005-10-20 Thread chemag
Thanks for your help. -myself -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >