Re: Can Parallel Python run on a muti-CPU server ?

2007-02-06 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Hi all, > > I'm interested in Parallel Python and I learned from the website of > Parallel Python > that it can run on SMP and clusters. But can it run on a our muti-CPU > server ? > We are running an origin3800 server with 128 CPUs. > > Thanks. > I have tested that

Re: Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 11:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > output = os.popen(command, 'r', 1) OOPS... I imagine the ridiculous buffer size is unnecessary... I was trying to get it to work with the original for loop iterating on output, it should work fine without it. Pete -- http

Re: Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 5:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to write a python cgi that calls a script over ssh, the > problem is the script takes a very long time to execute so Apache > makes the CGI time out and I never see any output. The script is set > to print a

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-06 Thread Michele Simionato
On Feb 6, 4:40 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > > Huge amounts of my pure Python code was broken by Python 2.5. > > Interesting. Could you give a few illustrations of this? (I didn't run > into the same problem at all, so I'm curiou

Re: multithreading concept

2007-02-06 Thread Paddy
On Feb 7, 1:53 am, "S.Mohideen" <[EMAIL PROTECTED]> wrote: > Hi Folks, > > Python is praised about - me too. But at one instance it fails. It fails to > behave as a true multi-threaded application. That means utilizing all the > CPUs parallely in the SMP efficiently stays as a dream for a Python >

Re: Steiner Tree

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 7, 4:11 am, [EMAIL PROTECTED] wrote: > Suresh: > > > I could find GeoSteiner (http://www.diku.dk/geosteiner/) which is > > implemented as a C program. Anybody know python wrapper for this? > > Anybody tried this program in a python program? > > Once compiled, you may just need to use it wit

Re: need help to kill a process

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 22:59:40 -0300, <[EMAIL PROTECTED]> escribió: > this is my code snip. > within my python script I have the following commands.. > > > > import os > ... > os.system ("cd /home; ./TestTool &") > os.system ("cd /usr/; sh run.sh load.xml &") > > > > I need to kill these 2 process

Re: Dictionary/Hash question

2007-02-06 Thread Gabriel Genellina
En Wed, 07 Feb 2007 00:28:31 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > qualm after qualm. Before you read this, my OS is Linux, up2date, and > minimal RAM (512). And Python 2.3 or earlier, I presume, else you would have the builtin set type. > The files that my script needs to read

Re: Graphs, bar charts, etc

2007-02-06 Thread Joshua J. Kugler
Jan Danielsson wrote: > Hello all, > >I have some data in a postgresql table which I view through a web > interface (the web interface is written in python -- using mod_python > under apache 2.2). Now I would like to represent this data as graphs, > bar charts, etc. > >I know about matpl

Re: Return images with matplotlib?

2007-02-06 Thread Joshua J. Kugler
Jan Danielsson wrote: > Hello all, > >I have written a program which takes some data from a postgresql > database, and via mod_python outputs it as tables on a web site. Now I > would like to present these tables as graphs, which matplotlib can do. > But in order to properly display these g

Re: Dictionary/Hash question

2007-02-06 Thread Sick Monkey
qualm after qualm. Before you read this, my OS is Linux, up2date, and minimal RAM (512). On purpose becuase I want this app to run on anything. I have 2 very good solutions to this problem (AND I WANT TO THANK 'Gabriel Genellina' AND 'Don Morrison' with comparing 2 LARGE files). (LARGE means an

Re: IOError: [Errno 4] Interrupted system call

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 22:09:00 -0300, Marco <[EMAIL PROTECTED]> escribió: > in my old script, I usually use os.popen2() to get info from standard > unix(LinuX) program like ps,ifconfig... > > Now, I write a OO-based programme, I still use os.popen2( check > whether mplayer still working via ps comma

Re: Threading in Python

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 7, 11:14 am, "S.Mohideen" <[EMAIL PROTECTED]> wrote: > Python is praised about - me too. But at one instance it fails. It fails to > behave as a true multi-threaded application. That means utilizing all the > CPUs parallely in the SMP efficiently stays as a dream for a Python > Programmer. >

Re: VIDEO: US OIL NAZIS MAKE FUN OF KIDS

2007-02-06 Thread [EMAIL PROTECTED]
There is more ... Some American soldiers raped Iraqi girls and The conservatives living in America still says they are not guilty.Bush must take responsible of these situation.These are massed most of Americans. [EMAIL PROTECTED] wrote: > Pretzel, please include scientific newsgroups like > sci

Re: Trouble fixing a broken ASCII string - "replace" mode in codec not working.

2007-02-06 Thread Neil Cerutti
On 2007-02-06, Robert Kern <[EMAIL PROTECTED]> wrote: > John Nagle wrote: >> File "D:\projects\sitetruth\InfoSitePage.py", line 285, in httpfetch >> sitetext = sitetext.encode('ascii','replace') # force to clean ASCII >> >> UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in >> pos

Can Parallel Python run on a muti-CPU server ?

2007-02-06 Thread [EMAIL PROTECTED]
Hi all, I'm interested in Parallel Python and I learned from the website of Parallel Python that it can run on SMP and clusters. But can it run on a our muti-CPU server ? We are running an origin3800 server with 128 CPUs. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

need help to kill a process

2007-02-06 Thread elrondrules
Hi Am new to python and need your help!! this is my code snip. within my python script I have the following commands.. import os ... os.system ("cd /home; ./TestTool &") os.system ("cd /usr/; sh run.sh load.xml &") I need to kill these 2 process after a particular job is done.. is there any

multithreading concept

2007-02-06 Thread S.Mohideen
Hi Folks, Python is praised about - me too. But at one instance it fails. It fails to behave as a true multi-threaded application. That means utilizing all the CPUs parallely in the SMP efficiently stays as a dream for a Python Programmer. Discussion threads say its due to GIL - global interprete

Re: Dictionary/Hash question

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 22:18:07 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > I have never seen this "with open(fname,'r') as finput:" > > It is actually throwing an error . Do I have to import a special > library to > use this? > > File "dictNew.py", line 23 > with open(fname,'r') as

Re: Dictionary/Hash question

2007-02-06 Thread Sick Monkey
I have never seen this "with open(fname,'r') as finput:" It is actually throwing an error . Do I have to import a special library to use this? File "dictNew.py", line 23 with open(fname,'r') as finput: ^ SyntaxError: invalid syntax On 2/6/07, Gabriel Genellina <[EMAIL PROTECTED]>

IOError: [Errno 4] Interrupted system call

2007-02-06 Thread Marco
Hello,every one, I meet a question: in my old script, I usually use os.popen2() to get info from standard unix(LinuX) program like ps,ifconfig... Now, I write a OO-based programme, I still use os.popen2( check whether mplayer still working via ps command ), but some things I got the following mes

Re: Dictionary/Hash question

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 20:31:17 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > Even though I am starting to get the hang of Python, I continue to find > myself finding problems that I cannot solve. > I have never used dictionaries before and I feel that they really help > improve efficiency whe

Re: British school refuses to withdraw book descibing Jews as monkeys and Xtians as pigs

2007-02-06 Thread thermate2
Habshi, please include scientific newsgroups like sci.math,comp.lang.python,sci.optics,soc.culture.usa,soc.culture.europe in your valuable posts On Feb 6, 3:57 pm, [EMAIL PROTECTED] (habshi) wrote: > The problem is that the verses are from the Quran. The video > is remarkably clear . Congr

Re: WATER DEAL EXPOSES SECRET IRAQ CONTRACTS

2007-02-06 Thread thermate2
Pretzel, please include scientific newsgroups like sci.math,comp.lang.python,sci.optics,soc.culture.usa,soc.culture.europe in your valuable posts On Feb 6, 4:12 pm, [EMAIL PROTECTED] or www.mantra.com/jai (Dr. Jai Maharaj) wrote: > Water Deal Exposes Secret Iraq Contracts > > By Katherine Shrader

Re: division by 7 efficiently ???

2007-02-06 Thread John Machin
On Feb 7, 11:05 am, [EMAIL PROTECTED] wrote: > On Feb 6, 4:54 pm, "John Machin" <[EMAIL PROTECTED]> wrote: > > > Recursive? Bzzzt! > > I woudl be happy to hear your alternative, which doesn't depend on > language specific tricks. Thus far, all you have suggested is using an > alternative form of th

Re: VIDEO: US OIL NAZIS MAKE FUN OF KIDS

2007-02-06 Thread thermate
Pretzel, please include scientific newsgroups like sci.math,comp.lang.python,sci.optics,soc.culture.usa,soc.culture.europe in your valuable posts On Feb 6, 4:24 pm, "Möbius Pretzel" <[EMAIL PROTECTED]> wrote: > Breaking News: US Soldiers Do It Again- Please Watch! > By: Seele > > 06.02.2007 > > US

Re: Coordinate Grid Points

2007-02-06 Thread Matimus
[code] #classify "Point" class Point(object): def _init_(self, x, y): <--- This is your problem self.x = x self.y = y [/code] That should be '__init__'. Two underscores before and after. But, IMHO, I don't think a class is really necessary unless you a

Re: Coordinate Grid Points

2007-02-06 Thread Eric . Gabrielson
On Feb 6, 4:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 06 Feb 2007 20:35:43 -0300, <[EMAIL PROTECTED]> escribió: > > > > > Anyways heres my error: > > > > **

Threading in Python

2007-02-06 Thread S.Mohideen
Python is praised about - me too. But at one instance it fails. It fails to behave as a true multi-threaded application. That means utilizing all the CPUs parallely in the SMP efficiently stays as a dream for a Python Programmer. Discussion threads say its due to GIL - global interpreter lock.

Re: Yanks gone mad :- for the spoooook bAbe -: Murder in space

2007-02-06 Thread thermate
> http://www.freep.com/apps/pbcs.dll/article?AID=/20070206/NEWS07/70206... > > The Astronaut Babe > February 6, 2007 > > BEGIN TRANSCRIPT > RUSH: So we have this astronaut babe Lisa Nowak. She's 43 years old. > She flew last July on a shuttle mission to the Internationa

Re: division by 7 efficiently ???

2007-02-06 Thread garrickp
On Feb 6, 4:54 pm, "John Machin" <[EMAIL PROTECTED]> wrote: > Recursive? Bzzzt! I woudl be happy to hear your alternative, which doesn't depend on language specific tricks. Thus far, all you have suggested is using an alternative form of the division function, which I would consider to be outside

Re: Coordinate Grid Points

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 20:35:43 -0300, <[EMAIL PROTECTED]> escribió: > Anyways heres my error: > > ***File "C:/Documents and Settings/Eric/Desktop/Python/2d guessing > game.py", li

Re: Coordinate Grid Points

2007-02-06 Thread greg
[EMAIL PROTECTED] wrote: > class Point(object): > def _init_(self, x, y): The name of the __init__ method needs *two* underscores at each end, i.e. def __init__(self, x, y): -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Yanks gone mad :- for the spoooook bAbe -: Murder in space

2007-02-06 Thread thermate
/pbcs.dll/article?AID=/20070206/NEWS07/70206009/0/BLOG01 The Astronaut Babe February 6, 2007 BEGIN TRANSCRIPT RUSH: So we have this astronaut babe Lisa Nowak. She's 43 years old. She flew last July on a shuttle mission to the International Space Station. She drove all the way from Houston to the Or

Re: division by 7 efficiently ???

2007-02-06 Thread John Machin
On Feb 7, 2:29 am, [EMAIL PROTECTED] wrote: > On Feb 1, 8:25 pm, "Krypto" <[EMAIL PROTECTED]> wrote: > > > The correct answer as told to me by a person is > > (N>>3) + ((N-7*(N>>3))>>3) > > The above term always gives division by 7 > > Does anybody else notice that this breaks the spirit of the pro

Re: Python does not play well with others

2007-02-06 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > It's possible that we could build it all in a startup module and then > pickle everything we've built into a file that each child would > unpickle, but I'm a bit leery about that approach. Yeah, that's not so great. You could look at POSH. -- htt

Re: Coordinate Grid Points

2007-02-06 Thread Eric . Gabrielson
On Feb 5, 6:33 pm, James Stroud <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Feb 5, 3:29 pm, James Stroud <[EMAIL PROTECTED]> wrote: > > >>[EMAIL PROTECTED] wrote: > > >>>Hello, > >>> I am very knew to python and am attempting to write a program > >>>in python that a friend of

Dictionary/Hash question

2007-02-06 Thread Sick Monkey
Even though I am starting to get the hang of Python, I continue to find myself finding problems that I cannot solve. I have never used dictionaries before and I feel that they really help improve efficiency when trying to analyze huge amounts of data (rather than having nested loops). Basically w

Re: Python does not play well with others

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 4:27 pm, Paul Rubin wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > In our case, the issue is this: we load a ton of info at server > > restart, from the database. Some of it gets processed a bit based on > > configuration files and so forth. If t

Re: Steiner Tree

2007-02-06 Thread bearophileHUGS
Suresh: > I could find GeoSteiner (http://www.diku.dk/geosteiner/) which is > implemented as a C program. Anybody know python wrapper for this? > Anybody tried this program in a python program? Once compiled, you may just need to use it with files calling it through the console with pipes from Py

Re: Graphs, bar charts, etc

2007-02-06 Thread dimitri pater
Hi, check out chartdirector : http://www.advsofteng.com/ it's not free, but very easy to use right now I am testing it here: http://www.serpia.org/water a very simple barchart regards, Dimitri On 2/6/07, Jan Danielsson <[EMAIL PROTECTED]> wrote: Hello all, I have some data in a postgresql

Re: Help reading binary data from files

2007-02-06 Thread John Machin
On Feb 7, 9:34 am, "jeff" <[EMAIL PROTECTED]> wrote: > On Feb 6, 4:01 pm, "jeff" <[EMAIL PROTECTED]> wrote: > > > > > I am stumped trying to read binary data from simple files. Here is a > > code snippet, where I am trying to simply print little-endian encoded > > data from files in a directory. >

Re: Help reading binary data from files

2007-02-06 Thread John Machin
On Feb 7, 9:01 am, "jeff" <[EMAIL PROTECTED]> wrote: > I am stumped trying to read binary data from simple files. Here is a > code snippet, where I am trying to simply print little-endian encoded > data from files in a directory. > > for name in os.listdir(DOWNLOAD_DIR): > file

Re: Help reading binary data from files

2007-02-06 Thread jeff
On Feb 6, 4:01 pm, "jeff" <[EMAIL PROTECTED]> wrote: > I am stumped trying to read binary data from simple files. Here is a > code snippet, where I am trying to simply print little-endian encoded > data from files in a directory. > > for name in os.listdir(DOWNLOAD_DIR): > file

Re: Help reading binary data from files

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 19:01:20 -0300, jeff <[EMAIL PROTECTED]> escribió: > I am stumped trying to read binary data from simple files. Here is a > code snippet, where I am trying to simply print little-endian encoded > data from files in a directory. > > for name in os.listdir(DOWNLOAD_DIR): >

Re: Help reading binary data from files

2007-02-06 Thread Grant Edwards
On 2007-02-06, jeff <[EMAIL PROTECTED]> wrote: > I am stumped trying to read binary data from simple files. Here is a > code snippet, where I am trying to simply print little-endian encoded > data from files in a directory. > > for name in os.listdir(DOWNLOAD_DIR): > filename =

Re: Recursive zipping of Directories in Windows

2007-02-06 Thread Jim
On Feb 6, 2:47 pm, "MRAB" <[EMAIL PROTECTED]> wrote: > On Feb 6, 1:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > On Feb 4, 12:42 pm, "Jandre" <[EMAIL PROTECTED]> wrote: > > > > On Feb 1, 9:39 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > > > > > Jandre wrote: > > > > > Hi > > > > >

Re: Python editor

2007-02-06 Thread Stef Mientki
BBands wrote: > No, no, no, this is not an invitation to the editor wars. > > I have been using José Cláudio Faria's superb Tinn-R, > http://www.sciviews.org/Tinn-R/, > with the R language, http://www.r-project.org/. This editor allows you > to send code to the R shell for execution. You can easi

Help reading binary data from files

2007-02-06 Thread jeff
I am stumped trying to read binary data from simple files. Here is a code snippet, where I am trying to simply print little-endian encoded data from files in a directory. for name in os.listdir(DOWNLOAD_DIR): filename = s.path.join(DOWNLOAD_DIR, name) if os.pa

Re: How can I use __setitem__ method of dict object?

2007-02-06 Thread Bruno Desthuilliers
jeremito a écrit : > On Feb 6, 2:36 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > (snip) >>Here's an alternative implementation, so you get the idea. >> >>class Xs(dict): oops ! I meant: class Xs(object): of course... (snip) > I guess I just > need more experience. Possibly -

Re: Running long script in the background

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 16:44:52 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On Feb 6, 2:02 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> On 6 Feb 2007 07:37:33 -0800, "[EMAIL PROTECTED]" >> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: >> >> > Everything works

Re: Python does not play well with others

2007-02-06 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > In our case, the issue is this: we load a ton of info at server > restart, from the database. Some of it gets processed a bit based on > configuration files and so forth. If this were done in my own C > server, I'd do all of that and set up the (r

Re: division by 7 efficiently ???

2007-02-06 Thread MRAB
On Feb 6, 3:29 pm, [EMAIL PROTECTED] wrote: > On Feb 1, 8:25 pm, "Krypto" <[EMAIL PROTECTED]> wrote: > > > The correct answer as told to me by a person is > > (N>>3) + ((N-7*(N>>3))>>3) > > The above term always gives division by 7 > > Does anybody else notice that this breaks the spirit of the pro

Re: Dlaczego ten destruktor nie dziala [_LONG_]

2007-02-06 Thread Jacol
>> self.__class__.__bases__[0].__del__(self) >> Swoją drogą to nie masz litości pisząc coś takiego ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Dlaczego ten destruktor nie dziala [_LONG_]

2007-02-06 Thread Jacol
Sulsa wrote: > Mam klase A po ktorej dziedziczy B i jesli w destruktorze klasy B > wywolam: > self.__class__.__bases__[0].__del__(self) > > to wszytkos jest ok, i destruktor klasy a jest wywolywany, jesli > natomiast napisze: A.__del__(self) to otrzymuje nastepujacy wyjatek: > Exception exceptio

Re: Python does not play well with others

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 5, 5:45 pm, "Graham Dumpleton" <[EMAIL PROTECTED]> wrote: > On Feb 6, 8:57 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > On Feb 5, 12:52 pm, John Nagle <[EMAIL PROTECTED]> wrote: > > > > [EMAIL PROTECTED] wrote: > > > > John Nagle wrote: > > > > >>Graham Dumpleton wrote: > > >

Re: Python editor

2007-02-06 Thread Bruno Desthuilliers
BBands a écrit : > No, no, no, this is not an invitation to the editor wars. > > I have been using José Cláudio Faria's superb Tinn-R, > http://www.sciviews.org/Tinn-R/, > with the R language, http://www.r-project.org/. This editor allows you > to send code to the R shell for execution. You can e

Re: Calling J from Python

2007-02-06 Thread bearophileHUGS
Gosi: > There are a number of graphics examples, utilities and demos you can > use in J and combine it with Python. Some of those graphic examples are very nice, I have seen a big site filled with complex fractals, chaotic attractors, etc. Python Zen seems somewhat opposed to part of the J spirit,

Re: How can I use __setitem__ method of dict object?

2007-02-06 Thread jeremito
On Feb 6, 2:36 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > jeremito a écrit : > > > > > On Feb 6, 10:59 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > >>On 6 fév, 16:23, "jeremito" <[EMAIL PROTECTED]> wrote: > > (snip) > >>>But I can't even get __setitem__ to run. > > >>of cour

Re: Python editor

2007-02-06 Thread Jean-Paul Calderone
On 6 Feb 2007 12:51:13 -0800, BBands <[EMAIL PROTECTED]> wrote: >No, no, no, this is not an invitation to the editor wars. > >I have been using José Cláudio Faria's superb Tinn-R, >http://www.sciviews.org/Tinn-R/, >with the R language, http://www.r-project.org/. This editor allows you >to send cod

Re: Missing member

2007-02-06 Thread Bruno Desthuilliers
Mizipzor a écrit : > I have some troubles with a member variable that seems to be missing > in a class. In short, heres what I do; class A is the parent class, B > inherits from A and C inherits from B (hope I used the right words > there). Now, I create an instance of C, which calls A's __init__ w

Re: Two mappings inverse to each other: f, g = biject()

2007-02-06 Thread bearophileHUGS
Jonathan Fine: > A google search for biject.py and bijection.py > produced no hits, so I suspect that this may not > have been done before. There are few (good too) implementations around, but they are called bidict or bidirectional dicts. Sometimes I use this implementation, with few changes: htt

Re: electronics and python

2007-02-06 Thread Stef Mientki
lee wrote: > Hi guys.Is there any software written using python for > electronics.i mean any simulation software or something?? > There are a few starts, (I can't find my notes right now, so from my head) - there's a 68c11 simulator - there's a spice implementation or at least a good coupl

Re: electronics and python

2007-02-06 Thread Richard Charts
On Feb 6, 1:38 pm, "lee" <[EMAIL PROTECTED]> wrote: > Hi guys.Is there any software written using python for > electronics.i mean any simulation software or something?? There's MyHDL. http://myhdl.jandecaluwe.com/doku.php I found it originally in a Linux Journal article some years ago. ht

Python editor

2007-02-06 Thread BBands
No, no, no, this is not an invitation to the editor wars. I have been using José Cláudio Faria's superb Tinn-R, http://www.sciviews.org/Tinn-R/, with the R language, http://www.r-project.org/. This editor allows you to send code to the R shell for execution. You can easily send a line, the select

Re: Recursive zipping of Directories in Windows

2007-02-06 Thread MRAB
On Feb 6, 1:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Feb 4, 12:42 pm, "Jandre" <[EMAIL PROTECTED]> wrote: > > > > > On Feb 1, 9:39 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > > > > Jandre wrote: > > > > Hi > > > > > I am a python novice and I am trying to write a python script (m

Re: Python cheatsheets

2007-02-06 Thread cyberco
> If you have a good color printer, try > PQRChttp://www.limsi.fr/Individu/pointal/python/pqrc/ That is a very usefull document to use besides Richard Gruets quick ref. The only disadvantage is that it's a PDF document, pity there's no HTML version. 2B -- http://mail.python.org/mailman/listinf

Re: Trouble fixing a broken ASCII string - "replace" mode in codec not working.

2007-02-06 Thread Robert Kern
John Nagle wrote: > I'm trying to clean up a bad ASCII string, one read from a > web page that is supposedly in the ASCII character set but has some > characters above 127. And I get this: > > File "D:\projects\sitetruth\InfoSitePage.py", line 285, in httpfetch > sitetext = sitetext.en

Re: XMLRPC Server

2007-02-06 Thread Brian Quinlan
Fredrik Lundh wrote: > well, if you're talking pure CGI, you need to start the interpreter, > import the required modules, connect to the database, unmarshal the > xml-rpc request, talk to the database, marshal the response, and shut > down, in less than 30 milliseconds. > > just importing the

Re: electronics and python

2007-02-06 Thread Bill Scherer
lee wrote: >Hi guys.Is there any software written using python for >electronics.i mean any simulation software or something?? > > Here's 'something': http://home.tiscali.be/be052320/Unum.html I find it useful for basic electronics math (Ohm's law, filters, etc). It keeps track of the u

Trouble fixing a broken ASCII string - "replace" mode in codec not working.

2007-02-06 Thread John Nagle
I'm trying to clean up a bad ASCII string, one read from a web page that is supposedly in the ASCII character set but has some characters above 127. And I get this: File "D:\projects\sitetruth\InfoSitePage.py", line 285, in httpfetch sitetext = sitetext.encode('ascii','replace') # for

Re: Running long script in the background

2007-02-06 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Web pages can show output as it's sent. For testing I created a > script on the server that untars a 600 meg volume, I can see each file > name show up in my browser instantly, just like it should. The other > script I'm trying to run won't show anything until the enti

Re: Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 2:02 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 6 Feb 2007 07:37:33 -0800, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > Everything works fine until I call the popen function, then it > > freezes. What I want is to print the o

Re: Running long script in the background

2007-02-06 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > I tried flushing stdout and the same thing happens. As soon as the > os.popen(command) line runs it stops there, the next print statement > never even runs. > > I've also tried using os.spawnv to make the process run in the > background but then the ssh command never r

Re: How can I use __setitem__ method of dict object?

2007-02-06 Thread Bruno Desthuilliers
jeremito a écrit : > On Feb 6, 10:59 am, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: > >>On 6 fév, 16:23, "jeremito" <[EMAIL PROTECTED]> wrote: >> (snip) >>>But I can't even get __setitem__ to run. >> >>of course, since your __new__ method returns a dict instance, not a xs >>instance... >>The

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-06 Thread Jean-Paul Calderone
On Tue, 06 Feb 2007 08:40:40 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: >Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > Huge amounts of my pure Python code was broken by Python 2.5. > >Interesting. Could you give a few illustrations of this? (I didn't run >into the same problem at all, so

Re: XMLRPC Server

2007-02-06 Thread Fredrik Lundh
Brian Quinlan wrote: > Actually, you might not have to. 2000 calls/minute isn't that big, > assuming you have a decent server. well, if you're talking pure CGI, you need to start the interpreter, import the required modules, connect to the database, unmarshal the xml-rpc request, talk to the d

Re: How can I access data from MS Access?

2007-02-06 Thread BartlebyScrivener
On Feb 5, 4:52 am, "Andy Dingley" <[EMAIL PROTECTED]> wrote: > On 3 Feb, 15:43, [EMAIL PROTECTED] wrote: > > > How to access data from MS Access? > > First of all check that the DSN is working and connects to the > back end MDB. This might not be Python's problem. > > Secondly check whatever errors

Re: Repr or Str ?

2007-02-06 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Johny" <[EMAIL PROTECTED]> wrote: > Where and when is good/nescessary to use `repr` instead of `str` ? > Can you please explain the differences You expect repr to include information that you might call `meta-data' or `type' -- object class and so forth. To the

Re: Help with multiple key sort

2007-02-06 Thread ian . brady1
Paul already answered it. Tnx Paul. My data is in a file and now I have to take care to strip \t and \n from it. Thanks > I'm not a guru. Maybe that's why I don't understand which "sql-like > sort-by on multiple keys" would produce output that lacks some of the > input but has additional items.

Re: Help with multiple key sort

2007-02-06 Thread Jussi Salmela
[EMAIL PROTECTED] kirjoitti: > gurus: > > I want to implement a sql-like sort-by on multiple keys. I've seen > many examples of just two keys. > > I have a list like this > > 1 one 2 > 1 one 1 > 1 two 1 > 1 one 0 > 1 xx 0 > > result should be like this > > 1 four 2 > 1 one 0 > 1 one 1 > 1 o

Re: How can I access data from MS Access?

2007-02-06 Thread Andy Dingley
On 5 Feb, 19:40, "Sells, Fred" <[EMAIL PROTECTED]> wrote: > Years ago we used to get our FORTRAN card decks back from the DP center > with a piece of scrap paper saysing "She No Work". top that. I used to use a cross-compiler (targetting some obscure single-chip hardware) that had just a single

Re: How to prevent from race conditions to share data between many process and thread in python

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 08:49:51 -0300, Diez B. Roggisch <[EMAIL PROTECTED]> escribió: > mars wrote: > >> On 2月6日, 下午6时14分, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >>> mars wrote: >>> > I use TurboGears to do some web service. TurboGears use cherrypy. >>> When >>> > web browser access this s

Re: Help with multiple key sort

2007-02-06 Thread Paul Rubin
[EMAIL PROTECTED] writes: > It moves right while keeping sorted order to the left. This is the > new stable sort in 2.5. >>> b ['1 one 2', '1 one 1', '1 two 1', '1 one 0', '1 xx 0'] >>> sorted(b,key=lambda x: x.split()) ['1 one 0', '1 one 1', '1 one 2', '1 two 1', '1 xx 0'] -- http://mail.py

electronics and python

2007-02-06 Thread lee
Hi guys.Is there any software written using python for electronics.i mean any simulation software or something?? -- http://mail.python.org/mailman/listinfo/python-list

Help with multiple key sort

2007-02-06 Thread ian . brady1
gurus: I want to implement a sql-like sort-by on multiple keys. I've seen many examples of just two keys. I have a list like this 1 one 2 1 one 1 1 two 1 1 one 0 1 xx 0 result should be like this 1 four 2 1 one 0 1 one 1 1 one 2 1 xx 0 It moves right while keeping sorted order to the lef

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-06 Thread skip
John> MySQLdb isn't fully supported for Python 2.5 yet, and there's no John> tested Windows executable available, although there's an untested John> version from a World of Warcraft guild available. As Andy Dustman has pointed out a number of times, he doesn't do Windows. Someone in t

Re: Module problem

2007-02-06 Thread Boris Ozegovic
Matimus wrote: > Do you have more than one version of Python installed? Is > win32clipboard installed for both versions? It could be that the Yup, that was the problem. Thanx! -- "A mi smo stranci u vlastitoj zemlji zbog ljudskog sljama, lipa nasa silovana" -- http://mail.python.org/mailman/l

Re: Calling J from Python

2007-02-06 Thread Bruno Desthuilliers
Gosi a écrit : > On Feb 6, 3:04 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >>On Feb 5, 8:48 am, "Gosi" <[EMAIL PROTECTED]> wrote: >> >> >>>It is quite easy to call J from Python >> >>>http://groups.google.com/group/J-Programming/browse_thread/thread/5e8... >> >>There are a couple of issu

Testing a website with HTTPS login and cookies

2007-02-06 Thread Dwyer, Mike # ATLANTA
Did you ever get a response to your posting on "Testing a website with HTTPS login and cookies"? The reason I ask is that I need to do a similar thing, and am not being very successful getting pointers or sample code. Any response appreciated. /mike -- http://mail.python.org/mailman/listinfo/pyt

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-06 Thread John Nagle
Steven Bethard wrote: > Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > Huge amounts of my pure Python code was broken by Python 2.5. > > Interesting. Could you give a few illustrations of this? (I didn't run > into the same problem at all, so I'm curious.) > > Steve I'd like to know, to

Re: Module problem

2007-02-06 Thread Matimus
On Feb 6, 9:29 am, Boris Ozegovic <[EMAIL PROTECTED]> wrote: > Hi > > I am writing some simple script, and when I start my script from command > line (python Imenik.py), everything works perfectly. If I double clik the > same script in my desktop I get the following error: > > "No module name impo

Re: when will python 2.5 take in mainstream?

2007-02-06 Thread Chris Mellon
On 6 Feb 2007 08:46:29 -0800, Ben Sizer <[EMAIL PROTECTED]> wrote: > On Feb 6, 3:35 pm, [EMAIL PROTECTED] (Aahz) wrote: > > Ben Sizer <[EMAIL PROTECTED]> wrote: > > > > >It would be great if someone could invest some time in trying to fix > > >this problem. I don't think I know of any other languag

Re: Python cheatsheets

2007-02-06 Thread Laurent Pointal
Bart Ogryczak wrote: > On Jan 7, 10:03 pm, gonzlobo <[EMAIL PROTECTED]> wrote: >> Curious if anyone has a python cheatsheet* published? I'm looking for >> something that summarizes all commands/functions/attributes. Having >> these printed on a 8" x 11" double-sided laminated paper is pretty >> c

Module problem

2007-02-06 Thread Boris Ozegovic
Hi I am writing some simple script, and when I start my script from command line (python Imenik.py), everything works perfectly. If I double clik the same script in my desktop I get the following error: "No module name import win32clipboard" -- "A mi smo stranci u vlastitoj zemlji zbog ljudsko

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-06 Thread Gabriel Genellina
"John Roth" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > On Feb 6, 8:40 am, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> >> > Huge amounts of my pure Python code was broken by Python 2.5. >> >> Interesting. Could you give a

Re: How can I use __setitem__ method of dict object?

2007-02-06 Thread Gabriel Genellina
"jeremito" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Please excuse me if this is obvious to others, but I can't figure it > out. I am subclassing dict, but want to prevent direct changing of > some key/value pairs. For this I thought I should override the > __setitem__

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-06 Thread John Roth
On Feb 6, 8:40 am, Steven Bethard <[EMAIL PROTECTED]> wrote: > Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > > Huge amounts of my pure Python code was broken by Python 2.5. > > Interesting. Could you give a few illustrations of this? (I didn't run > into the same problem at all, so I'm curiou

Re: when will python 2.5 take in mainstream?

2007-02-06 Thread Ben Sizer
On Feb 6, 3:35 pm, [EMAIL PROTECTED] (Aahz) wrote: > Ben Sizer <[EMAIL PROTECTED]> wrote: > > >It would be great if someone could invest some time in trying to fix > >this problem. I don't think I know of any other languages that require > >recompilation of libraries for every minor version increas

Re: How can I use __setitem__ method of dict object?

2007-02-06 Thread jeremito
On Feb 6, 10:59 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 6 fév, 16:23, "jeremito" <[EMAIL PROTECTED]> wrote: > > > > > Please excuse me if this is obvious to others, but I can't figure it > > out. I am subclassing dict, but want to prevent direct changing of > > some key/value pairs

  1   2   >