Re: sending bytes to parallel port

2006-07-29 Thread Diez B. Roggisch
> *sigh* > if only pyparallel would install *sigh* If only you said _what_ failed we could maybe help you make it work... :) Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find difference in years between two dates?

2006-07-29 Thread thebjorn
John Machin wrote: > I don't understand. The examples that I showed went from the last day > of a month to the last day of another month. [...] Q1: is ((date-4days)+4days) == date? Q2: is (((date-4days)+1month)+4days) == date+1month? Ok, let's use Python'ish syntax (including numbering the days f

Re: sending bytes to parallel port

2006-07-29 Thread Timothy Smith
Diez B. Roggisch wrote: >> *sigh* >> if only pyparallel would install >> > > *sigh* If only you said _what_ failed we could maybe help you make it > work... :) > > Diez > titan# python setup.py install running install running build running build_py Traceback (most recent call last): File

Re: HERE I BUILT A QUICK MATRIX TOOOK 5 MINS

2006-07-29 Thread H J van Rooyen
"Grant Edwards" <[EMAIL PROTECTED]> wrote: | On 2006-07-28, Paul McGuire <[EMAIL PROTECTED]> wrote: | >> ...USING A INFINITE MAGENTIC | >> FIELD!!! | > | > I have a vision of a sweeping magenta fabric rippling through the cosmos. | > | > Perhaps a mauvic, cyanic, or even aubergenic field would be

Re: How to force a thread to stop

2006-07-29 Thread H J van Rooyen
"Paul Rubin" Writes: | "H J van Rooyen" <[EMAIL PROTECTED]> writes: | > *grin* - Yes of course - if the WDT was enabled - its something that | > I have not seen on PC's yet... | | They are available for PC's, as plug-in cards, at least for the ISA | bus in the old days

Re: How to force a thread to stop

2006-07-29 Thread H J van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote: | On Fri, 28 Jul 2006 08:27:18 +0200, "H J van Rooyen" | <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: | | > | > Dennis - did your OS not have a ticker running? | > | That ancient machine, while round-robin, multi-priority, | pre-e

Re: sending bytes to parallel port

2006-07-29 Thread H J van Rooyen
"Timothy Smith" <[EMAIL PROTECTED]> wrote: | Grant Edwards wrote: | > On 2006-07-28, Timothy Smith <[EMAIL PROTECTED]> wrote: | > | > | >> i've been trying to send an 8 byte string to my parallel port | >> under freebsd. the purpose is it to control a relay board. the | >> board simply responds t

Re: War chest for writing web apps in Python?

2006-07-29 Thread Rob Sinclar
On Saturday 29 July 2006 03:43, Nick Vatamaniuc wrote: > Aptitude, are you still using that? Just use Synaptic on Ubuntu. The > problem as I wrote in my post before is that for some IDEs you don't > just download an executable but because they are written for Linux > first, on Windows you have to

Re: metaclass : parse all class once before doing anything else ?

2006-07-29 Thread Diez B. Roggisch
Laurent Rahuel schrieb: > I got a metaclass named Foo I have the impression that you are not talking about a meta-class, but a normal class here. > Then I got two others classes: > > class Bar(Foo): > pass > > class Baz(Foo): > pass > > I know how to add some attrs, methods t

Re: War chest for writing web apps in Python?

2006-07-29 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Rob Sinclar wrote: > Synaptic is using aptitude as back-end (this is serious). Why can I deinstall aptitude without deinstalling synaptic then!? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: How to force a thread to stop

