Rolando Espinoza La Fuente a écrit :
On Fri, Mar 5, 2010 at 2:32 PM, mk wrote:
Arnaud Delobelle wrote:
1 == True
True
0 == False
True
So what's your question?
Well nothing I'm just kind of bewildered: I'd expect smth like that in Perl,
but not in Python.. Although I can understand the ra
Hi,
I am having a problem while using sleep function from libc , the
thread in which i am calling it is getting struck and not allowing
other threads to execute. Here is a simple code that i am trying to
exeute
import threading
import time
import dl
def dummy1():
a=dl.open('/lib/libc.so.6
Dear Stefan,
Thanks a lot for your interest in PythoidC.
Yes, PythoidC takes regular expression to parse C header files,
but there is no danger at all, because, the parsed result is only used for
introspecting and auto-completion, has noting to do with syntax converting and
compiling.
I just im
On Mar 8, 1:18 am, Paweł Banyś
wrote:
> Hello,
>
> I have already read about Python and multiprocessing which allows using
> many processors. The idea is to split a program into separate tasks and
> run each of them on a separate processor. However I want to run a Python
> program doing a single s
Hi ,
I am having a problem while using sleep function from libc , the
thread in which i am calling it is getting struck and not allowing
other threads to execute. Here is a simple code that i am trying to
exeute
import threading
import time
import dl
def dummy1():
a=dl.open('/lib/libc.so.6
Steven D'Aprano wrote:
On Mon, 08 Mar 2010 16:09:12 +1300, Gregory Ewing wrote:
Given some known data/crc pairs, how feasible is it to figure out the
polynomial being used to generate the crc?
Google is your friend:
http://www.woodmann.com/fravia/crctut1.htm
That page was interes
On 08/03/2010 02:41, pyt...@bdurham.com wrote:
Is the best pratice way to detect internet connectivity under
Windows (using Python 2.6) simply to attempt to access a known
internet website using urllib or urlib2 wrapped in a try/except
construct?
Well, in theory you could use the Internet API:
> I took a look at the 'this' module to see where the file is stored. This is
> probably old news to some people, but was new to me.
>
> print this.s
> Gur Mra bs Clguba, ol Gvz Crgref
>
> Ornhgvshy vf orggre guna htyl.
> Rkcyvpvg vf orggre guna vzcyvpvg.
> Fvzcyr vf orggre guna pbzcyrk.
> Pbzcyrk
Steven D'Aprano wrote:
Can you just ask the application developer what CRC is being used? Or
look at the source code? Disassemble the binary?
There's no source, and the binary is enormous. I could ask,
but I wouldn't hold out much hope of them being willing to
tell me.
it appears that the cr
2010/3/8 Raymond Hettinger :
> On Mar 7, 5:46 pm, Steven D'Aprano cybersource.com.au> wrote:
>> Given that Counter supports negative counts, it looks to me that the
>> behaviour of __add__ and __sub__ is fundamentally flawed. You should
>> raise a bug report (feature enhancement) on the bug tracke
Daniel Fetchinson writes:
> > I'm curious. Was this encoded purely for fun?
>
> Yes.
For some more fun, try measuring the ‘this’ module source code against
the principles in the Zen.
--
\ “Leave nothing to chance. Overlook nothing. Combine |
`\ contradictory observa
On Sun, 07 Mar 2010 22:31:00 -0800, Raymond Hettinger wrote:
> On Mar 7, 5:46 pm, Steven D'Aprano cybersource.com.au> wrote:
>> Given that Counter supports negative counts, it looks to me that the
>> behaviour of __add__ and __sub__ is fundamentally flawed. You should
>> raise a bug report (featu
Alf P. Steinbach wrote:
> * Gabriel Genellina:
>> En Thu, 04 Mar 2010 20:52:04 -0300, Alf P. Steinbach
>> escribió:
>>
>>> Sorry, as with the places noted above, I can't understand what you're
>>> trying to say here.
>>
>> Regarding your posts, neither can I. All the time. Sorry, deciphering
>> yo
Mahesh wrote:
> Hi,
>
> I am having a problem while using sleep function from libc , the
> thread in which i am calling it is getting struck and not allowing
> other threads to execute. Here is a simple code that i am trying to
> exeute
>
> import threading
> import time
> import dl
>
>
> def
Pete Emerson wrote:
On Mar 5, 1:14 pm, Chris Rebert wrote:
On Fri, Mar 5, 2010 at 12:25 PM, Pete Emerson wrote:
On Fri, Mar 5, 2010 at 12:17 PM, Chris Rebert wrote:
On 3/5/10, Pete Emerson wrote:
In a module, how do I create a conditional that will do something
bas
Gregory Ewing wrote:
Steven D'Aprano wrote:
Can you just ask the application developer what CRC is being used? Or
look at the source code? Disassemble the binary?
There's no source, and the binary is enormous. I could ask,
but I wouldn't hold out much hope of them being willing to
tell me.
Johny wrote:
I have this directory structure
C:
\A
__init__.py
amodule.py
\B
__init__.py
bmodule.py
\D
__init__.py
dmodule.py
and I want to import bmodule.py
C:\>cd \
C:\>python
Python 2.5 (r25:51908, S
What to do if anything bites.
Check our bites treatment at
http://108ambulance.blogspot.com/2010/03/108-ambulance-home-page.html
--
http://mail.python.org/mailman/listinfo/python-list
Dear User,
ANNOUNCE:Major Feature Release
libmsgque: Application-Server-Toolkit for
C, C++, JAVA, C#, TCL, PERL, PYTHON, VB.NET
PLMK: Programming-Language-Microkernel
NHI1: Non-Human-Intelligence #1
SUMMARY
===
This is
On Mar 8, 2010, at 7:28 AM, Steve Holden wrote:
>>
>> But your response, both the out of context quoting and your comment,
>> seems solely designed to convey a negative impression instead of
>> addressing any technical issue.
>>
> This isn't an isolated case, Alf. Physician, heal thyself.
As fa
many people mentioned scalibility... though i think it is fruitful to
talk about at what size is the NoSQL databases offer better
scalability than SQL databases.
For example, consider, if you are within world's top 100th user of
database in terms of database size, such as Google, then it may be
th
Hi Python superstars,
Guys, any ideas on how to convert HTML files to PDF files? Or as an
alternative, how to convert HTML files to an image file(jpeg/png/etc)?
Ideally, the converted PDF/Image file should like exactly like the way
HTML file looks in the browser.
I really have no idea about this
On Mon, Mar 8, 2010 at 4:21 AM, Steven D'Aprano <
st...@remove-this-cybersource.com.au> wrote:
> On Sun, 07 Mar 2010 22:31:00 -0800, Raymond Hettinger wrote:
>> On Mar 7, 5:46 pm, Steven D'Aprano > cybersource.com.au> wrote:
>>> Given that Counter supports negative counts, it looks to me that the
>
Hi,
I've written some (primitive) code to parse some apache logfies and
establish if apache has appended a session cookie to the end. We're
finding that some browsers don't and apache doesn't just append a "-"
- it just omits it.
It's working fine, but for an edge case:
Couldn't match 192.168.
On 03/08/10 17:06, Stephen Nelson-Smith wrote:
Hi,
I've written some (primitive) code to parse some apache logfies and
establish if apache has appended a session cookie to the end. We're
finding that some browsers don't and apache doesn't just append a "-"
- it just omits it.
It's working fine
On Mar 8, 10:36 am, Oltmans wrote:
> Hi Python superstars,
>
> Guys, any ideas on how to convert HTML files to PDF files? Or as an
> alternative, how to convert HTML files to an image file(jpeg/png/etc)?
> Ideally, the converted PDF/Image file should like exactly like the way
> HTML file looks in
In the ssl module docs (and in the tests) it says that if you have a client
specifying PROTOCOL_SSLv23 (so it'll use v2 or v3) and a server specifying
PROTOCOL_SSLv3 (so it'll only use v3) that you cannot connect between the two.
Why doesn't this end up using SSL v3 for the communication?
--
On 3/8/2010 12:51 PM, CM wrote:
On Mar 8, 10:36 am, Oltmans wrote:
Hi Python superstars,
Guys, any ideas on how to convert HTML files to PDF files? Or as an
alternative, how to convert HTML files to an image file(jpeg/png/etc)?
Ideally, the converted PDF/Image file should like exactly like the
On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad wrote:
> Thanks Geremy,
>
> That has been an absolute bump... GOD i cant sit on my chair, it has
> worked even on 512 bit number and with no time..
> superb i would say.
>
> lastly, i am using the code below to calculate Largest Prime fac
On Mon, Mar 8, 2010 at 2:05 PM, geremy condra wrote:
> On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad wrote:
>> Thanks Geremy,
>>
>> That has been an absolute bump... GOD i cant sit on my chair, it has
>> worked even on 512 bit number and with no time..
>> superb i would say.
>>
>> l
Xah Lee wrote:
> For example, consider, if you are within world's top 100th user of
> database in terms of database size, such as Google, then it may be
> that the off-the-shelf tools may be limiting. But how many users
> really have such massive size of data?
You've totally missed the point. It
I'm on Mac OS X 10.5.8 and downloaded 2.6.4 Mac Installer Disk Image
as/in(?) the sys admin user. For this user Pyhton 2.6.4 is now the
current version.
I want to use Python outside the sys asdmin user. However, all other
users still use Python 2.5.1 (Apple delivered).
The sys admin user looks in
[Replying to Geremy's reply because the OP's post didn't show up in my
newsreader.]
On Mar 7, 8:40 pm, geremy condra wrote:
> On Sun, Mar 7, 2010 at 1:55 PM, Fahad Ahmad wrote:
> > Dear All,
>
> > i am writing my crytographic scheme in python, i am just a new user to it.
> > I have written the co
[Steven D'Aprano]
> Thanks for the explanation Raymond. A few comments follow:
You're welcome :-)
> Would you consider a feature enhancement adding an additional method,
> analogous to update(), to perform subtractions? I recognise that it's
> easy to subclass and do it yourself, but there does
On Mon, Mar 8, 2010 at 1:24 PM, Raymond Hettinger wrote:
> Instinct says that conflating two models can be worse for usability
> than just picking one of the models and excluding the other.
>
Toward that end, shouldn't Counter do one (and only one) of the follow?
1) Disallow non-positive counts
On 3/7/2010 9:53 PM, Martin P. Hellwig wrote:
On 03/08/10 02:51, monkeys paw wrote:
On 3/7/2010 9:20 PM, Martin P. Hellwig wrote:
On 03/08/10 02:10, monkeys paw wrote:
I can xfer a file from a remote server using:
import urllib2 as u
x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl')
[Vlastimil Brom]
> Thank you very much for the exhaustive explanation Raymond!
You're welcome.
> I am by far not able to follow all of the mathematical background, but
> even for zero-truncating multiset, I would expect the truncation on
> input rather than on output of some operations.
I debat
Dave Angel wrote:
If you know so little about the
value, how do you even know it's a CRC ? Could it be a ones-complement
sum, such as used in Ethernet?
I'm going by the fact that the application reports a
"CRC mismatch" when it's wrong. I can't be sure that what
it calls a "CRC" is really a t
Hi Steven,
Steven D'Aprano wrote:
> On Sat, 06 Mar 2010 03:53:53 -0800, Johny wrote:
>
> import sys
> sys.path.append('C:\\A')
> from A.B import bmodule
>> Traceback (most recent call last):
>> File "", line 1, in
>> ImportError: No module named A.B
>
> The current directory is irre
Raymond Hettinger wrote:
Instead the choice was to implement the four methods as
multiset operations. As such, they need to correspond
to regular set operations.
Seems to me you're trying to make one data type do the
work of two, and ending up with something inconsistent.
I think you should
2010/3/8 Raymond Hettinger :
...
[snip detailed explanations]
>...
> In this case, we have an indication that what you really want is
> a separate class supporting elementwise binary and unary operations
> on vectors (where the vector fields are accessed by a dictionary
> key instead of a positiona
Jean-Michel Pichavant wrote:
> Johny wrote:
>> I have this directory structure
>>
>> C:
>> \A
>> __init__.py
>> amodule.py
>>
>> \B
>> __init__.py
>> bmodule.py
>>
>>\D
>> __init__.py
>> dmodule.py
>>
>> and I
Jean-Michel Pichavant wrote:
> Johny wrote:
>> I have this directory structure
>>
>> C:
>> \A
>> __init__.py
>> amodule.py
>>
>> \B
>> __init__.py
>> bmodule.py
>>
>>\D
>> __init__.py
>> dmodule.py
>>
>> and I
Hi Steve,
Steve Holden wrote:
> Mahesh wrote:
>> Hi,
>>
>> I am having a problem while using sleep function from libc , the
>> thread in which i am calling it is getting struck and not allowing
>> other threads to execute. Here is a simple code that i am trying to
>> exeute
>>
>> import threadin
Google Adsense wrote:
> What to do if anything bites.
>
> Check our bites treatment at
>
> http://108ambulance.blogspot.com/2010/03/108-ambulance-home-page.html
Pythons don't bite
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have two related lists:
x = [1 ,2, 8, 5, 0, 7]
y = ['a', 'a', 'b', 'c', 'c', 'c' ]
what I need is a list representing the mean value of 'a', 'b' and 'c'
while maintaining the number of items (len):
w = [1.5, 1.5, 8, 4, 4, 4]
I have looked at iter(tools) and next(), but that did not help me
[Gregory Ewing]
> I think you should be providing two types: one is a
> multiset, which disallows negative counts altogether;
> the other behaves like a sparse vector with appropriate
> arithmetic operations.
That is pretty close to what I said above:
"""
In this case, we have an indication that
monkeys paw wrote:
On 3/7/2010 9:53 PM, Martin P. Hellwig wrote:
On 03/08/10 02:51, monkeys paw wrote:
On 3/7/2010 9:20 PM, Martin P. Hellwig wrote:
On 03/08/10 02:10, monkeys paw wrote:
I can xfer a file from a remote server using:
import urllib2 as u
x=u.urlopen('http://tycho.usno.navy.mil
On 2010-03-08, Oltmans wrote:
> Guys, any ideas on how to convert HTML files to PDF files?
os.system("w3m -dump %s | a2ps -B --borders=no -o - | ps2pdf - %s" %
(infile,outfile))
--
Grant Edwards grant.b.edwardsYow! Am I accompanied by a
dimitri pater - serpia wrote:
Hi,
I have two related lists:
x = [1 ,2, 8, 5, 0, 7]
y = ['a', 'a', 'b', 'c', 'c', 'c' ]
what I need is a list representing the mean value of 'a', 'b' and 'c'
while maintaining the number of items (len):
w = [1.5, 1.5, 8, 4, 4, 4]
I have looked at iter(tools) and
On Mon, Mar 8, 2010 at 2:34 PM, dimitri pater - serpia
wrote:
> Hi,
>
> I have two related lists:
> x = [1 ,2, 8, 5, 0, 7]
> y = ['a', 'a', 'b', 'c', 'c', 'c' ]
>
> what I need is a list representing the mean value of 'a', 'b' and 'c'
> while maintaining the number of items (len):
> w = [1.5, 1.5,
Gregory Ewing wrote:
Dave
Angel wrote:
If you know so little about the value, how do you even know it's a
CRC ? Could it be a ones-complement sum, such as used in Ethernet?
I'm going by the fact that the application reports a
"CRC mismatch" when it's wrong. I can't be sure that what
it calls
On Mar 6, 4:13 pm, Benjamin Peterson wrote:
> On behalf of the Python development team, I'm pleased to announce a release
> candidate for the second bugfix release of the Python 3.1 series, Python
> 3.1.2.
>
> This bug fix release fixes numerous issues found in 3.1.1. This release
> candidate ha
thanks Chris and MRAB!
Looks good, I'll try it out
On Tue, Mar 9, 2010 at 12:22 AM, Chris Rebert wrote:
> On Mon, Mar 8, 2010 at 2:34 PM, dimitri pater - serpia
> wrote:
>> Hi,
>>
>> I have two related lists:
>> x = [1 ,2, 8, 5, 0, 7]
>> y = ['a', 'a', 'b', 'c', 'c', 'c' ]
>>
>> what I need is a
In article <58f61382-ac79-46fb-8612-a3c9fde29...@c16g2000yqd.googlegroups.com>,
Veloz wrote:
>
>The "peek" parts comes in when the user comes back later to see if
>their report has done. That is, in my page controller logic, I'd like
>to look through the complete queue and see if the specific rep
On 3/8/2010 5:34 PM, dimitri pater - serpia wrote:
Hi,
I have two related lists:
x = [1 ,2, 8, 5, 0, 7]
y = ['a', 'a', 'b', 'c', 'c', 'c' ]
what I need is a list representing the mean value of 'a', 'b' and 'c'
while maintaining the number of items (len):
w = [1.5, 1.5, 8, 4, 4, 4]
I have looke
On 3/8/2010 9:39 PM, John Posner wrote:
# gather data
tally_dict = defaultdict(Tally)
for i in range(len(x)):
obj = tally_dict[y[i]]
obj.id = y[i] <--- statement redundant, remove it
obj.total += x[i]
obj.count += 1
-John
--
http://mail.python.org/mailman/listinfo/python-li
On 3/8/2010 9:43 PM, John Posner wrote:
On 3/8/2010 9:39 PM, John Posner wrote:
obj.id = y[i] <--- statement redundant, remove it
Sorry for the thrashing! It's more correct to say that the Tally class
doesn't require an "id" attribute at all. So the code becomes:
#-
from collect
I have been using ElementTree to write an app, and would like to
simply remove an element.
But in ElementTree, you must know both the parent and the child
element to do this.
There is no getparent() function, so I am stuck if I only have an
element.
I am iterating over a table and getting all tag
Hi,
actually i have simplified my scenario a lot here ,
In my actual case , i have to call a C-api which blocks on c select , in a
separate thread.
my thread is getting struck in that api , and thus blocking all the other
threads.
Can you point to something which will help me call this blockin
Hello all:
I have a project with many pyw files. One file holds a variable and a
function that I find myself using across many other pyw files, so I
called it helpers.pyw. The variable is "mostRecent", which is a string
and is meant to hold a string so I know what the program most recently
output;
Alex Hall wrote:
Hello all:
I have a project with many pyw files. One file holds a variable and a
function that I find myself using across many other pyw files, so I
called it helpers.pyw. The variable is "mostRecent", which is a string
and is meant to hold a string so I know what the program mos
Thanks, it worked as expected. I guess I figured that Python would
read my mind and realize that I wanted mostRecent to act globally for
the program, imported as a copy or accessed in its own namespace
(right term?) Oh well, the day computers can read thoughts like that
is the day programmers are o
I can't find any detailed information about scipy.sparse.
My specific question: what does "for x in A" give me when A is a sparse
matrix? It seems to yield all nonzero locations, but in what kind of
form? Very specifically: how do I get the (i,j) coordinates and the
value from x?
Victor.
--
Vic
[also replying to Geremy since the OP's message doesn't appear...]
On Mar 8, 11:05 am, geremy condra wrote:
> On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad wrote:
> > Thanks Geremy,
>
> > That has been an absolute bump... GOD i cant sit on my chair, it has
> > worked even on 512 bit number
Hey All,
I'm new in this community. I am writing a static analyzer for validating C Code
using python and for that I'm looking for a python module/API that will detect
Function block of a given C-File. I know simple function can be detected using
push "{" and poping it if character "}" is found
66 matches
Mail list logo