Announce: Linux Desktop Testing Project (LDTP) 0.9.0 released

2007-08-28 Thread A Nagappan
Hi, We are proud to announce the release of LDTP 0.9.0. This release features number of important breakthroughs in LDTP as well as in the field of Test Automation. This release note covers a brief introduction on LDTP followed by the list of new features and major bug fixes which makes this new

[ANN] Only 3 days left for early bird rate - Python-Workshop in Leipzig, Germany, September 7, 2007

2007-08-28 Thread Mike Müller
The following announcement is in German. Despite this we would like to post it here, because many German speaking Python users read this group/list. Bis zum 31. August gilt noch die ermäßigte Anmeldegebühr. Also am Besten gleich anmelden unter: http://www.python-academy.de/workshop/anmeldung.html

Re: Biased random?

2007-08-28 Thread Gabriel Genellina
En Mon, 27 Aug 2007 17:42:45 -0300, Ivan Voras [EMAIL PROTECTED] escribi�: I have a list of items, and need to choose several elements from it, almost random. The catch is that the elements from the beginning should have more chance of being selected than those at the end (how much more? I

Re: Python's Suitability?

2007-08-28 Thread Kay Schluehr
On 28 Aug., 02:28, [EMAIL PROTECTED] (Michael R. Copeland) wrote: Note that I'm not considering using the existing C/C++ code in my Web application, because I don't know how to write a C/C++ Windows application - and I'm sure the learning curve here is greater than Python's. I'm a very

Re: SCF released to GPL

2007-08-28 Thread Laurent Pointal
hg a écrit : 2) I'm desperately searching for the French NG from my client but cannot find it ... any clue ? Maybe you can pass the message ? Done. See http://groups.google.com/group/fr.comp.lang.python/browse_frm/thread/fa4474921f77b1be/8d6150d502447510#8d6150d502447510 --

Re: How to free memory ( ie garbage collect) at run time with Python 2.5.1(windows)

2007-08-28 Thread Francesco Guerrieri
On 8/27/07, Peter Otten [EMAIL PROTECTED] wrote: Peter Otten wrote: Alex Martelli wrote: Integer objects that are once generated are kept around in a free list against the probability that they might be needed again in the future (a Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)

Re: How to parse this line of code manually

2007-08-28 Thread A.T.Hofkamp
On 2007-08-28, Davy [EMAIL PROTECTED] wrote: On Aug 28, 11:00 am, Davy [EMAIL PROTECTED] wrote: Hi all, It is well known that Python is appreciated for its merit of concise. However, I found the over concise code is too hard to understand for me. Consider, for instance, def

Re: How to free memory ( ie garbage collect) at run time with Python 2.5.1(windows)

2007-08-28 Thread Bruno Desthuilliers
Alex Martelli a écrit : rfv-370 [EMAIL PROTECTED] wrote: (snip) So how can I force Python to clean the memory and free the memory that is not used? On Windows, with Python 2.5, I don't know of a good approach (on Linux and other Unix-like systems I've used a strategy based on forking, doing

Re: Biased random?

2007-08-28 Thread baby's happy
I saw your article is very good, I like it very much. I will continue to pay attention to your article, the following are the points I hope that I have similar concerns. http://www.game-win.com http://www.game-win.com/wow-powerleveling.html http://www.game-win.com/faq.html

Re: Chaining programs with pipe

2007-08-28 Thread Gabriel Genellina
On 28 ago, 02:11, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], Gabriel Genellina wrote: En Mon, 27 Aug 2007 05:35:51 -0300, Lawrence D'Oliveiro [EMAIL PROTECTED] escribi?: In message [EMAIL PROTECTED], Gabriel Genellina wrote:

Re: Does shuffle() produce uniform result ?

2007-08-28 Thread tooru honda
Thanks to everyone who replied, (and special thanks to Alex Martelli,) I was able to accomplish what I originally asked for: a shuffle() which is both fast and without bias. It is the first time I try to optimize python code, and it is definitely a very rewarding experience. To bring closure

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread geoffbache
On Aug 27, 11:28 pm, [EMAIL PROTECTED] wrote: On Aug 27, 3:21 pm, geoffbache [EMAIL PROTECTED] wrote: Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI process on Windows that will not bring up the window. So I

Re: sorting a list of lists

2007-08-28 Thread nicksavill
Thanks guys, dirty hack was what I needed to get a job done quickly. Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: XML File -- dictionary edit/search

2007-08-28 Thread Francesco Guerrieri
On 8/28/07, Nagarajan [EMAIL PROTECTED] wrote: A simple yaml file might just do the trick. Your yaml file shall look like the following: Word-def.yaml word1: word1's definition word2: word2's definition .. .. .. Use pyyaml to handle yaml files. import yaml worddefs =

National grid to lat long conversion

2007-08-28 Thread Astley . lejasper
Hi, I have a load of British National Grid references that I want to convert to decimal degrees so I can create a google KML file. Does anyone know of a module to do this? I've looked at http://pygps.org/#LatLongUTMconversion but am not really up to speed with projections and all this other

Re: Biased random?

2007-08-28 Thread Dan Sommers
On Mon, 27 Aug 2007 22:42:45 +0200, Ivan Voras wrote: I have a list of items, and need to choose several elements from it, almost random. The catch is that the elements from the beginning should have more chance of being selected than those at the end (how much more? I don't care how the

Dead lock in pymat after using threading?

2007-08-28 Thread Python list
Hi, I'm having problems using the package pymat after using threading, e.g. the line: # h = pymat.open() # is not possible to fully execute after the lines: # import threading from time import sleep def SlpFcn(): sleep(5) print end of sleep trd = threading.Thread(target=SlpFcn)

Re: SCF released to GPL

2007-08-28 Thread Laurent Pointal
hg a écrit : 2) I'm desperately searching for the French NG from my client but cannot find it ... any clue ? Maybe you can pass the message ? Contact Michel Claveau ( [EMAIL PROTECTED] ) for a solution via his Usenet relay. A+ Laurent. --

Re: an eval()-like exec()

2007-08-28 Thread Dustan
On Aug 27, 6:06 pm, Matt McCredie [EMAIL PROTECTED] wrote: A python interactive interpreter works by having the user type in some code, compiling and running that code, then printing the results. For printing, the results are turned into strings. I would like make an interpreter which

Re: Let's Unite Against Jews and Mongrels!

2007-08-28 Thread Dustan
On Aug 27, 2:13 am, Nenad Milicevic - The Aryan Serb [EMAIL PROTECTED] wrote: Let's break the chains of Jewish and black domination! A) Why? B) What chains? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to parse this line of code manually

2007-08-28 Thread Dustan
On Aug 28, 2:59 am, A.T.Hofkamp [EMAIL PROTECTED] wrote: On 2007-08-28, Davy [EMAIL PROTECTED] wrote: On Aug 28, 11:00 am, Davy [EMAIL PROTECTED] wrote: Hi all, It is well known that Python is appreciated for its merit of concise. However, I found the over concise code is too hard to

Re: Let's Unite Against Jews and Mongrels!

2007-08-28 Thread Richard B. Gilbert
Dustan wrote: On Aug 27, 2:13 am, Nenad Milicevic - The Aryan Serb [EMAIL PROTECTED] wrote: Let's break the chains of Jewish and black domination! A) Why? B) What chains? Posting such as the one that started this thread are best ignored! Unless, of course, someone has a working

Re: Python's Suitability?

2007-08-28 Thread Nick Craig-Wood
Michael R. Copeland [EMAIL PROTECTED] wrote: I have some questions about the suitability of Python for some applications I've developed in C/C++. These are 32 bit Console applications, but they make extensive use of STL structures and functions (Lists, Maps, Vectors, arrays) -

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-28 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Albert Y. C. Lai wrote: Twisted wrote: A link to a copy in a non-toxic format would be nice. http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EWD1298.html Not a mention of Gödel. -- http://mail.python.org/mailman/listinfo/python-list

Re: Chaining programs with pipe