2006-07-29 Thread Paul Rubin
"H J van Rooyen" <[EMAIL PROTECTED]> writes: > That is cool, I was not aware of this - added to a long running server it will > help to make the system more stable - a hardware solution to hard to find bugs > in Software - (or even stuff like soft errors in hardware - speak to the > Avionics boys a

Re: HERE I BUILT A QUICK MATRIX TOOOK 5 MINS

2006-07-29 Thread Diez B. Roggisch
> I find myself in the unenviable position that I can no longer remember the > colour of magic as expressed in Terry Pratchett's books - was it something > like > Octarine? AFAIK yes. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: War chest for writing web apps in Python?

2006-07-29 Thread Diez B. Roggisch
> Synaptic is using aptitude as back-end (this is serious). No. It uses apt. > I also find deb system being the best. Managed with aptitude, not apt. > Windows is definitely worth the effort. aptitude as well as synaptic both depend transitive upon debconf, which depends on apt. Use apt-cache

Re: How to force a thread to stop

2006-07-29 Thread Damjan
> | A common recovery mechanism in embedded systems is a watchdog timer, > | which is a hardware device that must be poked by the software every > | so often (e.g. by writing to some register). If too long an interval > | goes by without a poke, the WDT hard-resets the cpu. Normally the > | softw

Re: metaclass : parse all class once before doing anything else ?

2006-07-29 Thread Paddy
Laurent Rahuel wrote: > Hi, > > I have a much to smart problem for my brain. > > Here is the deal : > > I got a metaclass named Foo > > Then I got two others classes: > > class Bar(Foo): > pass > > class Baz(Foo): > pass > > I know how to add some attrs, methods to Bar and Baz when

testing for data type

2006-07-29 Thread Jonathan Bowlas
Hi Listers,   I have a requirement to test for a data type could someone tell me if this is possible in python?   Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox selected it is pa

Partial Classes - Aspects

2006-07-29 Thread Dr. Peer Griebel
I'm currently writing a small toy application to support symbolic algebra. Therefore I implemented some classes Term, Var, Number, Sum, Product, Power. These classes are tightly coupled. So it is not possible to organize them in distinct files. This would result in cyclic imports. To manage the

Re: Comma is not always OK in the argument list?!

2006-07-29 Thread Roman Susi
Nick Vatamaniuc wrote: >True, that is why it behaves the way it does, but which way is the >correct way? i.e. does the code need updating or the documentation? > > > Perhaps, someone can make a bug report... IMHO, docs are wrong. -Roman >-Nick V. > >[EMAIL PROTECTED] wrote: > > >>Nick Vatama

Re: Need a compelling argument to use Django instead of Rails

2006-07-29 Thread Vincent Delporte
On Sat, 29 Jul 2006 04:07:12 GMT, Tim Roberts <[EMAIL PROTECTED]> wrote: >Exactly. The Python interpreter can take a significant fraction of a >second to start. For the typical short web request, the overhead can add >up. > >On the other hand, unless you're handling dozens of requests per minute,

Re: War chest for writing web apps in Python?

2006-07-29 Thread Rob Sinclar
> > Synaptic is using aptitude as back-end (this is serious). > > Why can I deinstall aptitude without deinstalling synaptic then!? > > Ciao, > Marc 'BlackJack' Rintsch Hi, This is because Aptitude is an independant console application that is very useful to users working on linux machines w

Re: War chest for writing web apps in Python?

2006-07-29 Thread gslindstrom
Sybren Stuvel wrote: > Vincent Delporte enlightened us with: > > I'm thinking of using Python to build the prototype for a business > > web appplication. > > Why just the prototype? > I don't know about Vincent, but I once worked in a "C++" shop where all other languages were actively discouraged.

Re: War chest for writing web apps in Python?

2006-07-29 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Rob Sinclar wrote: >> > Synaptic is using aptitude as back-end (this is serious). >> >> Why can I deinstall aptitude without deinstalling synaptic then!? >> > > This is because Aptitude is an independant console application > that is very useful to users working on linux ma

Re: Fastest Way To Loop Through Every Pixel

2006-07-29 Thread Chaos
nikie wrote: > Chaos wrote: > > > As my first attempt to loop through every pixel of an image, I used > > > > for thisY in range(0, thisHeight): > > for thisX in range(0, thisWidth): > > #Actions here for Pixel thisX, thisY > > > > But it takes 450-1000 millis

Re: Fastest Way To Loop Through Every Pixel

2006-07-29 Thread Chaos
nikie wrote: > Chaos wrote: > > > As my first attempt to loop through every pixel of an image, I used > > > > for thisY in range(0, thisHeight): > > for thisX in range(0, thisWidth): > > #Actions here for Pixel thisX, thisY > > > > But it takes 450-1000 millis

Re: non-blocking PIPE read on Windows

2006-07-29 Thread Antonio Valentino
"placid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > I have been looking into non-blocking read (readline) operations on > PIPES on windows XP and there seems to be no way of doing this. Ive > read that you could use a Thread to read from the pipe, but if you > still

Re: Comma is not always OK in the argument list?!

2006-07-29 Thread Nick Vatamaniuc
Roman, The way I see it, it could be either way. In other words if I can write f(1,2,3) and f(1,2,3,) I should also be able to write f(1,*[2,3],). It is a really small detail but there sould be some consistency. Either no extra commas for all kinds of argument types or extra commas for _all_ of t

Re: Client/Server Question

2006-07-29 Thread Dennis Benzinger
[EMAIL PROTECTED] wrote: > Is os.system() going to be deprecated in future ?.I read somewhere. > [...] Sometime in the future it will. But that won't happen soon. Read the second paragraph of "Backwards Compatibility" in the subprocess PEP . Dennis

system programign

2006-07-29 Thread oqestra
may i use python to read a file and output its content to another file which is not created yet and i don't want to use ">" to do this in linux? how do you do ? oqestra. -- http://mail.python.org/mailman/listinfo/python-list

=?utf-8?Q?Re:_ANN:_4_New_ShowMeDo.com_Videos_=28Wing_IDE, _RUR=2DPLE_=282=29, _PataPata=29?=

2006-07-29 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: system programign

2006-07-29 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, oqestra wrote: > may i use python to read a file and output its content to another file > which is not created yet and i don't want to use ">" to do this in > linux? Read the documentation about `open()`. Simple example: in_file = open('old.txt', 'r') out_file = open('ne

install python on cdrom

2006-07-29 Thread Fabian Braennstroem
Hi, I look for an easy way to use the newest scipy, pyvtk, matplotlib, f2py, numpy, paraview/vtk,... on a entreprise redhat machine without administration rights. My first thought was to install the whole new python system on a cdrom/dvd and mounting it, when I need it. Would that be the easiest w

Re: Client/Server Question

2006-07-29 Thread bryanjugglercryptographer
[EMAIL PROTECTED] wrote: > My server.py looks like this > > -CODE-- > #!/usr/bin/env python > import socket > import sys > import os > > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > host = '' > port = 2000 > > s

Re: Nested function scope problem

2006-07-29 Thread Antoon Pardon
On 2006-07-29, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 28 Jul 2006 17:48:03 GMT, Antoon Pardon <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> >> That is no reason to say that python has no variables. If someone would >> explain the difference between objects in s

Re: Nested function scope problem

2006-07-29 Thread Antoon Pardon
On 2006-07-28, Gerhard Fiedler <[EMAIL PROTECTED]> wrote: > On 2006-07-28 15:20:52, Antoon Pardon wrote: > >>> Typically, "variable" implies a data storage location that can take on >>> different values. Emphasis on "location" -- the name is fixed to a >>> memory location whose contents can be vari

Re: Nested function scope problem

2006-07-29 Thread Antoon Pardon
On 2006-07-29, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 28 Jul 2006 18:20:52 GMT, Antoon Pardon <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >> That is not true. It may be the case in a number of languages but >> my experience with lisp and smalltalk, though rathe

Smaple of recursive directory walker

2006-07-29 Thread Traveler
Hello, At work I have a directory of about 50 large text files and i need to search thru them for 10 separate words and print how many were found in total. I am new to python so could somebody please show me some sample code that would help me get this done and i will work from that. Thanks. -

Re: sending bytes to parallel port

2006-07-29 Thread Grant Edwards
On 2006-07-29, Timothy Smith <[EMAIL PROTECTED]> wrote: >> I'd particularly recommend taking a look at the pyparallel >> module found here: > yes, i did try pyparallel however it will not install on > freebsd, setup.py errors. Ah. I guess freebsd wasn't one of the systems listed on the pyparalle

Re: War chest for writing web apps in Python?

2006-07-29 Thread SPE - Stani's Python Editor
Nick Vatamaniuc schreef: > I found Komodo to > be too slow on my machine, SPE was also slow, was crashing on me and > had strange gui issues, I hope you didn't install SPE from the MOTU repositories with synaptic or apt-get. I use SPE myself daily on Ubuntu and wrote this howto install SPE on Ubu

Re: Nested function scope problem

2006-07-29 Thread Gerhard Fiedler
On 2006-07-29 13:47:37, Antoon Pardon wrote: > I think the important thing to remember is that the assignment in Python > is a alias maker and not a copy maker. In languages like C, Fortran, > pascal, the assignment makes a copy from what is on the righthand and > stores that in the variable on th

Proposal for new option -U extending -u

2006-07-29 Thread James Thiele
Currently -u specifies that stdin, stdout and stderr are all unbuffered. I propose a that -U make all files unbuffered. It could be useful for programs that log to files. Comments solicited. -- http://mail.python.org/mailman/listinfo/python-list

Math package

2006-07-29 Thread diffuser78
I want to write a program which would have a 2 dimensional array of 1 billion by 1 billion. This is for computational purposes and evaluating a mathematical concept similar to Erdos number. Which is the best package for such programs (that would be fast enough). Every help is appreciated. Thank

Re: Smaple of recursive directory walker

2006-07-29 Thread Ant
> At work I have a directory of about 50 large text files and i need to > search thru them for 10 separate words and print how many were found > in total. > > I am new to python so could somebody please show me some sample code > that would help me get this done and i will work from that. Assumin

Re: Smaple of recursive directory walker

2006-07-29 Thread Traveler
yes this is great i will work from that but how can i use say a list to pass 10 words? mylist = ['word1','word2','word3','word4'] On 29 Jul 2006 12:01:03 -0700, "Ant" <[EMAIL PROTECTED]> wrote: > >> At work I have a directory of about 50 large text files and i need to >> search thru them for 1

Re: Math package

2006-07-29 Thread Bas
I think you need one of these: http://www-03.ibm.com/servers/deepcomputing/bluegene.html Don't know if it runs python. If that doesn't work try to reformulate your problem and have a look at http://scipy.org/ Cheers, Bas [EMAIL PROTECTED] wrote: > I want to write a program which would have a 2

Re: Math package

2006-07-29 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, diffuser78 wrote: > I want to write a program which would have a 2 dimensional array of 1 > billion by 1 billion. This is for computational purposes and evaluating > a mathematical concept similar to Erdos number. Lets say you just want a byte at each cell in that array:

Re: Math package

2006-07-29 Thread bearophileHUGS
[EMAIL PROTECTED]: > I want to write a program which would have a 2 dimensional array of 1 > billion by 1 billion. This is for computational purposes and evaluating > a mathematical concept similar to Erdos number. Maybe you are talking about the edges of a graph with 1e9 nodes. This structure is

Re: Proposal for new option -U extending -u

2006-07-29 Thread Fuzzyman
James Thiele wrote: > Currently -u specifies that stdin, stdout and stderr are all > unbuffered. I propose a that -U make all files unbuffered. It could be > useful for programs that log to files. > > Comments solicited. '-U' is already taken (for unicode only strings). Other than that I have no

Re: Math package

2006-07-29 Thread diffuser78
I will write the problem a little more clearer so that you guys can recommend me better. In a graphs of size N ( where, N = 1e9), each node has a degree D=1000. i.e There are overall (D*N)/2 edges in the graph. This graph needs to be generated randomly using the program. Now my task is to find th

Re: Fastest Way To Loop Through Every Pixel

2006-07-29 Thread Ron Adam
Chaos wrote: > As my first attempt to loop through every pixel of an image, I used > > for thisY in range(0, thisHeight): > for thisX in range(0, thisWidth): > #Actions here for Pixel thisX, thisY > > But it takes 450-1000 milliseconds > > I want speeds less

Re: simple dbus python problem ... please help

2006-07-29 Thread alisonken1
bob wrote: > bus = dbus.Bus (dbus.Bus.TYPE_SYSTEM) > hal_service = bus.get_service ('org.freedesktop.Hal') > hal_manager = hal_service.get_object ('/org/freedesktop/Hal/Manager', > 'org.freedesktop.Hal.Manager') > It appears that bus.get_service() has bee

Re: Newbie..Needs Help

2006-07-29 Thread Anthra Norell
- Original Message - From: "Graham Feeley" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Friday, July 28, 2006 5:11 PM Subject: Re: Newbie..Needs Help > Thanks Nick for the reply > Of course my first post was a general posting to see if someone would be > able to help > her

Pygame Help

2006-07-29 Thread Blaze Bresko
Hi, I am trying to make a game using either livewires or pygame. The game is tetris. Right now I have gotten the program to a point where everything works (as in user input, score, lines, etc), except I can't get more than one block to work. Right now I have the user playing a game where a single

Re: Pygame Help

2006-07-29 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Blaze Bresko wrote: > [Tetris] I was curious how you would program the seperate images to > fall together and not break apart, because pygame and livewires uses > images as collision detection, so therefore you can't make most of the > shapes a single image because they wi

Re: Pygame Help

2006-07-29 Thread Lee Harr
> I was curious how you would program the seperate > images to fall together and not break apart, because pygame and > livewires uses images as collision detection, so therefore you can't > make most of the shapes a single image because they will have > transparent spaces as part of the image, whic

Re: Math package

2006-07-29 Thread Robert Kern
[EMAIL PROTECTED] wrote: > I will write the problem a little more clearer so that you guys can > recommend me better. > > In a graphs of size N ( where, N = 1e9), each node has a degree D=1000. > i.e There are overall (D*N)/2 edges in the graph. This graph needs to > be generated randomly using th

Re: Comma is not always OK in the argument list?!

2006-07-29 Thread Nick Vatamaniuc
Dennis, You make a good point, that is what I though first. Semantically I thought a comma after **kw as in ..., **kw,) doesn't make sense because there is nothing that could follow **kw except the ')'. But then trying some other cases (see the previous posts for my examples) I noticed that commas

