CHEN Guang, 12.03.2010 08:51:
Metalone wrote:
I just tried the seek test with Cython.
Cython fseek() : 1.059 seconds. 30% slower than 'C'
Python f.seek : 1.458 secondds. 80% slower than 'C'.
It is amazing to me that Cython generates a 'C' file that is 1478
lines.
PythoidC ( http://pythoidc.
Hi,
Im programming a simple webcrawler with threading for the fun of it, which
is inserting the data fetch into a mysql database, but after continuously
cause my mysql server to produce error during database queries (i assume
its cause because of the many execution at the same time.) the scipt
pr
On Fri, 12 Mar 2010 00:11:37 -0700, Zooko O'Whielacronx wrote:
> Folks:
>
> Every couple of years I run into a problem where some Python code that
> worked well at small scales starts burning up my CPU at larger scales,
> and the underlying issue turns out to be the idiom of accumulating data
> b
Metalone, 11.03.2010 23:57:
I just tried the seek test with Cython.
Cython fseek() : 1.059 seconds. 30% slower than 'C'
Python f.seek : 1.458 secondds. 80% slower than 'C'.
It is amazing to me that Cython generates a 'C' file that is 1478
lines.
Well, it generated an optimised Python interfa
I have learned java for half a year and now I want to learn Python, should I
learn python 3k or the traditional version?
On Wed, Mar 10, 2010 at 7:19 AM, kj wrote:
>
>
>
> Subject line pretty much says it all: is there a book like "Effective
> Java" for Python. I.e. a book that assumes that rea
Hi Michel. what is this 'resident soff' script, i cannot find it on
google. Secondly if i was to install something in admin mode, then i
would have installed the application i want to install. The actual
problem is that i dont want to manually run something with admin
rights and install.
still hav
On Wed, Mar 3, 2010 at 2:41 PM, Avid Fan wrote:
> Jonathan Gardner wrote:
>>
>> I see it as a sign of maturity with sufficiently scaled software that
>> they no longer use an SQL database to manage their data. At some point
>> in the project's lifetime, the data is understood well enough that the
On Thu, Mar 11, 2010 at 6:57 AM, gb345 wrote:
>
> And even when we've had volunteers, hardly anyone shows up!
>
> Any suggestions would be appreciated.
>
Two things: One, only you and your friend really care. Let that sink
in. No one is going to carry the group but you two, at least
initially.
T
Following the information from MvL I will try and get the 2.6 pyds built for
amd64, I see that there's a cross platform compile technique for distutils, but
am not sure if it applies to bdist_winexe etc etc. I'll have a go at this next week.
--
Robin Becker
--
http://mail.python.org/mailman/list
Lawrence D'Oliveiro wrote:
They could be using a strong cryptographic hash and truncating it to 16 bits
or something.
In which case you’ve got your work cut out for you...
Nope, I've determined that it's actually a pretty standard
CRC, and it's even using one of the standard polynomials,
0x8
Jonathan Gardner wrote:
> On Thu, Mar 11, 2010 at 6:57 AM, gb345 wrote:
>> And even when we've had volunteers, hardly anyone shows up!
>>
>> Any suggestions would be appreciated.
>>
>
> Two things: One, only you and your friend really care. Let that sink
> in. No one is going to carry the group b
On 11/03/2010 18:00, Martin v. Loewis wrote:
I have a Windows 7 (64bit AMD) machine
..
Perhaps some expert on the python list knows which versions of VS
support 64bit; I do have VS 2005/2008 etc, but I'll probably need to set
up a 64bit machine to see if they will install on a 64bit arc
Philip Semanchuk wrote:
>
> On Mar 10, 2010, at 5:03 PM, mohamed issolah wrote:
>
>> Hey, This is my program
>>
>> 18 def Creeimg():
>> 19 """transforme matrice en image"""
>> 20 img = Image.new ("L",(8,8))
>> 21 matrix = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
>> 22 im
I know this is wrong, but I'm not sure just how wrong it is, or why.
Using Python 2.x:
>>> s = "éâÄ"
>>> print s
éâÄ
>>> len(s)
6
>>> list(s)
['\xc3', '\xa9', '\xc3', '\xa2', '\xc3', '\x84']
Can somebody explain what happens when I put non-ASCII characters into a
non-unicode string? My guess is
News123 wrote:
Jonathan Gardner wrote:
On Thu, Mar 11, 2010 at 6:57 AM, gb345 wrote:
And even when we've had volunteers, hardly anyone shows up!
Any suggestions would be appreciated.
Two things: One, only you and your friend really care. Let that sink
in. No one is going to c
T wrote:
> Thanks for your suggestions! Here's what seems to be working - it's
> basically the same thing I originally had, but first checks to see if
> the line is blank
>
> response, lines, bytes = M.retr(i+1)
> # For each line in message
> for li
Jean-Michel Pichavant wrote:
> News123 wrote:
>> Jonathan Gardner wrote:
>>
>>> On Thu, Mar 11, 2010 at 6:57 AM, gb345 wrote:
>>>
And even when we've had volunteers, hardly anyone shows up!
Any suggestions would be appreciated.
>>> Two things: One, only you an
Neo wrote:
> I have learned java for half a year and now I want to learn Python,
> should I learn python 3k or the traditional version?
>
That depends on whether you need to use specific libraries that haven't
yet been ported to Python 3. If so then start with Python 2. If not,
start with 3 - the
alex goretoy wrote:
> hi,
> i'm trying to write a section of my program that needs to run bash
> builtin alias and declare, i've googled and tried every type of example
> i could find no to avail. this is what I've tried below and it doesn't
> work, is there a way for me to execute a bah builin fro
In article ,
Martin P. Hellwig wrote:
>On 02/28/10 11:05, Stefan Behnel wrote:
>> Steven D'Aprano, 28.02.2010 09:48:
>>> There ought to be some kind of competition for the least efficient
>>> solution to programming problems
>>
>> That wouldn't be very interesting. You could just write a code gene
"gb345" wrote in message
news:hnb0d1$2e...@reader1.panix.com...
A friend of mine and I have been trying to start a
scientific-programming-oriented Python group in our school (of
medecine and bio research), with not much success.
The main problem is attendance. Even though a *ton* of people
Steven D'Aprano wrote:
On Fri, 12 Mar 2010 00:11:37 -0700, Zooko O'Whielacronx wrote:
Folks:
Every couple of years I run into a problem where some Python code that
worked well at small scales starts burning up my CPU at larger scales,
and the underlying issue turns out to be the idiom of accum
Hi,
Python version: 2.6
Script:
def pt(start_time, end_time):
def ptime(time, time_str):
min, sec = divmod(time, 60)
hr, min = divmod(min, 60)
stmt = time_str + '\t'
if hr:
stmt += str(hr) + 'h'
stmt += str(min) + 'm' + str(sec) + 's'
Hi,
Is there any python module/utility available which would report the
time same as 'time' command in linux and/or report time same as
'ntimer' utility in Windows.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Is there any way to create variables which name matches with dict key?
For example:
dict1 = {"abc":'1", "def":"2"}
Now I am looking to have variable name abc and it's value be '1' etc.
Pl. suggest.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Gabriel, you resumed quite well what I did discovered after my
second post
by playing with the garbage collector module.
> (The garbage collector will,
> eventually, break the cycle and free those objects, but not very soon).
I'm not very familiar with the Python garbage collector, so yo
On 3/12/2010 3:24 AM Gregory Ewing said...
What confused me initially is that it seems to be adding
a few extra bytes to the checked data that aren't present
in the file. Figuring out what they're supposed to contain
is proving to be quite a headache...
Length?
Emile
--
http://mail.python.o
On Fri, 12 Mar 2010 01:05:27 -0800
Jonathan Gardner wrote:
> Let me give you an example. I worked on a system that would load
> recipients for email campaigns into a database table. The SQL database
> was nice during the initial design and prototype stage because we
> could quickly adjust the tabl
hiral wrote:
Is there any way to create variables which name matches with dict key?
For example:
dict1 = {"abc":'1", "def":"2"}
Now I am looking to have variable name abc and it's value be '1' etc.
1) you can't because "def" is a reserved word in Python.
2) why do you want to? This seems to
On Mar 12, 10:59 am, hiral wrote:
> Hi,
>
> Is there any way to create variables which name matches with dict key?
>
> For example:
> dict1 = {"abc":'1", "def":"2"}
>
> Now I am looking to have variable name abc and it's value be '1' etc.
>
> Pl. suggest.
>
> Thank you.
Check out this thread (ver
Luis M. González wrote:
On Mar 12, 10:59 am, hiral wrote:
Hi,
Is there any way to create variables which name matches with dict key?
For example:
dict1 = {"abc":'1", "def":"2"}
Now I am looking to have variable name abc and it's value be '1' etc.
Pl. suggest.
Thank you.
Check out
I'm trying to get threading going for the first time in python, and
I'm trying to modify code I found so that I can have the server close
the TCP connections and exit gracefully. Two problems:
1) While the KeyboardInterrupt works, if I make more than 0 curls to
the server and then quit, I can't ru
On 2010-03-12 06:35 AM, Steven D'Aprano wrote:
I know this is wrong, but I'm not sure just how wrong it is, or why.
Using Python 2.x:
s = "éâÄ"
print s
éâÄ
len(s)
6
list(s)
['\xc3', '\xa9', '\xc3', '\xa2', '\xc3', '\x84']
Can somebody explain what happens when I put non-ASCII characters i
On 12/03/2010 11:40, Robin Becker wrote:
I assume I can get those from a working Python amd64 install and stuff
on one of the compiler paths somehow.
Not sure if this is a bug; I dug around a bit and find that because of the cross
compilation distutils is supposed to add an extra li
Félix-Antoine Fortin wrote:
Thanks Gabriel, you resumed quite well what I did discovered after my
second post
by playing with the garbage collector module.
(The garbage collector will,
eventually, break the cycle and free those objects, but not very soon).
I'm not very familiar with the Pyth
Sorry but its not really an option for me with PostgreSQL. Thanks anyway.
I wonder if there is a simple way of just queueing the run of a function
make it only run once at a time but by multiply threads? :)
On Fri, 12 Mar 2010 00:54:57 -0800, Jonathan Gardner
wrote:
> For lots of transactions ru
kj wrote:
Subject line pretty much says it all: is there a book like "Effective
Java" for Python. I.e. a book that assumes that readers are
experienced programmers that already know the basics of the language,
and want to focus on more advanced programming issues?
~K
Effective Java is a g
Take a look at hotshot module of python
http://docs.python.org/library/hotshot.html
On Fri, Mar 12, 2010 at 7:26 PM, hiral wrote:
> Hi,
>
> Is there any python module/utility available which would report the
> time same as 'time' command in linux and/or report time same as
> 'ntimer' utility in
Ludolph,
This reminds me of the orange project which is developed in python.
http://www.ailab.si/orange/
It is actually for data mining, but many of the concepts could be used for a
more general programming structure.
Billy
-Original Message-
From: python-list-bounces+billy.earney=gmail.
On Fri, 12 Mar 2010 15:56:12 +
"John P." wrote:
> Sorry but its not really an option for me with PostgreSQL. Thanks anyway.
Why? It's your best option. Any other solutions that you can't use
before people give you more suggestions?
--
D'Arcy J.M. Cain | Democracy is three wolves
Hi;
I'm running Pexpect (no discussion list) with the following code:
#! /usr/bin/python
import pexpect
def runVpopmail(whatdo, acct, domain, newpw, oldpw=''):
if whatdo == 'vadduser':
child = pexpect.spawn('/home/vpopmail/bin/%s %...@%s %s' % (whatdo, acct,
domain, newpw))
elif whatdo ==
On Thu, 2010-03-11 at 20:38 +0200, Ludolph wrote:
>
> I decided I can use byteplay3 http://pypi.python.org/pypi/byteplay/ to
> disassemble the code to workable objects, It even allows me to rebuild
> the objects to bytecode. So if I define patterns on how python
> interrupts the source code to byt
Le Sun, 07 Mar 2010 22:40:36 +0800, pingooo a écrit :
> I'm writing an open source python client for a web service. The client
> may be used in all kinds of environments - Linux, Mac OS X, Windows, web
> hosting, etc by others. It is not impossible to have twisted as a
> dependency, but that makes
On Fri, 12 Mar 2010 11:22:04 -0500, "D'Arcy J.M. Cain"
wrote:
> On Fri, 12 Mar 2010 15:56:12 +
> "John P." wrote:
>> Sorry but its not really an option for me with PostgreSQL. Thanks
anyway.
>
> Why? It's your best option. Any other solutions that you can't use
> before people give you mor
Le Tue, 09 Mar 2010 15:56:47 -0800, Metalone a écrit :
> for i in xrange(100):
>f1.seek(0)
This is quite a stupid benchmark to write, since repeatedly seeking to 0
is a no-op. I haven't re-read the file object code recently, but chances
are that the Python file object has its own
On Fri, 12 Mar 2010 16:49:04 +, "John P."
wrote:
> On Fri, 12 Mar 2010 11:22:04 -0500, "D'Arcy J.M. Cain"
> wrote:
>> On Fri, 12 Mar 2010 15:56:12 +
>> "John P." wrote:
>>> Sorry but its not really an option for me with PostgreSQL. Thanks
> anyway.
>>
>> Why? It's your best option. An
On Mar 11, 9:57 am, gb345 wrote:
> I'm hoping to get advice from anyone with prior experience setting
> up a Python group.
>
> A friend of mine and I have been trying to start a
> scientific-programming-oriented Python group in our school (of
> medecine and bio research), with not much success.
>
Hi all,
I have a question regarding wxSlider. I'm developing a wxwidget python
interface for a robotic hand. The sliders send the target values to the
joints.
I'd like to display the current position of the joint on the slider. I
wanted to use wxSlider.SetTick(myposition) but I couldn't get SetTi
Steve thank you. The problem is that you can only run commands from Popen or
os.system and stuff. You cant run bash shell builtin commands for some
reason.
I was able to get this to work. What I did is call this:
Popen(["bash -c 'source
$HOME/.bashrc;alias'"],shell=True,stdout=PIPE).stdout.read()
On Mar 12, 2010, at 1:56 PM, Ugo Cupcic wrote:
Hi all,
I have a question regarding wxSlider. I'm developing a wxwidget python
interface for a robotic hand. The sliders send the target values to
the
joints.
I'd like to display the current position of the joint on the slider. I
wanted to use
On Thu, Mar 11, 2010 at 8:57 AM, gb345 wrote:
>
>
>
> I'm hoping to get advice from anyone with prior experience setting
> up a Python group.
>
> A friend of mine and I have been trying to start a
> scientific-programming-oriented Python group in our school (of
> medecine and bio research), with n
> Not sure if this is a bug
I think it is. It seems that the cross-build support in msvc9compiler
has been tested only in a build tree of Python (where there is no Libs
directory).
For released copies of Python, I could change that to distribute the
AMD64 pythonXY.lib in libs/amd64. [FWIW, I'm st
"D'Arcy J.M. Cain" writes:
> Just curious, what database were you using that wouldn't keep up with
> you? I use PostgreSQL and would never consider going back to flat
> files.
Try making a file with a billion or so names and addresses, then
compare the speed of inserting that many rows into a
I almost wrote a long reply to all this.
In the end it boils down to being concerned about how much overhead
there is to calling a 'C' function.
I assumed that file.seek() simply delegated to fseek() and thus was
one way to test this overhead.
However, I now think that it must be doing more and may
Gabriel Rossetti writes:
> kj wrote:
>>
>> Subject line pretty much says it all: is there a book like "Effective
>> Java" for Python. I.e. a book that assumes that readers are
>> experienced programmers that already know the basics of the language,
>> and want to focus on more advanced programmi
>> Can somebody explain what happens when I put non-ASCII characters into a
>> non-unicode string? My guess is that the result will depend on the
>> current encoding of my terminal.
>
> Exactly right.
To elaborate on the "what happens" part: the string that gets entered is
typically passed as a b
Am 12.03.2010 21:56, schrieb Martin v. Loewis:
(*) If a source encoding was given, the source is actually recoded to
UTF-8, parsed, and then re-encoded back into the original encoding.
Why is that? So "unicode"-strings (as in u"string") are not really
unicode-, but utf8-strings?
Need citatio
On Python 2.5 here.
I've searched and searched but I can't find any way to convert a
datetime object that includes a timezone (tzinfo) to a unix timestamp.
Folks on the net say to simply use the timetuple() method of the object
and feed that to time.mktime(). But that just doesn't seem to work fo
Michael Rudolf writes:
> Am 12.03.2010 21:56, schrieb Martin v. Loewis:
>> (*) If a source encoding was given, the source is actually recoded to
>> UTF-8, parsed, and then re-encoded back into the original encoding.
>
> Why is that? So "unicode"-strings (as in u"string") are not really
> unicode-
Michael Rudolf wrote:
> Am 12.03.2010 21:56, schrieb Martin v. Loewis:
>> (*) If a source encoding was given, the source is actually recoded to
>> UTF-8, parsed, and then re-encoded back into the original encoding.
>
> Why is that?
Why is what? That string literals get reencoded into the source e
I just started working on POS tagging with these codes:
import nltk
text = nltk.word_tokenize("And now for something completely
different")
#print text
print nltk.pos_tag(text)
Python prompted me to download a resource with these codes:
Resource 'taggers/maxent_treebank_pos_tagger/english.pickle
Hephzibah writes:
> ImportError: No module named numpy
>
> Can someone pls. tell me what I'm supposed to do next?
Install numpy would be my first guess.
--
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokma.com/
http://c
Hello everybody!
I have to set up a small webshop for used books, CDs, DVD, and stuff
and did't find anything realy usefull on google.
I'm pretty skilled with Python and would strongly prefer a Python
based Shop but all I've found are in early stage, unmaintained or
too limited.
I've look
On 3/12/2010 5:02 PM Alexander Kapps said...
Hello everybody!
I have to set up a small webshop for used books, CDs, DVD, and stuff and
did't find anything realy usefull on google.
Have you checked the current status of Satchmo?
Emile
I'm pretty skilled with Python and would strongly prefe
Hello everybody!
I have to set up a small webshop for used books, CDs, DVD, and stuff
and did't find anything realy usefull on google.
I'm pretty skilled with Python and would strongly prefer a Python
based Shop but all I've found are in early stage, unmaintained or
too limited.
I've look
Sorry, Emile for the private post, one beer too much and the wrong
button... ;-)
Emile van Sebille wrote:
> On 3/12/2010 5:02 PM Alexander Kapps said...
>> Hello everybody!
>>
>> I have to set up a small webshop for used books, CDs, DVD, and
stuff and
>> did't find anything realy usefull on g
On Fri, 12 Mar 2010 13:40:23 +, MRAB wrote:
>> To be taken seriously, I think you need to compare stringchain to the
>> list idiom. If your benchmarks favourably compare to that, then it
>> might be worthwhile.
>>
> IIRC, someone did some work on making concatenation faster by delaying
> it u
Does anyone know of a good python to stand alone exe compiler?
Thanks,
-Robin
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Mar 12, 2010 at 7:26 PM, Robin wrote:
> Does anyone know of a good python to stand alone exe compiler?
py2exe:
http://www.py2exe.org/
Cheers,
Chris
--
http://blog.rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
>> Metalone wrote:
>>> I just tried the seek test with Cython.
>>> Cython fseek() : 1.059 seconds. 30% slower than 'C'
>>> Python f.seek : 1.458 secondds. 80% slower than 'C'.
>>>
>>> It is amazing to me that Cython generates a 'C' file that is 1478
>>> lines.
>>
>> PythoidC ( http://pythoidc.goo
On 13 mar, 00:26, Robin wrote:
> Does anyone know of a good python to stand alone exe compiler?
http://tinyurl.com/yfcfzz4
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina writes:
> On 13 mar, 00:26, Robin wrote:
>
>> Does anyone know of a good python to stand alone exe compiler?
>
> http://tinyurl.com/yfcfzz4
Wow, pathetic fuck. You don't have to post you know.
--
John Bokma j3b
H
On Mar 12, 4:33 pm, John Bokma wrote:
> Hephzibah writes:
> > ImportError: No module named numpy
>
> > Can someone pls. tell me what I'm supposed to do next?
>
> Install numpy would be my first guess.
>
> --
> John Bokma j3b
>
> Hackin
On Fri, Mar 12, 2010 at 8:42 PM, robin wrote:
> On 3/12/2010 9:12 PM, Chris Rebert wrote:
>> On Fri, Mar 12, 2010 at 7:26 PM, Robin wrote:
>>> Does anyone know of a good python to stand alone exe compiler?
>>>
>> py2exe:
>> http://www.py2exe.org/
>
> do you of an alternate compilter it doesn't w
On Fri, 12 Mar 2010 22:26:34 -0600, John Bokma wrote:
> Gabriel Genellina writes:
>
>> On 13 mar, 00:26, Robin wrote:
>>
>>> Does anyone know of a good python to stand alone exe compiler?
>>
>> http://tinyurl.com/yfcfzz4
>
> Wow, pathetic fuck. You don't have to post you know.
Gabriel is one
75 matches
Mail list logo