Re: Function to Add List Elements?


On Wed, Oct 22, 2008 at 12:59 PM, Henry Chang wrote: > This seems like a simple problem, but I can't find a simple solution. > > Suppose I have two lists of integers. > > List A = ...
Posted On: Saturday 10th of November 2012 06:40:14 AM Total Views:  31
View Complete with Replies

RELATED TOPICS OF Python Programming PROGRAMMING LANGUAGE




Problem with generator expression and class definition

I faced a strange behavior with generator expression, which seems like a bug, for both python 2.4 and 2.5 : >>> class A : .... a = 1, 2, 3 .... b = 1, 2, 3 .... C = list((e,f) ...
VIEWS ON THIS POST

125

Posted on:

Saturday 10th November 2012
View Replies!

newbie:this program stops responding after pressing quit button

I am using windows vista and python 2.5 .This program stops responding after pressing quit button. I am not able to figure the problem out. please help. from Tkinter import * def greeting( ): print ' stdout world!...' win = ...
VIEWS ON THIS POST

82

Posted on:

Saturday 10th November 2012
View Replies!

are u here

Dear Sir/Madam We are one of the largest wholesalers in China who mainly sell stylish electronic product and equipment such as Digital Cameras, Mobile Phone, Laptops, Mp4, GPS, Digital Video and bulk products such as LCD TV, Motorcycles, Binoculars and ...
VIEWS ON THIS POST

95

Posted on:

Saturday 10th November 2012
View Replies!

how to change current working directory while using pdb within emacs

I have written a pyhton script that will process data file in current working directory. My script is in an different directory to data file. When I debug this script using pdb within emacs, emacs will change the current working ...
VIEWS ON THIS POST

109

Posted on:

Saturday 10th November 2012
View Replies!

[ANN] pysqlite 2.4.0 released

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 pysqlite 2.4.0 released ======================= I'm pleased to announce the availability of pysqlite 2.4.0. This is a release with major new features. Go to http://pysqlite.org/ for downloads, online documentation and reporting bugs. What is pysqlite ...
VIEWS ON THIS POST

92

Posted on:

Saturday 10th November 2012
View Replies!

png transparency with PIL

I'm trying to determine the transparency information for a png image. With gif images I can determine the colour that is used for transparent areas using im.info['transparency']. For the png images of interest there is no such entry in the ...
VIEWS ON THIS POST

104

Posted on:

Saturday 10th November 2012
View Replies!

Finding out what other tasks are running

Is there a cross-platform of determining what other processes (or in Windows terms, other applications) are running Is it possible in a cross-platform way to ask some other application to shut down, wait a while, and then test to see ...
VIEWS ON THIS POST

110

Posted on:

Saturday 10th November 2012
View Replies!

ANN: PyInkblot - Creating Rorschach Inkblots using Genetic Algorithms

Hi , I've been working on a 'toy' application for the past month or so called PyInkblot. Simply mirroring a random plotting of half of a grid onto the second half, you can create pictures that look 'organic' like Rorschach ...
VIEWS ON THIS POST

105

Posted on:

Saturday 10th November 2012
View Replies!

Loop three lists at the same time?

Hi all, I have three lists with the same length. Is there any method to loop the three lists without a loop counter Best regards, Davy...
VIEWS ON THIS POST

97

Posted on:

Saturday 10th November 2012
View Replies!

module cwiid and threading: how to use cwiid.Wiimote without blocking

I'm using the module cwiid to conncet to a wiimote. import cwiid wiimote = cwiid.Wiimote() This function is blocking: It waits until it could sucessfully connect to a device or until 20 seconds passed without sucessful connection. As I ...
VIEWS ON THIS POST

114

Posted on:

Saturday 10th November 2012
View Replies!

multiple threads with Logging: ValueError: I/O operation on closedfile

OS: Solaris 9 Python Version: 2.4.4 I need to log certain data in a worker thread; however, I am getting an error now when I use two worker threads. I think the problem comes from the line logging.info('Thread Object (%d) ...
VIEWS ON THIS POST

117

Posted on:

Saturday 10th November 2012
View Replies!

SocketServer.ThreadingTCPServer accepts clients outside server_forever

, SocketServer.ThreadingTCPServer accepts connections (clients can connect) before and after it's server_forever method is called, see below for an example. IMHO it should only accept connections while server_forever is running. Kind regards, Okko Example, both _socket.connect calls should throw; import ...
VIEWS ON THIS POST

94

Posted on:

Saturday 10th November 2012
View Replies!

File names are changed into capital letter in Python CE and WM5

Yesterday, I installed PythonCE on my cellphone whose OS is Windows Mobile 5.I wanted to use numpy as calculation tool.But after I copy numpy module in my desktop computer into my phone,I find many file names in directory \numpy were ...
VIEWS ON THIS POST

126

Posted on:

Saturday 10th November 2012
View Replies!

Spring Python 0.8.0 has been released/Spring Python goes green

Spring Python, the python version of the Spring Framework, has just released version 0.8.0. This release contains a refactored IoC container supporting four formats (XMLConfig, PythonConfig/@Object, PyContainerConfig, and SpringJavaConfig); replacement of the term "component" with "object" in all APIs, classnames, ...
VIEWS ON THIS POST

113

Posted on:

Saturday 10th November 2012
View Replies!

Re: [Python-Dev] Why don't range and xrange threat floats as floats?

Matthieu Brucher wrote: > 2008/11/5 L V : >> Why don't range and xrange threat floats as floats >> Is there any good reason range and xrange don't threat floats as floats but >> as integers >> When I enter ...
VIEWS ON THIS POST

110

Posted on:

Saturday 10th November 2012
View Replies!

Anyone in the Houston / College Station / Austin area? Looking to dosome sprints / joint projects.

, I'm in Houston/College Station/Austin quite often and I'm looking for other coders to do some joint projects with, share experiences, or do some sprints. Let me know if you're interested.
VIEWS ON THIS POST

154

Posted on:

Saturday 10th November 2012
View Replies!

Efficient way to remove objects from a list

Hi all, Today I wrote some code like this: for m in self.messages: if not m.finished: continue #process the message fini = [m for m in self.messages if m.finished] for m in fini: self.messages.remove(m) As you can, I want to ...
VIEWS ON THIS POST

118

Posted on:

Saturday 10th November 2012
View Replies!

about recursive load

am very newbie in Python, but as part of a project i need to load configuration -a settings.py file in the package dir- of my apps recursively, something like this: settings.load_config("project.test.app") settings.load_config("project.test.*") settings.load_config("project.test") settings.load_config("*") this allows me to load ...
VIEWS ON THIS POST

133

Posted on:

Saturday 10th November 2012
View Replies!

Re: Question about interpreter

On Fri, Oct 24, 2008 at 12:55 PM, Usman Ajmal wrote: > An interpreter which Python also uses, translates and checks for errors in > code, one line at a time. > > Question: Does interpreter also executes the ...
VIEWS ON THIS POST

98

Posted on:

Saturday 10th November 2012
View Replies!

Re: Module for creating a screenshot of a web page given a URL?

John J. Lee wrote: > > dananrg@yahoo.com writes: > >> > Untestetd, but I'm pretty sure something like this will do. >> > If you need more control, and on windows, try pywinauto >> >> I do need it to ...
VIEWS ON THIS POST

98

Posted on:

Saturday 10th November 2012
View Replies!