Re: War chest for writing web apps in Python?

2006-07-29 Thread Nick Vatamaniuc
Stani, Thanks. I'll definetly give SPE another try. You have a great editor with features that others don't have. I'll try it with the latest wxPython. I never really thought SPE was the problem, it seemed like a lot of issues I saw were from wxWidgets... Nick V. SPE - Stani's Python Editor w

Re: Fastest Way To Loop Through Every Pixel

2006-07-29 Thread Paul McGuire
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Chaos" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > > > myCol = (0.3 * image.GetRed(thisX, thisY)) + (0.59 * > > image.GetGreen(thisX, thisY)) + (0.11 * image.GetBlue(thisX, thisY)) > > if myCol <

making pseudo random number with spam ad convert text to binary

2006-07-29 Thread bussiere maillist
here is a little project to make a more or less good pseudo random generator by using spam :http://euryale.googlecode.com/it's almost quite finished but i've got a last problem i didn't manage to convert text to binary : hazard = binascii.a2b_qp(attachment) + binascii.a2b_qp(body) + binascii.a2b_qp

python and JMS

2006-07-29 Thread tksri2000
I am looking to use python to talk to JMS. Can some please point me to such resources if this is possible. Sri -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal for new option -U extending -u

2006-07-29 Thread Carl Banks
James Thiele wrote: > Currently -u specifies that stdin, stdout and stderr are all > unbuffered. I propose a that -U make all files unbuffered. It could be > useful for programs that log to files. > > Comments solicited. Unnecessary. You can control the buffering of any file object you create you

Re: Newbie..Needs Help

2006-07-29 Thread Graham Feeley
Well Well Well, Anthra you are a clever person, Are nt you I nearly fell over when i read your post. Would it help if we used another web site to gather data As you stated the tables are not all that well structured. well I will give thisone a go first and if there is anything I can do for

PIL on MacOS

2006-07-29 Thread kernel1983
I was trying to build PIL and pygame from the source on the MacOS. But when I typed 'sudo python setup.py install', it gives error msg : gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -D