Re: sockets -- basic udp client

2008-02-16 Thread [EMAIL PROTECTED]
Here is the example above converted to a more straightforward udp client that isolates the part I am asking about: import socket, sys host = 'localhost' #sys.argv[1] port = 3300 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM

Re: copying files through Python

2008-02-16 Thread [EMAIL PROTECTED]
On Feb 16, 6:21 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Please use a mailer/news-agent that preserves whitespace on the > beginning of the line, and make sure you don't use tabs but spaces to > indent. > > Apart from that - why don't

Re: How about adding rational fraction to Python?

2008-02-16 Thread [EMAIL PROTECTED]
On Feb 16, 12:35�pm, Lie <[EMAIL PROTECTED]> wrote: > Would all these problems with floating points be a rational reason to > add rational numbers support in Python or Py3k? (pun not intended) > > I agree, there are some numbers that is rationals can't represent > (

Re: How about adding rational fraction to Python?

2008-02-16 Thread [EMAIL PROTECTED]
On Feb 16, 6:50�pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Feb 16, 5:51 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > > > Carl Banks wrote: > > > On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote: > > >> Although rationals have its limitations

installing on vista

2008-02-16 Thread [EMAIL PROTECTED]
Hi, I just got a new computer with windows vista, big mistake, I install python 2.4 ok, but the win32 package keeps saying it cannot find the python instaltion in the registry, help! -Ted -- http://mail.python.org/mailman/listinfo/python-list

Re: sockets -- basic udp client

2008-02-16 Thread [EMAIL PROTECTED]
If you don't care about the address of the sender, e.g. you are not going to send anything back, is there an advantage to using recv()? Or, as a matter of course should you always use recvfrom() with udp sockets? I don't know of a reason why you couldn't use recvfrom() all the time, and that is w

Re: Tkinter. Why the Need for a Frame, or no Frame?

2008-02-17 Thread [EMAIL PROTECTED]
On Feb 17, 9:29 am, Francesco Bochicchio <[EMAIL PROTECTED]> wrote: > > Anyway, Tk() already opens a frame, so in the first example the buttons > are created inside that frame, while in the second example two frames > are created: the one creaded by Tk() il left empty but

Re: mapping problem

2008-02-17 Thread [EMAIL PROTECTED]
On 16 fév, 11:35, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: (snip) > If > you're not a native English speaker, please say so Actually, from looking at the OP's GoogleGroup profile, I think we can safely assert he's not a native English spe

Re: Linux/Python Issues

2008-02-17 Thread [EMAIL PROTECTED]
On 17 fév, 20:38, [EMAIL PROTECTED] wrote: (snip) > What's not in the instructions is what directory should I be in when I > download? Where should I put the ".bz2" file? What dir for running the > make files? Neither are the basic shell commands like cd, tar etc. Nothi

Re: Pmw Use and Grayson's Book

2008-02-18 Thread [EMAIL PROTECTED]
On Feb 18, 5:30 am, "W. Watson" <[EMAIL PROTECTED]> wrote: > I wonder why he uses it? He uses it because Pmw does a lot of heavy lifting for you when designing Tkinter apps. Pmw adds things like widgets pre-populated with scrollbars and labels and automatic widget/label align

Re: Tkinter Confusion

2008-02-18 Thread [EMAIL PROTECTED]
Most of the other questions have already been answered, so I'll tackle this one: On Feb 17, 8:36 pm, [EMAIL PROTECTED] wrote: > Google's great, but it has no truth meter. Do I inherit from Frame? Or > is that a big mistake. (Both positions repeated frequently.) Inherit from F

pycon matplotlib tutorial deadline tomorrow

2008-02-18 Thread [EMAIL PROTECTED]
I will be presenting a tutorial on matplotlib a this year's pycon. If you are coming to the conference, are are already in the Chicago area, you may want to consider signing up for the tutorial http://us.pycon.org/2008/tutorials/ Tomorrow (Monday Feb 18th) is the deadline for registration. He

Why must implementing Python be hard unlike Scheme?

2008-02-18 Thread [EMAIL PROTECTED]
I'm learning Scheme and I am amazed how easy it is to start building a half baked Scheme implementation that somewhat works. After knowing Python for *years* I have no idea how to actually implement the darn thing. Does this have to be true? Beneath the more complex syntax are there a few core d