2007-08-28 Thread Grant Edwards
On 2007-08-28, Gabriel Genellina [EMAIL PROTECTED] wrote: On Windows, windowed applications (as opposed to console applications) start with no stdin/stdout/stderr by default. The application developer can modify that if desired, of course - I've menctioned some ways to do that. This fact

Re: expat error, help to debug?

2007-08-28 Thread Andreas Lobinger
Aloha, Andreas Lobinger wrote: Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Andreas Lobinger wrote: Anyone any idea where the error is produced? ... to share my findings with you: def ex(self,context,baseid,n1,n2): print x,context,n1,n2 return 1 The

Re: expat error, help to debug?

2007-08-28 Thread Andreas Lobinger
Aloha, Andreas Lobinger wrote: Andreas Lobinger wrote: Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Andreas Lobinger wrote: Anyone any idea where the error is produced? The registered Handler has to return a (integer) value. Would have been nice if this had been mentioned in the

Embedding the python interpreter

2007-08-28 Thread Tom Gur
Hey, Do you know an easy way to embed the python interpreter in a python program (so a non-technical user, which has no idea how to install the python interpreter would be able to run the script as an executable) ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding the python interpreter

2007-08-28 Thread Python list
Hi, Do you mean something like py2exe? http://www.py2exe.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Biased random?

