Re: a simple 'for' question


On Wed, 2008-07-09 at 00:00 -0400, Ben Keshet wrote: > oops, my mistake, actually it didn't work... > when I tried: > for x in folders: > print x # print the current folder > filename='Folder/%s/myfile.txt' %x > f=open(filename,'r') > ...
Posted On: Sunday 25th of November 2012 09:09:57 PM Total Views:  50
View Complete with Replies

RELATED TOPICS OF Python Programming PROGRAMMING LANGUAGE




SimpleJson is slow .... is there any C Compiled version ?

, I have created an API which fetches some data from the database. I am using simplejson to encode it and return it back. Now the problem is that, this API is being called for millions of times in ...
VIEWS ON THIS POST

72

Posted on:

Sunday 25th November 2012
View Replies!

bliptv.reader V1.0 released

I am pleased to announce Version 1.0 of bliptv.reader, a package for easy access to videos hosted on blip.tv. You can get it via PyPI: http://pypi.python.org/pypi/bliptv.reader What is bliptv.reader ---------------------- bliptv.reader is a Python wrapper around the API of video ...
VIEWS ON THIS POST

84

Posted on:

Sunday 25th November 2012
View Replies!

Rifle & Ammunition Retail Store - Sportsman, Wildlife and OutdoorSupply

Giuen Interpose & Outright Company Huntingrifle, Ammunition, Optics, Navigation Surplus Rifle Sale Pre-Owned Rifles Precision Rifle - Pistol A New Generation Outright Company begun in 2008 the funding for a battlefield data link that projected data ...
VIEWS ON THIS POST

65

Posted on:

Sunday 25th November 2012
View Replies!

Elixir 0.6.0 released!

I am very pleased to announce that version 0.6.0 of Elixir ( http://elixir.ematia.de ) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. Please look at: http://elixir.ematia.de/trac/wiki/Migrate05to06 for detailed upgrade notes. Here are the highlights ...
VIEWS ON THIS POST

110

Posted on:

Sunday 25th November 2012
View Replies!

Re: Odd math related issue.

Robert Rawlins wrote: > Ive got what seems to me to be a totally illogical math issue here > which I cant figure out. Take a look at the following code: > > /self/.__logger.info(/"%i / %i"/ % (bytes_transferred, > /self/.__sessions[path].total_bytes)) ...
VIEWS ON THIS POST

70

Posted on:

Sunday 25th November 2012
View Replies!

Re: Importing different versions of a module

mercado mercado wrote: >
VIEWS ON THIS POST

75

Posted on:

Sunday 25th November 2012
View Replies!

how to create GUI dynamically

Hi; i m working on a project where i need run time creation of GUI. i have some no. of entities for which i want checkboxes in front of them which can be checked/ unchecked by user. But the problem ...
VIEWS ON THIS POST

109

Posted on:

Sunday 25th November 2012
View Replies!

RE: Odd math related issue.

> if you divide two integers, you'll get an integer back (in Python 2.X, > at least). quick fix: > > percentage = bytes_transferred * 100 / total_bytes > > That worked a charm mate,
VIEWS ON THIS POST

74

Posted on:

Sunday 25th November 2012
View Replies!

Core Dump - Segmentation Fault -Newbie

Hi - I am very new to python. I get this random core dump and am looking for a good way to catch the error. I know the function my core dump occurs. Is there any error catching/handling that I ...
VIEWS ON THIS POST

62

Posted on:

Sunday 25th November 2012
View Replies!

create PyString

in an extension module i'd like to create a very large PyString. As the string is very large i'd first like to create the string and let Python allocate the space for it and then fill it from my ...
VIEWS ON THIS POST

66

Posted on:

Sunday 25th November 2012
View Replies!

Re: bad recursion, still works

On Jul 15, 7:21pm, Michael Torrie wrote: > iu2 wrote: > > I still don't understand: In each recursive call to flatten, acc > > should be bound to a new [], shouldn't it Why does the binding happen ...
VIEWS ON THIS POST

92

Posted on:

Sunday 25th November 2012
View Replies!

storing references instead of copies in a dictionary

, I'm storing functions in a dictionary (this is basically for cooking up my own fancy schmancy callback scheme, mainly for learning purpose): >>> def f2(arg): .... return "f2 " + arg .... >>> >>> def f1(arg): .... return ...
VIEWS ON THIS POST

103

Posted on:

Sunday 25th November 2012
View Replies!

Framework recommendations for web service?

We're looking at the next phase of development for our webapp, and the main focus will be to move the core from the app to a web service so other systems can use the data we've gathered (we're thinking along ...
VIEWS ON THIS POST

71

Posted on:

Sunday 25th November 2012
View Replies!

Is there any library that can extract titles from PDFs?

all I want to write a script which will rename PDFs according to their titles. I want to know if there is any library that can extract titles(the first line of the PDF) from PDFs. Many
VIEWS ON THIS POST

77

Posted on:

Sunday 25th November 2012
View Replies!

Is it legal to rebuild Python.exe to include Version property tab?

My company distributes a COM object that can be license and userd by our customers. Some of my company's internal application also use the COM object. However, for internal applications, instead of licensing the COM object, we just make the ...
VIEWS ON THIS POST

74

Posted on:

Sunday 25th November 2012
View Replies!

Re: Characters Being Misread

Victor wrote... >>>> import binascii >>>> binascii.unhexlify('\x0c') >TypeError: Odd-length string >What gives here The function unhexlify() wants an even-length string. From the online help: >>> help(binascii.unhexlify) unhexlify(...) a2b_hex(hexstr) -> s; Binary data of hexadecimal representation. hexstr must contain an even ...
VIEWS ON THIS POST

63

Posted on:

Sunday 25th November 2012
View Replies!

Mutually referencing imports -- impossible?

I started off with a module that defined a class Vehicle, and then subclasses Car and Motorcycle. In the Car class, for some bizarre reason, I instantiated a Motorcycle. Please pretend that this can't be avoided for now. Meanwhile, my ...
VIEWS ON THIS POST

101

Posted on:

Sunday 25th November 2012
View Replies!

Re: multithreading in python ???

Laszlo Nagy wrote: > Abhishek Asthana wrote: >> >> Hi all , >> >> I have large set of data computation and I want to break it into >> small batches and assign it to different threads .I am implementing ...
VIEWS ON THIS POST

77

Posted on:

Sunday 25th November 2012
View Replies!

redirecting output of process to a file using subprocess.Popen()

I am trying to redirect stderr of a process to a temporary file and then read back the contents of the file, all in the same python script. As a simple exercise, I launched /bin/ls but this doesn't work: #!/usr/bin/python ...
VIEWS ON THIS POST

190

Posted on:

Sunday 25th November 2012
View Replies!

socket-module: different behaviour on windows / unix when a timeoutis set

, it seems that the socket-module behaves differently on unix / windows when a timeout is set. Here an example: # test.py import socket sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM) print 'trying to connect...' sock.connect(('127.0.0.1',9999)) print 'connected!' # executed on windows >C:\Python25\python.exe test.py trying to ...
VIEWS ON THIS POST

181

Posted on:

Sunday 25th November 2012
View Replies!