Re: Why must implementing Python be hard unlike Scheme?

2008-02-19 Thread [EMAIL PROTECTED]
http://codespeak.net/pypy/dist/pypy/doc/getting-started.html#what-is-... > > George I'm very excited about PyPy. It would still be nice to see a nice succinct list of major design principles of Python implementations somewhere. chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Using a signal to terminate a programm running with an asyncore loop

2008-02-19 Thread [EMAIL PROTECTED]
On Feb 8, 4:03 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > When signal is caught handle_shutdown_signal is called. At that point > SHUTDOWN_PERFORMED will ALWAYS be False. Normally all you do in this function > is to set SHUTDOWN_PERFORMED to True and have a test somewhe

Re: The big shots

2008-02-19 Thread [EMAIL PROTECTED]
On 19 fév, 21:49, [EMAIL PROTECTED] wrote: > On Feb 19, 5:17 am, Bruno Desthuilliers > > > [EMAIL PROTECTED]> wrote: > > Diez B. Roggisch a écrit :> [EMAIL PROTECTED] schrieb: > > >> I'm a little dissatisfied, and just thinking aloud. > > >

SystemError: com_backpatch: offset too large

2008-02-19 Thread [EMAIL PROTECTED]
hi, i get this error while using web.py and cheetah. how to fix this? happens everytime regularly thanks Traceback (most recent call last): File "/home/mark/work/pop/web/webapi.py", line 313, in wsgifunc result = func() File "/home/mark/work/pop/web/request.py", line 131, in func = lambd

Re: Why must implementing Python be hard unlike Scheme?

2008-02-19 Thread [EMAIL PROTECTED]
On Feb 19, 9:49 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote: > Building a > Python VM in a high level language is certainly not harder than > creating a Scheme interpreter. Does VM = interpreter? Are you saying implementing a toy Python interpreter is not any harder than implementi

PEP: Adding Priority Scheduling feature to the subprocess

2008-02-20 Thread [EMAIL PROTECTED]
I am working on a PEP and would appreciate comment. The proposal is available at http://python.timehorse.com/PEP_-_Application_Priority.reST and is repeated below: - :PEP: :Title: Adding Priority Scheduling feature to the subprocess module :Version: $Rev: 93 $ :Last Modified: $Date: 2

using PIL for PCA analysis

2008-02-20 Thread [EMAIL PROTECTED]
hi guys i am trying out PCA analysis using python.I have a set of jpeg(rgbcolor) images whose pixel data i need to extract and make a matrix .( rows =num of images and cols=num of pixels) For this i need to represent an image as an array. i was able to do this using java's BufferedImage as below

Re: using PIL for PCA analysis

2008-02-21 Thread [EMAIL PROTECTED]
On Feb 21, 7:35 pm, "Bronner, Gregory" <[EMAIL PROTECTED]> wrote: you can do this using numpy and scipy > fairly easily, and you can transform PIL arrays into Numpy arrays pretty > quickly as well. > i can use numpy ndarray or matrix once i have a PIL array with elements

how to flush child_stdin

2008-02-21 Thread [EMAIL PROTECTED]
I'm opening up a subprocess like this where slave.py is a text based app that receives commands and responds with output: r, w, e = popen2.popen3('python slave.py') I need to send slave.py a command and see the output, so I'll do something like: w.write("command here") then i'll try this: w.flus

Re: Return value of an assignment statement?

2008-02-21 Thread [EMAIL PROTECTED]
On 21 fév, 23:19, John Henry <[EMAIL PROTECTED]> wrote: > On Feb 21, 2:06 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > > > > > John Henry wrote: > > > On Feb 21, 1:48 pm, John Henry <[EMAIL PROTECTED]> wrote: > > >> On Feb 21, 1:43 pm, mrste

Re: Return value of an assignment statement?

2008-02-21 Thread [EMAIL PROTECTED]
> What you can't do (that I really miss) is have a tree of assign-and-test > expressions: > > import re > pat = re.compile('some pattern') > > if m = pat.match(some_string): > do_something(m) > else if m = pat.match(other_string): > do_other_t

Re: Linux/Python Issues