2007-08-28 Thread ChrisHulan
On Aug 27, 4:42 pm, Ivan Voras [EMAIL PROTECTED] wrote: Hi, I have a list of items, and need to choose several elements from it, almost random. The catch is that the elements from the beginning should have more chance of being selected than those at the end (how much more? I don't care how

Re: Embedding the python interpreter

2007-08-28 Thread penten
On Aug 28, 8:45 pm, Tom Gur [EMAIL PROTECTED] wrote: Hey, Do you know an easy way to embed the python interpreter in a python program (so a non-technical user, which has no idea how to install the python interpreter would be able to run the script as an executable) ? py2exe does this very

Re: Embedding the python interpreter

2007-08-28 Thread Grant Edwards
On 2007-08-28, Tom Gur [EMAIL PROTECTED] wrote: Hey, Do you know an easy way to embed the python interpreter in a python program (so a non-technical user, which has no idea how to install the python interpreter would be able to run the script as an executable) ? Hey, This question is asked

Table update

2007-08-28 Thread Ahmed, Shakir
I am trying to use python script to update a table by incremental value based on struc_No but having problem to get right result on the value field for the 3rd and 4th same number of struc_no. I need to update the Value field only with the incremental value of 15 or so Any help is highly

Re: C++ Binding with Threads

2007-08-28 Thread Pablo Yabo
I've found a workaround for me project that I'll share. The solution is to release the interpreter lock when a function of my wapper is called, I mean from Python a function of C++ is called so I released the interpreter lock and take it before returning to Python. It's important to provide Sleep

Re: Table update

2007-08-28 Thread [EMAIL PROTECTED]
On Aug 28, 2:57 pm, Ahmed, Shakir [EMAIL PROTECTED] wrote: I am trying to use python script to update a table by incremental value based on struc_No but having problem to get right result on the value field for the 3rd and 4th same number of struc_no. I need to update the Value field only

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread kyosohma
On Aug 28, 4:08 am, geoffbache [EMAIL PROTECTED] wrote: On Aug 27, 11:28 pm, [EMAIL PROTECTED] wrote: On Aug 27, 3:21 pm, geoffbache [EMAIL PROTECTED] wrote: Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI

HP-UX IA: Python 2.4 (64bits gcc)

2007-08-28 Thread Julio Garvía
Hello, Please, Could you kindly tell me how to build Python 2.4 in HP-UX 11i v2 (Itanium) in 64 bits using gcc/g++? Thanks in advance for your attention. With best regards, Julio Garvía Honrado Sé

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread kyosohma
On Aug 28, 8:59 am, geoffbache [EMAIL PROTECTED] wrote: Which GUI toolkit are you using? Tkinter, wxPython, pyQt? Primarily PyGTK, but I was hoping it wouldn't matter. I hope to be able to start the process as indicated in the original post from within my test tool and instruct the

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread geoffbache
Which GUI toolkit are you using? Tkinter, wxPython, pyQt? Primarily PyGTK, but I was hoping it wouldn't matter. I hope to be able to start the process as indicated in the original post from within my test tool and instruct the subprocess to be hidden (or minimized? would that be easier?),

int/long bug in locale?

2007-08-28 Thread tkpmep
To pretty up some numbers stored as strings, I used locale to format them with commas. I then found the following error: import locale locale.setlocale(locale.LC_ALL, 'English_United States.1252') 'English_United States.1252' locale.format('%d', float('2244012500.'), grouping = True)

wxpython:how to minimize to taskbar

2007-08-28 Thread Jimmy
I'm kinda newbie to python and wxPython. Now I'm confronting a thorny problem: how can I make my program minimize to the taskbar represented as an ico, and when there is some message from network coming, it will pop out? -- http://mail.python.org/mailman/listinfo/python-list

Check for dict key existence, and modify it in one step.

2007-08-28 Thread rodrigo
Im using this construct a lot: if dict.has_key(whatever): dict[whatever] += delta else: dict[whatever] = 1 sometimes even nested: if dict.has_key(whatever): if dict[whatever].has_key(someother): dict[whatever][someother] += delta else: dict[whatever][someother] =

Re: wxpython:how to minimize to taskbar

2007-08-28 Thread kyosohma
On Aug 28, 9:10 am, Jimmy [EMAIL PROTECTED] wrote: I'm kinda newbie to python and wxPython. Now I'm confronting a thorny problem: how can I make my program minimize to the taskbar represented as an ico, and when there is some message from network coming, it will pop out? Look at the wxPython

Re: wxpython:how to minimize to taskbar

2007-08-28 Thread [EMAIL PROTECTED]
On Aug 28, 9:10 am, Jimmy [EMAIL PROTECTED] wrote: I'm kinda newbie to python and wxPython. Now I'm confronting a thorny problem: how can I make my program minimize to the taskbar represented as an ico, and when there is some message from network coming, it will pop out? Warning. I have not

Re: Python Classes

2007-08-28 Thread Erik Jones
On Aug 28, 2007, at 12:04 AM, Lamonte Harris wrote: How come you have to set the initialized created variables to equal the parameters, shouldn't that be default? class testing: def __init__(self,testing): self.testing = testing x = testing(testing) print

Re: wxpython:how to minimize to taskbar

2007-08-28 Thread kyosohma
On Aug 28, 9:50 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 28, 9:10 am, Jimmy [EMAIL PROTECTED] wrote: I'm kinda newbie to python and wxPython. Now I'm confronting a thorny problem: how can I make my program minimize to the taskbar represented as an ico, and when there is some

Re: Python Classes

2007-08-28 Thread Lamonte Harris
Ok thanks I'll try remembering it. On 8/28/07, Erik Jones [EMAIL PROTECTED] wrote: On Aug 28, 2007, at 12:04 AM, Lamonte Harris wrote: How come you have to set the initialized created variables to equal the parameters, shouldn't that be default? class testing: def

Re: Asking all python programmers.

2007-08-28 Thread Shawn Milochik
On 8/27/07, Lamonte Harris [EMAIL PROTECTED] wrote: Okay, I know you've guys told me millions of times to read the manual I've read a lot of it. What do you recommend studying the most? Python is my goal for the next year in the half. :) --

Re: Check for dict key existence, and modify it in one step.

2007-08-28 Thread Bruno Desthuilliers
rodrigo a écrit : Im using this construct a lot: if dict.has_key(whatever): ot Avoid using builtin names as identifiers (it shadows the builtin name). /ot Unless you're using an old Python version, you'd be better using if whatever in my_dict: # do something here dict[whatever]

Re: Check for dict key existence, and modify it in one step.

2007-08-28 Thread Jason
On Aug 28, 8:36 am, rodrigo [EMAIL PROTECTED] wrote: Im using this construct a lot: if dict.has_key(whatever): dict[whatever] += delta else: dict[whatever] = 1 sometimes even nested: if dict.has_key(whatever): if dict[whatever].has_key(someother):

