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,
Posted On: Sunday 25th of November 2012 09:03:46 PM Total Views:  89
View Complete with Replies

RELATED TOPICS OF Python Programming PROGRAMMING LANGUAGE




Re: Trying ZODB, background in Relational: mimic auto_increment?

On Thu, 14 Aug 2008 05:22:35 -0700 (PDT), Phillip B Oldham wrote: >Hi all. I'm playing with standalone ZODB at the moment trying to get a >better understanding of its use in applications. I come from a >PHP/MySQL background, ...
VIEWS ON THIS POST

105

Posted on:

Sunday 25th November 2012
View Replies!

Regular Toronto Area Python User's Group this Tuesday 7pm

We'll be holding our regular Toronto Area Python User's Group meeting this coming Tuesday at 7pm at Linux Caffe. Tentative topic: "Profiling, debugging, testing, a discussion of tools, tricks and techniques" Looking to pool our resources on what tools, tricks ...
VIEWS ON THIS POST

74

Posted on:

Sunday 25th November 2012
View Replies!

Python GUI interpreter slower than DOS-version?

Sometimes when running very intensive computations the Python- interpreter kind of overheats and stops responding. I have gotten the impression that the dos-version is less likely to crash. Can that be true and if so, why Is there anyway to ...
VIEWS ON THIS POST

73

Posted on:

Sunday 25th November 2012
View Replies!

Re: dynamically creating html code with python...

Sorry, my fault... I am trying to build a web application for data ****ysis. Basically some data will be read from a database and passed to a python script (myLibs.py) to build an image as follows. Code: f=urllib.urlopen("http://localhost/path2Libs/myLibs.py",urllib.urlencode(TheData)) print "Content-type: ...
VIEWS ON THIS POST

126

Posted on:

Sunday 25th November 2012
View Replies!

Constructing MIME message without loading message stream

I would like to MIME encode a message from a large file without first loading the file into memory. Assume the file has been pre-encoded on disk (actually I am using encode_7or8bit, so the encoding should be null). Is there ...
VIEWS ON THIS POST

70

Posted on:

Sunday 25th November 2012
View Replies!

Problem obtaining an object reference...

I have two windowing classes A and B. Inside A's constructor i created an instance B to display its Modal window. Only on clicking OK/ Closing this modal window do i proceed to display the A's window. that is ...
VIEWS ON THIS POST

72

Posted on:

Sunday 25th November 2012
View Replies!

Re: problem calling parent's __init__ method

On Thu, Aug 7, 2008 at 11:11 AM, Ryan Krauss wrote: > I am trying to call a parent's __init__ method from the child's: This works for me just fine: class InnerBlock(object): def __init__(self, codelist, noout=False, **kwargs): self.codelist = ...
VIEWS ON THIS POST

185

Posted on:

Sunday 25th November 2012
View Replies!

Questions about asyncore

Hi all I have been using my own home-brewed client/server technique for a while, using socket and select. It seems to work ok. The server can handle multiple clients. It does this by creating a new thread for each connection. ...
VIEWS ON THIS POST

65

Posted on:

Sunday 25th November 2012
View Replies!

regex search loops instead of findall

Hi ... I'm trying to make my Python regex code behave like my C++ regex code. In order to search large strings for *all* occurrences of the thing I'm searching for, I loop like this in C++: void number_search(const std::string& ...
VIEWS ON THIS POST

81

Posted on:

Sunday 25th November 2012
View Replies!

Parser for Wordpress export files?

Has anyone written a parser for the export files that wordpress generates (WordPress Extended RSS)...
VIEWS ON THIS POST

74

Posted on:

Sunday 25th November 2012
View Replies!

Re: Shared script

On Fri, 2008-08-01 at 14:41 -0700, Zach Hobesh wrote: > I wrote a script that several different people on different machines > need to run on a regular basis. When I first wrote it, it was in > crisis mode, ...
VIEWS ON THIS POST

96

Posted on:

Sunday 25th November 2012
View Replies!

Re: method decorators and more on decorators

En Tue, 29 Jul 2008 08:45:02 -0300, Themis Bourdenas escribi: > On Mon, Jul 28, 2008 at 11:12 AM, Gabriel Genellina > wrote: > >> En Sun, 27 Jul 2008 15:26:39 -0300, Themistoklis Bourdenas < >> tbourden@doc.ic.ac.uk > escribió: ...
VIEWS ON THIS POST

64

Posted on:

Sunday 25th November 2012
View Replies!

Correct Attribute Assignment Methodology?

Say I have these classes: class Parent(object): """Parent is abstract""" a=None def showA(): return self.a class Child(Parent): """inherits a and showA from Parent""" def __init__(self,a,b): self.a=a self.b=b def showAB(): return self.a,self.b class GrandChild(Child): """inherits all of the above""" def __init__(self,a,b,c): ...
VIEWS ON THIS POST

59

Posted on:

Sunday 25th November 2012
View Replies!

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

81

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

108

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

94

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

129

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

90

Posted on:

Sunday 25th November 2012
View Replies!

Re: Importing different versions of a module

mercado mercado wrote: >
VIEWS ON THIS POST

90

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

128

Posted on:

Sunday 25th November 2012
View Replies!