2008-02-21 Thread [EMAIL PROTECTED]
On 21 fév, 13:57, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 21 Feb, 13:04, [EMAIL PROTECTED] wrote: > > > re DLing source > > > As a "solution" to the problem of wanting a program on my computer, it > > sucks. > > It doesn't suck if you&#x

Re: Return value of an assignment statement?

2008-02-21 Thread [EMAIL PROTECTED]
On 21 fév, 23:06, Jeff Schwab <[EMAIL PROTECTED]> wrote: > John Henry wrote: > > On Feb 21, 1:48 pm, John Henry <[EMAIL PROTECTED]> wrote: > >> On Feb 21, 1:43 pm, mrstephengross <[EMAIL PROTECTED]> wrote: > > >>> Hi all. In C, an assignment state

Re: OT: Ideas for a first course using Python

2008-02-22 Thread [EMAIL PROTECTED]
On Feb 22, 2:20 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Feb 21, 4:48 pm, [EMAIL PROTECTED] wrote: > > > > > Sorry to butt in but I am shopping for some ideas. > > > I am interested in putting together a programming course for non- > > programme

Re: how to flush child_stdin

2008-02-22 Thread [EMAIL PROTECTED]
On Feb 22, 12:15 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Thu, 21 Feb 2008 12:34:28 -0800 (PST), "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > I'm opening up a subprocess like this wher

Re: how to flush child_stdin

2008-02-22 Thread [EMAIL PROTECTED]
On Feb 22, 2:01 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Fri, 22 Feb 2008 08:35:03 -0800 (PST), "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > I don't think that is the problem, I'm feedi

looking for open source simulink clone in python

2008-02-23 Thread [EMAIL PROTECTED]
Does anyone know of something like this? I've searched to no avail. GNUradio companion is promising but tied to gnuradio. -- http://mail.python.org/mailman/listinfo/python-list

Re: most loved template engine on python is?

2008-02-24 Thread [EMAIL PROTECTED]
On 24 fév, 20:01, Tamer Higazi <[EMAIL PROTECTED]> wrote: > Hi people! (snip) > Question: > Which is the most loved template engine for python? > I don't have a single cue on this, but the one that most impresses me so far is Mako. -- http://mail.python.org/mailman/listinfo/python-list

Re: To PEAK or not to PEAK

2008-02-24 Thread [EMAIL PROTECTED]
On 24 fév, 15:37, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > I am about to start a large-scale enterprise project next month (I > insist on using Python instead Java and .NET and I am sure `they` will > thank me eventually). > > I was wondering around making my components-a

Re: PHP Developer highly interested in Python (web development) with some open questions...

2008-02-24 Thread [EMAIL PROTECTED]
On 24 fév, 13:44, Christian Heimes <[EMAIL PROTECTED]> wrote: > Tamer Higazi wrote: > > - What is the Zope Applikation Server? Is it also a Webserver like the > > Apache or Tomcat Webserver? > > Zope is much more than a webserver. It's a web application server &g

Get Python News On Twitter

2008-02-26 Thread [EMAIL PROTECTED]
I have launched a Twitter service called pythonnews - News about the Python Programming Language brought to you on Twitter! If you want to publicise something Python related just direct message pythonnews Thanks, Davy Mitchell -- http://mail.python.org/mailman/listinfo/python-list

You have to see this - http://ilaarijs.blogspot.com/ :D

2008-02-28 Thread [EMAIL PROTECTED]
You have to see this - http://ilaarijs.blogspot.com/ :D -- http://mail.python.org/mailman/listinfo/python-list

Re: convert string number to real number - ValueError: invalid literal for int() with base 10: '"2"'

2008-02-29 Thread [EMAIL PROTECTED]
> You have to get rid of the double quotes first. you mean replace them with nothing? li[4].replace('"','') once i do that, i should be able to use them as numbers. -- http://mail.python.org/mailman/listinfo/python-list

Re: Delete hidden files on unix

2008-03-03 Thread [EMAIL PROTECTED]
On Mar 3, 9:38 am, subeen <[EMAIL PROTECTED]> wrote: > On Mar 3, 6:13 pm, Philipp Pagel <[EMAIL PROTECTED]> > wrote: > > > > > loial <[EMAIL PROTECTED]> wrote: > > > How can I delete hidden files on unix with python, i.e I want to do > > > e

Re: Beautiful Code in Python?