in design time activeX properties

2007-08-28 Thread vml
Hello, Does anybody know how to modify the property of a design-time activeX property ? using win32com thank you for your help, regards, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: int/long bug in locale?

2007-08-28 Thread Neil Cerutti
On 2007-08-28, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: import locale locale.setlocale(locale.LC_ALL, 'English_United States.1252') 'English_United States.1252' locale.format('%d', float('2244012500.'), grouping = True) Traceback (most recent call last): File pyshell#28, line 1, in

Re: Asking all python programmers.

2007-08-28 Thread Lamonte Harris
I completely understand, I've sent this email when I was tired sorry for the misunderstanding, yes I completely understand what you mean how professionals won't take me serious in situations like this. How about I readdress my question for you? Hello everyone on python mailing list. I would

Re: Check for dict key existence, and modify it in one step.

2007-08-28 Thread Evan Klitzke
On Tue, 2007-08-28 at 14:36 +, rodrigo wrote: Im using this construct a lot: if dict.has_key(whatever): dict[whatever] += delta else: dict[whatever] = 1 In Python 2.5 there's a defaultdict class, otherwise you can subclass dict like this: class CountingDictionary(dict):

Re: Asking all python programmers.

2007-08-28 Thread J Sisson
On 8/28/07, Lamonte Harris [EMAIL PROTECTED] wrote: From a python starter, I don't like the word noob because it sounds very unprofessional. Touche`...haha I second the motion for Dive Into Python. It's an excellent book, and you really can't beat the price (free online as Shawn has

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread Larry Bates
geoffbache wrote: Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI process on Windows that will not bring up the window. So I try to hide the window as follows: info = subprocess.STARTUPINFO() info.dwFlags |=

localhost, ?!