2008-03-03 Thread [EMAIL PROTECTED]
On Mar 2, 1:18 pm, [EMAIL PROTECTED] wrote: > On Mar 2, 12:01 pm, John DeRosa <[EMAIL PROTECTED]> wrote: > > > On Mon, 3 Mar 2008 01:23:32 +0900, js <[EMAIL PROTECTED]> wrote: > > >Hi, > > > >Have you ever seen Beautiful Python code? > > >Zop

Re: tab completion?

2008-03-04 Thread [EMAIL PROTECTED]
On Mar 4, 10:44 am, Ron DuPlain <[EMAIL PROTECTED]> wrote: > On Mar 4, 10:13 am, Siddhant <[EMAIL PROTECTED]> wrote: > > > Hi people. > > I was just wondering if a tab-completion feature in python command > > line interface would be helpful? > > If ye

Embedding vs Configuring Python build

2008-03-05 Thread [EMAIL PROTECTED]
I am using Python in an application that cannot depend on an existing Python installation or require Python to be installed. The application itself should not have an install procedure, but rather should be runnable from any location in the file system. Ideally I would prefer not to embed at all,

Bit twiddling floating point numbers

2008-03-05 Thread [EMAIL PROTECTED]
Hi All Is there a simple way to twiddle the bits of a float? In particular, I would like to round my float to the n most significant bits. For example - 0.123 in binary is 0.00011 Rounding to 4 bits I get 0.0001. I can pack and unpack a float into a long e.g. struct.unpack('I',struct.pack('f

Re: Bit twiddling floating point numbers

2008-03-05 Thread [EMAIL PROTECTED]
On Mar 5, 10:48 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-03-05, Grant Edwards <[EMAIL PROTECTED]> wrote: > > > On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> Any suggestions? > > > Just use the bitwise and/or/not

Re: Bit twiddling floating point numbers

2008-03-05 Thread [EMAIL PROTECTED]
On Mar 5, 11:27 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Mar 5, 2:25 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Hi All > > > Is there a simple way to twiddle the bits of a float? In particular, I > > would like to roun

Int. J. of Tomography & Statistics, Special Issue on Image Processing - Call for papers

2008-03-06 Thread [EMAIL PROTECTED]
ible the guest editors of your intention ([EMAIL PROTECTED], [EMAIL PROTECTED]); Papers for the special issue should be sent to the guest editors ([EMAIL PROTECTED], [EMAIL PROTECTED]); Instructions for authors are available at: http://www.isder.ceser.res.in/ijts/instr4a.html. With kind regar

Re: What is a class?

2008-03-06 Thread [EMAIL PROTECTED]
On Mar 5, 7:50 pm, [EMAIL PROTECTED] wrote: > What is a class that is not a module? A class is a bag of stuff and a namespace :) J. -- http://mail.python.org/mailman/listinfo/python-list

Exploring Attributes and Methods

2008-03-06 Thread [EMAIL PROTECTED]
Hi, Is there a python command that allows me to extract the names (not values) of the attributes of a class. example Class Sample: fullname = 'Something' How can I know that this class has an attribute called 'fullname'? I hope my question is clear. Thanks -- http://mail.python.org/mail

Re: Exploring Attributes and Methods

2008-03-06 Thread [EMAIL PROTECTED]
On Mar 7, 12:30 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > | Hi, > | Is there a python command that allows me to extract the names (not > | values) of the attributes of a cla

Re: Bit twiddling floating point numbers

2008-03-06 Thread [EMAIL PROTECTED]
On Mar 6, 11:00 am, Bryan Olson <[EMAIL PROTECTED]> wrote: > Mark Dickinson wrote: > > Jeff Goldfin wrote: > >> I can pack and unpack a float into a long > >> e.g. > >> struct.unpack('I',struct.pack('f',0.123))[0] > >>

the problem of import module

2008-03-06 Thread [EMAIL PROTECTED]
follow the dive into python - >>> import sys >>> sys.path >>> sys.path.append('E:\achieve\book\diveintopython-pdfzh-cn-5.4b\diveintopythonzh-cn-5.4b\py') - I append the fi

Re: Altering imported modules

2008-03-07 Thread [EMAIL PROTECTED]
On 6 mar, 21:29, Tro <[EMAIL PROTECTED]> wrote: > On Wednesday 05 March 2008, Bruno Desthuilliers wrote: > > > > > Tro a écrit : (snip) > > > I'd like to know if it's possible to make tlslite load *my* asyncore > > > module without changing a

Hyphenation: PyHyphen project now hosted on GoogleCode

2008-03-07 Thread [EMAIL PROTECTED]
This is to inform you that development of PyHyphen and issue tracking takes now place at http://pyhyphen.googlecode.com. All interested parties are encouraged to submit comments, suggestions and bug reports. Snapshots of the source tree can be obtained using subversion. At this stage, the sources

Re: Converting a string to the most probable type

2008-03-07 Thread [EMAIL PROTECTED]
On Mar 6, 9:17 pm, Luis M. González <[EMAIL PROTECTED]> wrote: > On 6 mar, 11:27, Pierre Quentel <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I would like to know if there is a module that converts a string to a > > value of the "most probable t

identifying and parsing string in text file

2008-03-08 Thread [EMAIL PROTECTED]
I have a large file that has many lines like this, SITE I would like to identify the line by the tag (300a,0014) and then grab the name (DoseReferenceStructureType) and value (SITE). I would like to create a file that would have the structure, DoseReferenceStructureType = Site ...

Re: Regarding coding style

2008-03-08 Thread [EMAIL PROTECTED]
On Mar 8, 7:34 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 08 Mar 2008 19:31:47 +, Grant Edwards wrote: > > I'm also a bit baffled by people who put a comment at the top of every > > file that tells you what the filename is. &

Re: Regarding coding style

2008-03-08 Thread [EMAIL PROTECTED]
On Mar 9, 12:09 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 08 Mar 2008 20:45:25 -0800, [EMAIL PROTECTED] wrote: > > On Mar 8, 7:34 pm, Steven D'Aprano <[EMAIL PROTECTED] > > cybersource.com.au> wrote: > >> On Sat, 0

Re: identifying and parsing string in text file

2008-03-09 Thread [EMAIL PROTECTED]
On 8 mar, 20:49, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have a large file that has many lines like this, > > name="DoseReferenceStructureType">SITE > > I would like to identify the line by the tag (300a,0014) and then grab > the na

Hyphenation with PyHyphen - public mailing list <[EMAIL PROTECTED]> now online

2008-03-10 Thread [EMAIL PROTECTED]
Hi, there is now a public mailing list open to anyone who is interested in discussing issues concerning PyHyphen. Join the list at http://groups.google.com/group/pyhyphen, or visit the project home page at http://pyhyphen.googlecode.com to get the latest sources via Subversion. Regards Leo --

Re: Regarding coding style

2008-03-10 Thread [EMAIL PROTECTED]
On Mar 10, 11:30 am, rockingred <[EMAIL PROTECTED]> wrote: > On Mar 10, 10:26 am, Roel Schroeven <[EMAIL PROTECTED]> > wrote: > > > > > rockingred schreef: > > > > On Mar 8, 8:27 pm, Dan Bishop <[EMAIL PROTECTED]> wrote: > &g

Re: What c.l.py's opinions about Soft Exception?

2008-03-10 Thread [EMAIL PROTECTED]
On Mar 9, 2:21 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Is this soft-exception implemented anywhere, so that one can see what > experiences and best practices have evolved around using it? Lie's idea is to separate exceptions in two groups, those that mus

Re: Keep a python script running after browser window closed

2008-03-10 Thread [EMAIL PROTECTED]
On Mar 10, 1:42 pm, sophie_newbie <[EMAIL PROTECTED]> wrote: > On Mar 7, 4:33 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On Mar 7, 10:28 am, sophie_newbie <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I have a cgi scri

Python PDF + Pictures

2008-03-11 Thread [EMAIL PROTECTED]
Hi, dear Python Masters! I wanna ask about the Python and PDF creating. I have many photos, and I wanna make some "presentation" from these photos, a "thumbnail" like document with one image per one page. If I wanna make one document now I do this: I execute a python script that create a html s

Re: Python PDF + Pictures

2008-03-11 Thread [EMAIL PROTECTED]
Hi! Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : >> Hi, dear Python Masters! >> >> I wanna ask about the Python and PDF creating. > Dont know if this will match your needs, but you may want to have a look > at pisa: > http://www.htmltopdf.org/ >

Re: Time Zone application after strptime?

2008-03-11 Thread [EMAIL PROTECTED]
On Mar 11, 11:00 am, Jim Carroll <[EMAIL PROTECTED]> wrote: (snipped) > > p.parse("10:29:52 Feb 29, 2008 PST", tzinfos=zones) > datetime.datetime(2008, 2, 29, 10, 29, 52, tzinfo=tzoffset('PST', -28800)) > > But I cannot figure out how to get dateutil to us

agg (effbot)

2008-03-12 Thread [EMAIL PROTECTED]
Downloaded to Knoppix 5.1: : aggdraw-1.2a3-20060212.tar.gz Followed README. Wouldn't compile. Couldn't find way of contacting Effbot directly. PIL stuff comes with Knoppix, but specs on agg seem better. vtk is on Knoppix too, but has a steep learning curve. TIA for help. -- http://mail.python

Re: agg (effbot)

2008-03-12 Thread [EMAIL PROTECTED]
On Mar 12, 10:52 am, Gerhard Häring <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Downloaded to Knoppix 5.1: > > : > > aggdraw-1.2a3-20060212.tar.gz > > > Followed README.  Wouldn't compile. [...] > > Try shegabittling the frotz first. If

Re: Creating a file with $SIZE

2008-03-12 Thread [EMAIL PROTECTED]
On Mar 12, 7:37 am, "k.i.n.g." <[EMAIL PROTECTED]> wrote: > We use dd command in Linux to create a file with of required size. If you just want to get your work done, you might consider the cygwin dd command. Learning to write python is a worthwhile endeavour in

Re: How do I iterate over items in a dict grouped by N number of elements?

2008-03-13 Thread [EMAIL PROTECTED]
On Mar 13, 6:34 pm, Noah <[EMAIL PROTECTED]> wrote: > What is the fastest way to select N items at a time from a dictionary? > I'm iterating over a dictionary of many thousands of items. > I want to operate on only 100 items at a time. > I want to avoid copying items us

The best computer solutions

2008-03-14 Thread [EMAIL PROTECTED]
http://r8p.org/upload/213.html -- http://mail.python.org/mailman/listinfo/python-list

finding euclidean distance,better code?

2008-03-16 Thread [EMAIL PROTECTED]
hello while trying to write a function that processes some numpy arrays and calculate euclidean distance ,i ended up with this code (though i used numpy ,i believe my problem has more to do with python coding style..so am posting it here) ... # i am using these numpy.ndarrays to do the calculation

Re: Regarding coding style

2008-03-17 Thread [EMAIL PROTECTED]
On Mar 17, 12:15 pm, rockingred <[EMAIL PROTECTED]> wrote: > On Mar 10, 11:30 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > Fix that. That's usually something that's fairly easy to get done as > > a programmer (I've had

Any fancy grep utility replacements out there?

2008-03-17 Thread [EMAIL PROTECTED]
So I need to recursively grep a bunch of gzipped files. This can't be easily done with grep, rgrep or zgrep. (I'm sure given the right pipeline including using the find command it could be donebut seems like a hassle). So I figured I'd find a fancy next generation grep tool. Thirty minutes

Re: finding euclidean distance,better code?

2008-03-17 Thread [EMAIL PROTECTED]
On Mar 17, 6:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote > > _, imgindex = min((sum(abs(input_wk - weights[image, :])),image) for image > in xrange(numimgs)) > mindistance = abs(input_wk - weights[imgindex, :]) > # normalize and sum again thanks Gabri

please click here

2008-03-18 Thread [EMAIL PROTECTED]
please click here http://profile_myprofile.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

lock access to serial port

2008-03-18 Thread [EMAIL PROTECTED]
hello group, how to get ttyS0 serial port for exclusive access? I have a python script that uses this device with AT commands. I need that two instances can call simultaneosuly this python script but only one of them gets the device. I tried fcntl.flock, it was just ignored, put writtable file LCK

Re: lock access to serial port

2008-03-19 Thread [EMAIL PROTECTED]
situation - the received sms contained also unwanted text. As far as I can realize how to deal with it is not allowing writing to the device for two processes simultaneously. Andra On 19 Marts, 11:00, taco <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > hello group, >

Re: lock access to serial port

2008-03-19 Thread [EMAIL PROTECTED]
simultaneously. > > Andra > > On 19 Marts, 11:00, taco <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] wrote: > > > hello group, > > > > how to get ttyS0 serial port for exclusive access? I have a python > > > script that uses this device wi

Inserting DTD statement to XML

2008-03-19 Thread [EMAIL PROTECTED]
I am new to Python and I am writing a script to build a XML document and post it to a website. I have a working script but need to insert a DTD statement in my XML document and can't find out how to do this. I am using "from xml.dom.minidom import Document" Some code I am using is: doc =

Re: How do I change the font size for the default coordinates in matplotlib?

2008-03-20 Thread [EMAIL PROTECTED]
On Mar 20, 8:20 pm, Carl <[EMAIL PROTECTED]> wrote: > I've searched the user manual (and this forum) but I don't see > anything that helps. Did you mean the font size for the ticks or for the labels? Here's an example: from pylab import * x = arange(0,

Re: How can I make a function equal to 0?

2008-03-21 Thread [EMAIL PROTECTED]
On Mar 21, 12:48 pm, Martin Manns <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to create a function that is equal to 0? > I try to redefine __cmp__ but I am pretty stuck. > > Something like: > > >>> def f(): return "" > ... > >>&g

Plugin framework - Overcomplicating things?

2008-03-26 Thread [EMAIL PROTECTED]
As a side project and a learning experience and ultimately, a good tool for my department, I started developing a simple jabber bot for our work's conference server, with the intention of making it capable of running specific commands and utilities. I realize there are other bots out there, but I