2007-08-28 Thread Boris Ozegovic
Three machines, one at my home, other two at my job, in every machine there is Win XP SP2 and Python 2.5 At home: urllib2.urlopen(http://localhost;), everything is ok At job: urllib2.urlopen(http://localhost;) raise BadStatusLine(line), after half a minute. urllib2.urlopen(http://127.0.0.1;)

sys.setdefaultencoding

2007-08-28 Thread Robin Becker
Can someone explain the rationale of making the default encoding a sitewide setting? I could live with the the default being set on a per process basis, but it baffles me why even that possibility is taken away as site.py removes sys.setdefaultencoding. Is there a way to allow the process to

Jython 2.2 on Ubuntu

2007-08-28 Thread Neil Wallace
Hi all, I am a novice Python/Jython programmer, and Ubuntu user. Ubuntu still only supports only version 2.1 of Jython. I have used the GUI installer of Jython 2.2, and installed it to the default /root/jython2.2 directory. The install went without issues. However, typing jython

Re: sys.setdefaultencoding

2007-08-28 Thread Martin v. Löwis
Is there a way to allow the process to specify that unicode--str should use 'utf8' rather than 'ascii' in all non-specific cases? No. Things might break if you change the default encoding to anything but ASCII, and more so if you do that at runtime. For example, dictionaries with Unicode keys

help needed on PyLink

2007-08-28 Thread He Jibo
Hi, Everyone, Is there anybody who know how to programming for eye-tracker with PyLink? I just started learning it and need some help. Your help will be appreciated from the bottom of my heart. My email is : [EMAIL PROTECTED], and my MSN is [EMAIL PROTECTED] --

Re: int/long bug in locale?

2007-08-28 Thread Mark Dickinson
On Aug 28, 10:03 am, [EMAIL PROTECTED] wrote: Is there an int/long related bug lurking in locale? Looks like this has already been reported: See http://bugs.python.org/issue1742669 Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: National grid to lat long conversion

2007-08-28 Thread Carl Drinkwater | 29degrees
I have a load of British National Grid references that I want to convert to decimal degrees so I can create a google KML file. Does anyone know of a module to do this? I should probably have added that you can get a number of the variables you start off with from :

Re: National grid to lat long conversion

2007-08-28 Thread Carl Drinkwater | 29degrees
I have a load of British National Grid references that I want to convert to decimal degrees so I can create a google KML file. Does anyone know of a module to do this? If there isn't a module available, you could roll your own. The equations are to be found at :

Compiling Source with alternate Openssl lib

2007-08-28 Thread Kevin T. Ryan
Hi All - I'm trying to compile Python on a Centos machine (RHEL) 3.8 for a hosting account that I just set up and I'm having 2 issues: 1. I ran into an issue with the hashlib module [I think] because it bumps it up against an *OLD* openssl lib (like, Feb. 2003). So I installed a newer openssl

Re: Check for dict key existence, and modify it in one step.

2007-08-28 Thread rodrigo
evan, yes, it does help. Works like it should: class CountingDictionary(dict): def increment(self, key, delta=1): self[key] = self.get(key, 0) + delta d = CountingDictionary() d.increment('cat') d.increment('dog',72) print d {'dog': 72, 'cat': 1} Thanks! --

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread geoffbache
OK, more background needed. I develop the TextTest tool which is a generic test tool that starts tested applications from the command line. The idea is that it can handle any system under test at all, whatever language it's written in. Preferably without requiring a bunch of changes to the tested

tempfile.mkstemp and os.fdopen

2007-08-28 Thread billiejoex
Hi there. I'm trying to generate a brand new file with a unique name by using tempfile.mkstemp(). In conjunction I used os.fdopen() to get a wrapper around file properties (write read methods, and so on...) but 'name' attribute does not contain the correct file name. Why? import os import

Re: Jython 2.2 on Ubuntu

2007-08-28 Thread Tim Couper
you need to ensure that the correct jython executable is in a directory which is on your on your path. I've just successfully test-subscribed to https://lists.sourceforge.net/lists/listinfo/jython-users. Maybe you could try again. Tim Dr Tim Couper CTO, SciVisum Ltd www.scivisum.com Neil

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread geoffbache
On 28 Aug, 18:18, Larry Bates [EMAIL PROTECTED] wrote: geoffbache wrote: Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI process on Windows that will not bring up the window. So I try to hide the window as

Re: Check for dict key existence, and modify it in one step.

2007-08-28 Thread rodrigo
You're right of course, I was unclear. I wasn't using 'dict' to override the dict clas, but just as a standin for the example (the actual dictionary names are varied). Thanks, Rodriog -- http://mail.python.org/mailman/listinfo/python-list

RE: Filemaker interactions

2007-08-28 Thread Sells, Fred
filemaker 8.0 (Pro I think) has a web page generator. That's all I know, since I didn't really need it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of M.-A. Lemburg Sent: Saturday, August 25, 2007 4:36 PM To: Ian Witham Cc: python-list@python.org

Re: localhost, ?!

2007-08-28 Thread Fabio Z Tessitore
Il Tue, 28 Aug 2007 18:27:31 +0200, Boris Ozegovic ha scritto: Three machines, one at my home, other two at my job, in every machine there is Win XP SP2 and Python 2.5 At home: urllib2.urlopen(http://localhost;), everything is ok At job: urllib2.urlopen(http://localhost;) raise

Re: localhost, ?!

2007-08-28 Thread Boris Ozegovic
Fabio Z Tessitore wrote: I think to have http://localhost working you need a web server (like apache). maybe you have it at your home. I do have Apache. You can see that urllib, older module, works correctly. -- http://mail.python.org/mailman/listinfo/python-list

extending of adding method?

2007-08-28 Thread Gerardo Herzig
Hi all. I have a question about design. The general question would be: Where is the line beteween extending a class and adding new methods to that class? And the particular case im involved is: I have a class (say USERCLASS) who implements a user interface. One of his methods is called

Is it reasonably easy easy to something like this with python?

2007-08-28 Thread walterbyrd
This is made with a php5 framework called qcodo. http://examples.qcodo.com/examples/dynamic/inline_editing.php With qcodo it's easy to make grids that are sortable and inline editable. Qcodo grids work from the database - not an xml table or array. Qcodo handles complex data relations, and

Re: tempfile.mkstemp and os.fdopen

2007-08-28 Thread [EMAIL PROTECTED]
On Aug 28, 1:55 pm, billiejoex [EMAIL PROTECTED] wrote: In conjunction I used os.fdopen() to get a wrapper around file properties (write read methods, and so on...) but 'name' attribute does not contain the correct file name. Why? import os import tempfile fileno, name =

Re: Is it reasonably easy easy to something like this with python?

2007-08-28 Thread Gerardo Herzig
walterbyrd wrote: This is made with a php5 framework called qcodo. http://examples.qcodo.com/examples/dynamic/inline_editing.php With qcodo it's easy to make grids that are sortable and inline editable. Qcodo grids work from the database - not an xml table or array. Qcodo handles complex data

Image manipulation

2007-08-28 Thread Slava
I need to add dynamic text to animated GIF images. What is a best way to do it? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: extending of adding method?

2007-08-28 Thread Bjoern Schliessmann
Gerardo Herzig wrote: Hi all. I have a question about design. The general question would be: Where is the line beteween extending a class and adding new methods to that class? What do you mean by extending? The Java extends, which is really inheritance? And the particular case im involved

Re: localhost, ?!

2007-08-28 Thread Bjoern Schliessmann
Boris Ozegovic wrote: At job: urllib2.urlopen(http://localhost;) raise BadStatusLine(line), after half a minute. Looks like name resolving problems. urllib2.urlopen(http://127.0.0.1;) HTTP Error 503: Service Unavailable, immediately. Definitely a problem with the web server (503 means

Re: tempfile.mkstemp and os.fdopen

2007-08-28 Thread Michael J. Fromberger
In article [EMAIL PROTECTED], billiejoex [EMAIL PROTECTED] wrote: Hi there. I'm trying to generate a brand new file with a unique name by using tempfile.mkstemp(). In conjunction I used os.fdopen() to get a wrapper around file properties (write read methods, and so on...) but 'name'

Re: Image manipulation

2007-08-28 Thread Michael J. Fromberger
In article [EMAIL PROTECTED], Slava [EMAIL PROTECTED] wrote: I need to add dynamic text to animated GIF images. What is a best way to do it? Thanks. One possibility is the GD library, which supports animated GIF. There is a Python binding:

Re: localhost, ?!

2007-08-28 Thread Boris Ozegovic
Bjoern Schliessmann wrote: Definitely a problem with the web server (503 means service unavailable). I did try on two servers, Apache and simple python server. There was identically error on both servers. Anybody have slightest clue wthat is going on? :-/ Try using wireshark or a

Tix HList missing at least one method

2007-08-28 Thread Ron Provost
According to the Tix documentation online, HList has an info_bbox() method which returns the bounding box of a given item in the HList. However, when I try to call this method, I get an attribute error. Looking at Tix.py I see that info_bbox() is not implemented. Hazarding a chance (mostly

Re: Biased random?

2007-08-28 Thread Jeffrey Barish
Ivan Voras wrote: Hi, I have a list of items, and need to choose several elements from it, almost random. The catch is that the elements from the beginning should have more chance of being selected than those at the end (how much more? I don't care how the envelope of probability looks

Re: tempfile.mkstemp and os.fdopen

2007-08-28 Thread Nick Craig-Wood
billiejoex [EMAIL PROTECTED] wrote: I'm trying to generate a brand new file with a unique name by using tempfile.mkstemp(). Moreover, I'd like to know if I'm doing fine. Does this approach avoid race conditions This is a reasonably secure way of doing things. It can't race under unix

Okay learning python is somewhat hard.

2007-08-28 Thread Lamonte Harris
Since I can't really focus on PROJECTS[since I don't know much python I can't do any projects because all my projects are BIG], So I decided to work on some problems I've gotten from school from started geometry, So I attempted to make a script to get the midpoint of a line segment using the

Re: Is it reasonably easy easy to something like this with python?

2007-08-28 Thread walterbyrd
On Aug 28, 1:31 pm, Gerardo Herzig [EMAIL PROTECTED] wrote: walterbyrd wrote: The one who make that table sorteable is AJAX. Not php. The php part is kind of trivial (so it would be `trivial' in python too). It just reads some data and format it in an html table. Thank you, that is great to

Haskell like (c:cs) syntax

2007-08-28 Thread Stefan Niemann
Hi, sorry that I'm relatively new to Python. But the syntax and semantics of Python already fascinate me, because I'm familiar with functional languages like Haskell. Is there a pattern matching construct in Python like (head : tail), meaning 'head' matches the first element of a list and

Re: localhost, ?!

2007-08-28 Thread Bjoern Schliessmann
Boris Ozegovic wrote: Bjoern Schliessmann wrote: Definitely a problem with the web server (503 means service unavailable). I did try on two servers, Apache and simple python server. There was identically error on both servers. Also try to look at the logs, you're bound find something

Re: Haskell like (c:cs) syntax

2007-08-28 Thread Chris Mellon
On 8/28/07, Stefan Niemann [EMAIL PROTECTED] wrote: Hi, sorry that I'm relatively new to Python. But the syntax and semantics of Python already fascinate me, because I'm familiar with functional languages like Haskell. Is there a pattern matching construct in Python like (head : tail),

Re: Okay learning python is somewhat hard.

2007-08-28 Thread Lamonte Harris
Yep I'll keep hacking at it aye :D. Also I'll do some searching on the new styled classes. On 8/28/07, J. Cliff Dyer [EMAIL PROTECTED] wrote: A couple thoughts: First, your class looks like it describes the line, not just the midpoint. Your method calculates the midpoint of that line, so

Re: Is it reasonably easy easy to something like this with python?

2007-08-28 Thread Gerardo Herzig
walterbyrd wrote: On Aug 28, 1:31 pm, Gerardo Herzig [EMAIL PROTECTED] wrote: walterbyrd wrote: The one who make that table sorteable is AJAX. Not php. The php part is kind of trivial (so it would be `trivial' in python too). It just reads some data and format it in an html table.

Re: Haskell like (c:cs) syntax

2007-08-28 Thread Ricardo Aráoz
Stefan Niemann wrote: Hi, sorry that I'm relatively new to Python. But the syntax and semantics of Python already fascinate me, because I'm familiar with functional languages like Haskell. Is there a pattern matching construct in Python like (head : tail), meaning 'head' matches the

Re: Haskell like (c:cs) syntax

2007-08-28 Thread Paul Rubin
Stefan Niemann [EMAIL PROTECTED] writes: Is there a pattern matching construct in Python like (head : tail), meaning 'head' matches the first element of a list and 'tail' matches the rest? I could not find this in the Python documentation. Python's lists are actually linear arrays. You can

Re: Haskell like (c:cs) syntax

2007-08-28 Thread Erik Jones
On Aug 28, 2007, at 5:12 PM, Chris Mellon wrote: On 8/28/07, Stefan Niemann [EMAIL PROTECTED] wrote: Hi, sorry that I'm relatively new to Python. But the syntax and semantics of Python already fascinate me, because I'm familiar with functional languages like Haskell. Is there a

New style classes

2007-08-28 Thread Lamonte Harris
Whats the point of object? How do I actually use it. I'm not understanding correctly from the python site located: http://www.python.org/download/releases/2.2.3/descrintro/ class C(object): def __init__(self): self.__x = 0 def getx(self): return self.__x def

Re: Check for dict key existence, and modify it in one step.

2007-08-28 Thread Ben Finney
rodrigo [EMAIL PROTECTED] writes: Im using this construct a lot: if dict.has_key(whatever): dict[whatever] += delta else: dict[whatever] = 1 I'd prefer: foo.setdefault(whatever, 0) foo[whatever] += delta sometimes even nested: if dict.has_key(whatever): if

Gmane's been quiet ...

2007-08-28 Thread Steve Holden
... so I was wondering if it's just me who hasn't seen any postings today? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden --- Asciimercial

  1   2   3   >