Re: Plugin framework - Overcomplicating things?

2008-03-27 Thread [EMAIL PROTECTED]
On Mar 27, 4:18 am, André <[EMAIL PROTECTED]> wrote: > On Mar 27, 3:31 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > > > > En Thu, 27 Mar 2008 01:50:56 -0300, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> escribió: > > > >

Re: copy file over LAN

2008-03-27 Thread [EMAIL PROTECTED]
On Mar 27, 6:48 pm, Teja <[EMAIL PROTECTED]> wrote: > On Mar 27, 8:34 am, Astan Chee <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > I have afileon another machine on the localnetwork(my machine and > > local machines are on windows) and I want toco

Plugins accessing parent state

2008-03-28 Thread [EMAIL PROTECTED]
Does anyone have some design ideas ( or can point me at the right design pattern, because I can't find it. ) for having a plugin being able to access a parent's state? For example, let's say I have a class that receives some commands. When it gets a command, it checks which of the registered plugi

Re: Plugins accessing parent state

2008-03-28 Thread [EMAIL PROTECTED]
On Mar 28, 1:58 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > Does anyone have some design ideas ( or can point me at the right > > design pattern, because I can't find it. ) for having a plugin being > >

Accessing Modification Time of an Outlook Mail in Python

2008-11-24 Thread [EMAIL PROTECTED]
Hi all, I am writing a small application which reads the contents of an Outlook Mail using python. I am able to read the contents, subject along with senders and receivers of a mail using MAPI objects. But may I know how can I get access to the "modification time" or the receiving time of an

ROGER DUBUIS WATCHES

2008-11-24 Thread [EMAIL PROTECTED]
http://www.flyingzg.com/roger-dubuis-watches-c-113.html Founded by Carlos Dias in 1995 as SOGEM SA (Socie`te` Genevoise des Montres), the company did not lay claim to its current title of Manufacture until 1999. In March 2001, he established the first building of the Manufacture ROGER DUBUIS in th

converting a string data to a float value for access database

2008-11-25 Thread [EMAIL PROTECTED]
Hi, I am trying to copy a sql database to a access database using python. I can copy all the fields, but the date. I can store a float value in access data object, ie http://en.wikibooks.org/wiki/JET_Database/Data_types#Dates_and_times So access uses a float for a date, and mysql databse uses t

Problem with py2exe when using bundle_files and pygtk/pygobject

2008-11-27 Thread [EMAIL PROTECTED]
Hi, I am using py2exe with pygtk and everything works fine. But when I set bundle_files to 1 or 2, I get following exception, when starting the binary: Traceback (most recent call last): File "startup.py", line 1, in File "zipextimporter.pyc", line 82, in load_module File "foo.pyc", line 4

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread [EMAIL PROTECTED]
On Nov 29, 12:44 pm, Josh <[EMAIL PROTECTED]> wrote: > If you were a beginning programmer and willing to make an investment in > steep learning curve for best returns down the road, which would you pick? > > I know this topic has been smashed around a bit already, but 'l

Unofficial Phone, , the most cheap mobile phones from china , 30 kinds today

2008-11-30 Thread [EMAIL PROTECTED]
Unofficial Phone, ,the most cheap mobile phones from china ,30 kinds today http://www.unofficialphone.cn/2008/11/android-phone-cottage-sciphone-dream-g2.html http://www.unofficialphone.cn/2008/11/unofficial-phone.html http://www.unofficialphone.cn/2008/11/amanilan.html http://www.unofficialphone.

pydoc enforcement.

2008-11-30 Thread [EMAIL PROTECTED]
I've been thinking about implementing (although no idea yet *HOW*) the following features/extension for the python compile stage and would be interested in any thoughts/comments/flames etc. Basically I'm interested adding a check to see if: 1) pydoc's are written for every function/method. 2)

Cross platform desktop operations in Python

2008-11-30 Thread [EMAIL PROTECTED]
Hi I'm looking for a cross platform (Linux/Win/Mac) solution of common desktop operations like: * Getting system icon theme (icons for files, folders etc.) * Determine mimetype (better than mimetypes using mapped extension to mime) Under Unix/Linux there are freedesktop.org standards and pyxdg th

Re: tkinter question

2008-12-01 Thread [EMAIL PROTECTED]
On Oct 26, 7:02 am, "Chuckk Hubbard" <[EMAIL PROTECTED]> wrote: > Hello. > How about this?  I changed the if statements so the coordinates are > always updated, but only changed if within the right limits, otherwise > updated to the existing value.  Now if you drag

Re: tkinter question

2008-12-01 Thread [EMAIL PROTECTED]
On Oct 26, 7:02 am, "Chuckk Hubbard" <[EMAIL PROTECTED]> wrote: > Hello. > How about this?  I changed the if statements so the coordinates are > always updated, but only changed if within the right limits, otherwise > updated to the existing value.  Now if you drag

python 2.5.2 or Python 2.6 compilation problem on AIX 5.3

2008-12-01 Thread [EMAIL PROTECTED]
Hello: I am trying to compile Python 2.5.2 on AIX 5.3 with gcc 4.2.3. I am getting following error. (I also tried Python 2.6 with same error) creating build/temp.aix-5.3-2.5/share/tmhsdsd2/tmp/Python-2.5.2/ Modules gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall - Wstrict-prototype

Re: python 2.5.2 or Python 2.6 compilation problem on AIX 5.3

2008-12-01 Thread [EMAIL PROTECTED]
On Dec 1, 1:06 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hello: > > I am trying to compile Python 2.5.2 on AIX 5.3 with gcc 4.2.3. I am > > getting following error. (I also tried Python 2.6 with same error) > > > creating build

Re: Emacs vs. Eclipse vs. Vim

2008-12-01 Thread [EMAIL PROTECTED]
On Nov 29, 3:44 pm, Josh <[EMAIL PROTECTED]> wrote: > If you were a beginning programmer and willing to make an investment in > steep learning curve for best returns down the road, which would you pick? > > I know this topic has been smashed around a bit already, but 'l

Ideal girl dance WEBCAM ! Ideal boobs !

2008-12-02 Thread [EMAIL PROTECTED]
http://yeba.pl/show/movies/5257/Perfect_babe_-_Idealna_kobieta -- http://mail.python.org/mailman/listinfo/python-list

Obtaining SMTP address of a sender and receiver of an outlook mail

2008-12-02 Thread [EMAIL PROTECTED]
in further complications. Is there any way to obtain the actual SMTP mail address ([EMAIL PROTECTED]) from the above object? I searched for it in the MSDN help but couldn't succeed. Thanks in advance, Venu -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get a beep, OS independent ?

2008-12-07 Thread [EMAIL PROTECTED]
On Dec 7, 8:34 pm, Joe Strout <[EMAIL PROTECTED]> wrote: > On Dec 7, 2008, at 4:43 PM, Steven D'Aprano wrote: > > > Of course, if you're volunteering to write such a standard system beep > > for Python, I for one would be grateful. > > I am.  But where sho

<    37   38   39   40   41   42   43   44   45   46   >