Re: using queue

2009-09-02 Thread Jan Kaliszewski
06:49:13 Scott David Daniels wrote: Tim Arnold wrote: (1) what's wrong with having each chapter in a separate thread? Too much going on for a single processor? Many more threads than cores and you spend a lot of your CPU switching tasks. In fact, python threads work relatively the best

Re: Unable to install pywin32 for Python 2.6.2

2009-09-02 Thread Gabriel Genellina
En Thu, 03 Sep 2009 02:16:13 -0300, David Lees escribió: In case anyone else has this problem, my mistake was a PYTHONPATH that pointed to my Python 2.5 installation. I simply changed it to: C:\Python26\Lib\site-packages and reran the Pywin32 installer and all is fine. Assuming you insta

Re: string find mystery

2009-09-02 Thread John Yeung
On Sep 3, 1:45 am, Sean DiZazzo wrote: > string.find() returns the index at which the given word is found > within the string.  If the string is not found it returns -1.  So, no > matter what you do, string.find() will evaluate to "True" It will evaluate as false if the substring is found at the

Re: string find mystery

2009-09-02 Thread John Yeung
On Sep 3, 1:10 am, Helvin wrote: >         if file_str.find('Geometry'): >         #if file_str.endswith('Data_Input_Geometry.txt'): >             print 'I found geometry' > The amazing thing is when file_str  = 'C:\Qt\SimLCM\Default > \Data_Input_Material.txt', > the first if statement if fulfill

Re: string find mystery

2009-09-02 Thread Sean DiZazzo
On Sep 2, 10:10 pm, Helvin wrote: > Hi, > > I have come across this very strange behaviour. Check this code: > >         if file_str.find('Geometry'): >         #if file_str.endswith('Data_Input_Geometry.txt'): >             print 'I found geometry' >         elif file_str.find('Material'): >    

Re: string find mystery

2009-09-02 Thread Stephen Hansen
On Wed, Sep 2, 2009 at 10:33 PM, Helvin Lui wrote: > Thanks! I just realised that too, but I used the condition:.find() > > 0 But I think your's is better. > Simple programming knowledge... > < > Ah, but != 0 vs > 0 isn't a question of better, but correctness: because if .find() returns 0,

Re: map

2009-09-02 Thread Hendrik van Rooyen
On Wednesday 02 September 2009 09:38:20 elsa wrote: > > in my own defense - firstly, I was able to implement what I wanted to > do with loops, and I used this to solve the problem I needed to. My rant was not intended as a personal attack - far from it - if all the people on this list were to po

Re: string find mystery

2009-09-02 Thread Helvin Lui
Thanks! I just realised that too, but I used the condition:.find() > 0 But I think your's is better. Simple programming knowledge... > < I made a blog post: http://learnwithhelvin.blogspot.com/2009/09/1-is-true-if-loops.html

Re: Unable to install pywin32 for Python 2.6.2

2009-09-02 Thread David Lees
David Lees wrote: I install Python 2.6.2 with no problem, but then run the installer for pywin32 from Source Forge and get this message at the end. IDLE works, but Pywin32 does not. Traceback (most recent call last): File "", line 601, in File "", line 313, in install ImportError: DLL lo

Re: string find mystery

2009-09-02 Thread Stephen Hansen
> > The amazing thing is when file_str = 'C:\Qt\SimLCM\Default > \Data_Input_Material.txt', > the first if statement if fulfilled, that seemingly says that in this > file_str, python actually finds the word 'Geometry'. > I know this, because the line: 'I found geometry' is printed. However, > if i

string find mystery

2009-09-02 Thread Helvin
Hi, I have come across this very strange behaviour. Check this code: if file_str.find('Geometry'): #if file_str.endswith('Data_Input_Geometry.txt'): print 'I found geometry' elif file_str.find('Material'): print 'I found material' The amazing thing

Re: Creating slice notation from string

2009-09-02 Thread Paul McGuire
On Sep 2, 4:55 pm, bvdp wrote: > I'm trying to NOT create a parser to do this and I'm sure that > it's easy if I could only see the light! > Well, this is a nice puzzler, better than a sudoku. Maybe a quick parser with pyparsing will give you some guidance on how to do this without a parser

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-02 Thread Sean DiZazzo
On Sep 2, 8:36 pm, MacRules wrote: > Hi, > > I installed Python daemon, pyodbc module to access the back-end DB server. > > My setup is like this > > load data job -> Python Daemon A, port 6000 -> Python Daemon B, port > 7000 -> MySQL > > Daemon A will perform data compression, such as GZIP, and s

Unable to install pywin32 for Python 2.6.2

2009-09-02 Thread David Lees
I install Python 2.6.2 with no problem, but then run the installer for pywin32 from Source Forge and get this message at the end. IDLE works, but Pywin32 does not. Traceback (most recent call last): File "", line 601, in File "", line 313, in install ImportError: DLL load failed: The spec

Re: using queue

2009-09-02 Thread Scott David Daniels
Tim Arnold wrote: "MRAB" wrote in message news:mailman.835.1251886213.2854.python-l...@python.org... I don't need that many threads; just create a few to do the work and let each do multiple chapters, something like this: a very pretty implementation with worker code: while True:

select.kqueue.control changelist argument

2009-09-02 Thread Ritesh Nadhani
Hi According to the docs at, http://docs.python.org/library/select.html Low level interface to kevent * changelist must be an iterable of kevent object or None * max_events must be 0 or a positive integer * timeout in seconds (floats possible) I am not sure I underst

Re: Entry Level Python Jobs

2009-09-02 Thread steve
On 09/03/2009 09:36 AM, steve wrote: Hi Jonathan, [...snip...] I feel stupid replying to my own post but just one more thing i thought about mentioning but forgot to add: - Look at your Liberal Arts major as an advantage. Every field has a 'computing gap' that needs to be filled but cannot b

Re: using queue

2009-09-02 Thread Tim Arnold
"MRAB" wrote in message news:mailman.835.1251886213.2854.python-l...@python.org... > Tim Arnold wrote: >> Hi, I've been using the threading module with each thread as a key in a >> dictionary. I've been reading about Queues though and it looks like >> that's what I should be using instead. Jus

Re: Using select.kqueue()

2009-09-02 Thread Ritesh Nadhani
Indeed, I was facing that issue. Appplying the patch to the select26 module now works. Also, I had to change: kq.control([]...) to kq.control(ev, ...) Not sure what happens when you pass None as the first parameter. On Tue, Sep 1, 2009 at 5:47 AM, wrote: > On 07:51 am, rite...@gmail.com wro

Re: Entry Level Python Jobs

2009-09-02 Thread steve
Hi Jonathan, On 09/02/2009 10:22 PM, JonathanB wrote: Ok, so what I'm hearing is "Get a code portfolio together and watch the job board on python.org." Thanks for the advice! I've been watching the python job board 3-4 times a week and I've been working my way through the Project Euler problems

Re: exec globals and locals

2009-09-02 Thread John Nagle
Chris Rebert wrote: On Wed, Sep 2, 2009 at 4:54 AM, Quentin Lampin wrote: Hi, Being fairly new to Python, I'm trying to figure out the best way to use the exec statement and I must admit that I am a bit lost. Generally, if you want to use the exec statement, you're probably lost. Unless yo

Re: Creating slice notation from string

2009-09-02 Thread Steven D'Aprano
On Wed, 02 Sep 2009 17:32:09 -0700, Bob van der Poel wrote: > Actually, nither this or Jan's latest is working properly. I don't know > if it's the slice() function or what (I'm using python 2.5). But: > > x = [1,2,3,4,5] > slice_string="2" > items = [int(n) if n else None for n in slice_string.s

python daemon - compress data and load data into MySQL by pyodbc

2009-09-02 Thread MacRules
Hi, I installed Python daemon, pyodbc module to access the back-end DB server. My setup is like this load data job -> Python Daemon A, port 6000 -> Python Daemon B, port 7000 -> MySQL Daemon A will perform data compression, such as GZIP, and send over data to Daemon B. Daemon B will perform

Re: Creating slice notation from string

2009-09-02 Thread Ethan Furman
On Wed, 02 Sep 2009 17:36:36 -0700, Bob van der Poel wrote: On Sep 2, 4:27 pm, Ethan Furman wrote: Bob van der Poel wrote: >>For a one-liner: >>   x[slice(*map(int, x[1:-1].split(':')))] > Thanks. > Almost works :) > For s="[2]" and s="[1:2]" it's fine. But, if I have > s = "[:2]" t

Re: ctypes WNetGetUniversalNameW

2009-09-02 Thread Gabriel Genellina
En Wed, 02 Sep 2009 14:24:10 -0300, Gustavo escribió: I'm trying to call WNetGetUniversalNameW via the ctypes module but I'm only causing the interpreter to crash. Unfortunately I don't have much experience with the ctypes module and I'm still trying to figure it out. I've searched for a solu

Re: website feedback to where?

2009-09-02 Thread Gabriel Genellina
En Wed, 02 Sep 2009 17:47:04 -0300, rogerdpack escribió: On Sep 2, 12:30 pm, Terry Reedy wrote: rogerdpack wrote: >http://docs.python.org/3.1/tutorial/introduction.html > some of the "text" examples are [incorrectly] color formatted. I did not see any problems with my browser (FF3.5), so

Qstrings to Strings

2009-09-02 Thread Helvin
Just wanted to say, to convert qstrings (or integers for that matter) to strings, use the str() function. http://learnwithhelvin.blogspot.com/2009/09/qstrings-and-strings.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Issue with writelines

2009-09-02 Thread r
On Sep 2, 8:20 am, LeeRisq wrote: (snip: code) > Traceback: (snip) > TypeError: writelines() argument must be a sequence of strings Well you need to print out "y" and see whats in there. The error is pretty obvious. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating slice notation from string

2009-09-02 Thread Bob van der Poel
On Sep 2, 4:27 pm, Ethan Furman wrote: > Bob van der Poel wrote: > > > > >>For a one-liner: > > >>   x[slice(*map(int, x[1:-1].split(':')))] > > > Thanks. > > > Almost works :) > > > For s="[2]" and s="[1:2]" it's fine. But, if I have > > > s = "[:2]" then I get: > > x[slice(*[int(i) for i in

Re: Creating slice notation from string

2009-09-02 Thread Bob van der Poel
On Sep 2, 5:16 pm, Steven D'Aprano wrote: > On Wed, 02 Sep 2009 16:41:34 -0700, Bob van der Poel wrote: > > > But, translating 1, 2 or 3 ints into a valid splice isn't quit that > > easy? I could figure each value, and convert them to either int or None > > (key is the None! From my previous try '

Re: Creating slice notation from string

2009-09-02 Thread Ethan Furman
Bob van der Poel wrote: For a one-liner: x[slice(*map(int, x[1:-1].split(':')))] Thanks. Almost works :) For s="[2]" and s="[1:2]" it's fine. But, if I have s = "[:2]" then I get: x[slice(*[int(i) for i in s.strip("[]").split(":")])] Traceback (most recent call last): File "", lin

Re: Creating slice notation from string

2009-09-02 Thread Steven D'Aprano
On Wed, 02 Sep 2009 16:41:34 -0700, Bob van der Poel wrote: > But, translating 1, 2 or 3 ints into a valid splice isn't quit that > easy? I could figure each value, and convert them to either int or None > (key is the None! From my previous try '' doesn't work!) > > But, I still need three possib

Re: Why does this group have so much spam?

2009-09-02 Thread Steven D'Aprano
On Wed, 02 Sep 2009 21:53:15 +0200, David wrote: >> As for the argument that home users who send spam are the victim, >> that's true up to a point, but not very far. Here's an analogy: suppose >> that terrorists sneak into your house after picking the lock -- or in >> the case of Windows users wit

Re: Creating slice notation from string

2009-09-02 Thread Bob van der Poel
On Sep 2, 4:43 pm, "Jan Kaliszewski" wrote: > 03-09-2009 o 00:55:10 Bob van der Poel wrote: > > > > >> For a one-liner: > > >>    x[slice(*map(int, x[1:-1].split(':')))] > > > Thanks. > > > Almost works :) > > > For s="[2]" and s="[1:2]" it's fine. But, if I have > > > s = "[:2]" then I get: > >

Re: Creating slice notation from string

2009-09-02 Thread Bob van der Poel
On Sep 2, 4:16 pm, "Rhodri James" wrote: > On Wed, 02 Sep 2009 23:57:48 +0100, Bob van der Poel   > wrote: > > > > >> Of course, you could also do something like this: > > >>      eval('x' + s) > >> or > >>      eval(str(x) + s) > > > Yes, I have user inputed 's'. So, if I can't get the generaliz

Re: Creating slice notation from string

2009-09-02 Thread Jan Kaliszewski
03-09-2009 o 00:55:10 Bob van der Poel wrote: For a one-liner:    x[slice(*map(int, x[1:-1].split(':')))] Thanks. Almost works :) For s="[2]" and s="[1:2]" it's fine. But, if I have s = "[:2]" then I get: x[slice(*[int(i) for i in s.strip("[]").split(":")])] Traceback (most recent call

Re: Why does this group have so much spam?

2009-09-02 Thread Steven D'Aprano
On Wed, 02 Sep 2009 15:22:08 -0400, Terry Reedy wrote: > Steven D'Aprano wrote: >> On Wed, 02 Sep 2009 02:16:27 -0400, Terry Reedy wrote: > >>> The rationale I have seen is this: if one leaves the wi-fi router open >>> and illegal activity is conducted thru it, and there is no residual >>> eviden

Re: Creating slice notation from string

2009-09-02 Thread Robert Kern
On 2009-09-02 17:55 PM, Bob van der Poel wrote: For a one-liner: x[slice(*map(int, x[1:-1].split(':')))] Thanks. Almost works :) For s="[2]" and s="[1:2]" it's fine. But, if I have s = "[:2]" then I get: x[slice(*[int(i) for i in s.strip("[]").split(":")])] Traceback (most recent c

Re: Creating slice notation from string

2009-09-02 Thread Rhodri James
On Wed, 02 Sep 2009 23:57:48 +0100, Bob van der Poel wrote: Of course, you could also do something like this:      eval('x' + s) or      eval(str(x) + s) Yes, I have user inputed 's'. So, if I can't get the generalized list version from Robert working I'll have to use this. Speed is not

Re: Creating slice notation from string

2009-09-02 Thread Bob van der Poel
> Of course, you could also do something like this: > >      eval('x' + s) > or >      eval(str(x) + s) > Yes, I have user inputed 's'. So, if I can't get the generalized list version from Robert working I'll have to use this. Speed is not a big deal in this. As to malicious input, I could pretty

Re: Creating slice notation from string

2009-09-02 Thread Bob van der Poel
> For a one-liner: > >    x[slice(*map(int, x[1:-1].split(':')))] Thanks. Almost works :) For s="[2]" and s="[1:2]" it's fine. But, if I have s = "[:2]" then I get: >>> x[slice(*[int(i) for i in s.strip("[]").split(":")])] Traceback (most recent call last): File "", line 1, in ValueError:

Re: Creating slice notation from string

2009-09-02 Thread Jan Kaliszewski
Erratum: eval(str(x) + s) -- but it's worse: less secure (e.g. if s could be user-typed) and most probably much more time-consuming (especially the latter). There should be *repr* instead of *str*. *j -- Jan Kaliszewski (zuo) -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating slice notation from string

2009-09-02 Thread Jan Kaliszewski
03-09-2009 o 00:11:17 MRAB wrote: bvdp wrote: I'm trying to NOT create a parser to do this and I'm sure that it's easy if I could only see the light! Is it possible to take an arbitrary string in the form "1:2", "1", ":-1", etc. and feed it to slice() and then apply the result to an exis

recursive decorator

2009-09-02 Thread Ethan Furman
Greetings, List! The recent thread about a recursive function in a class definition led me back to a post about bindfunc from Arnaud, and from there I found Michele Simionato's decorator module (many thanks! :-), and from there I began to wonder... from decorator import decorator @decorator

Re: Creating slice notation from string

2009-09-02 Thread Robert Kern
On 2009-09-02 16:55 PM, bvdp wrote: I'm trying to NOT create a parser to do this and I'm sure that it's easy if I could only see the light! Is it possible to take an arbitrary string in the form "1:2", "1", ":-1", etc. and feed it to slice() and then apply the result to an existing list? F

Re: Creating slice notation from string

2009-09-02 Thread MRAB
bvdp wrote: I'm trying to NOT create a parser to do this and I'm sure that it's easy if I could only see the light! Is it possible to take an arbitrary string in the form "1:2", "1", ":-1", etc. and feed it to slice() and then apply the result to an existing list? For example, I have a nor

Creating slice notation from string

2009-09-02 Thread bvdp
I'm trying to NOT create a parser to do this and I'm sure that it's easy if I could only see the light! Is it possible to take an arbitrary string in the form "1:2", "1", ":-1", etc. and feed it to slice() and then apply the result to an existing list? For example, I have a normal python lis

Re: website feedback to where?

2009-09-02 Thread Diez B. Roggisch
MRAB schrieb: Diez B. Roggisch wrote: rogerdpack schrieb: On Sep 2, 12:30 pm, Terry Reedy wrote: rogerdpack wrote: on this page http://docs.python.org/3.1/tutorial/introduction.html some of the "text" examples are [incorrectly] color formatted. I did not see any problems with my browser (FF

Re: website feedback to where?

2009-09-02 Thread MRAB
Diez B. Roggisch wrote: rogerdpack schrieb: On Sep 2, 12:30 pm, Terry Reedy wrote: rogerdpack wrote: on this page http://docs.python.org/3.1/tutorial/introduction.html some of the "text" examples are [incorrectly] color formatted. I did not see any problems with my browser (FF3.5), so please

Re: website feedback to where?

2009-09-02 Thread Diez B. Roggisch
rogerdpack schrieb: On Sep 2, 12:30 pm, Terry Reedy wrote: rogerdpack wrote: on this page http://docs.python.org/3.1/tutorial/introduction.html some of the "text" examples are [incorrectly] color formatted. I did not see any problems with my browser (FF3.5), so please be more specific. sear

Re: pickling question

2009-09-02 Thread Gary Robinson
Many thanks for the responses I've received here to my question (below). After reading the responses, I understand what the problem is much better. In addition to the solutions mentioned in the responses, now that I understand the problem I'll offer up my own solution. The following is an execut

Re: Problem w/ mysqldump

2009-09-02 Thread Victor Subervi
I tried running it like you said, got this error: 'mysqldump' is not a recognized internal or external command. If I could just figure out in what file the data were stored, I could copy it and try it in another computer. Any ideas? TIA, V On Wed, Sep 2, 2009 at 2:10 PM, Rami Chowdhury wrote: >

Re: website feedback to where?

2009-09-02 Thread rogerdpack
On Sep 2, 12:30 pm, Terry Reedy wrote: > rogerdpack wrote: > > on this page > > >http://docs.python.org/3.1/tutorial/introduction.html > > > some of the "text" examples are [incorrectly] color formatted. > > I did not see any problems with my browser (FF3.5), so please be more > specific. search

Re: Simple addition to random module - Student's t

2009-09-02 Thread Robert Kern
On 2009-09-02 14:15 PM, Raymond Hettinger wrote: On Sep 2, 6:51 am, Thomas Philips wrote: While the random module allows one to generate randome numbers with a variety of distributions, some useful distributions are omitted - the Student's t being among them. I'm curious to hear what your use

Re: exec globals and locals

2009-09-02 Thread Quentin Lampin
2009/9/2 Chris Rebert > On Wed, Sep 2, 2009 at 1:13 PM, Quentin Lampin > wrote: > > 2009/9/2 Chris Rebert > >> > >> On Wed, Sep 2, 2009 at 4:54 AM, Quentin Lampin > > >> wrote: > >> > Hi, > >> > Being fairly new to Python, I'm trying to figure out the best way to > use > >> > the > >> > exec sta

Re: exec globals and locals

2009-09-02 Thread Chris Rebert
On Wed, Sep 2, 2009 at 1:13 PM, Quentin Lampin wrote: > 2009/9/2 Chris Rebert >> >> On Wed, Sep 2, 2009 at 4:54 AM, Quentin Lampin >> wrote: >> > Hi, >> > Being fairly new to Python, I'm trying to figure out the best way to use >> > the >> > exec statement and I must admit that I am a bit lost. >>

Re: website feedback to where?

2009-09-02 Thread Aahz
In article , rogerdpack wrote: > >on this page > >http://docs.python.org/3.1/tutorial/introduction.html > >some of the "text" examples are [incorrectly] color formatted. > >I assume this a bug reportable to bugs.python.org? Actually, for doc bugs you should follow the instructions in the docs, s

Re: exec globals and locals

2009-09-02 Thread Quentin Lampin
2009/9/2 Chris Rebert > On Wed, Sep 2, 2009 at 4:54 AM, Quentin Lampin > wrote: > > Hi, > > Being fairly new to Python, I'm trying to figure out the best way to use > the > > exec statement and I must admit that I am a bit lost. > > > > Consider this case: > > exec "print 'a'" in {},{} [exp.1]

Re: exec globals and locals

2009-09-02 Thread Chris Rebert
On Wed, Sep 2, 2009 at 4:54 AM, Quentin Lampin wrote: > Hi, > Being fairly new to Python, I'm trying to figure out the best way to use the > exec statement and I must admit that I am a bit lost. > > Consider this case: > exec "print 'a'" in {},{}   [exp.1] > It means  that I'm (kindly) asking the i

Re: Why does this group have so much spam?

2009-09-02 Thread David
Il 02 Sep 2009 00:17:05 GMT, Steven D'Aprano ha scritto: > This can be done already, without the need for an email tax. ISPs could > easily detect spammers, if they cared to. > > There are a few things that can already be done to cut the spam problem > to manageable size: > > (1) Why aren't IS

Re: Why does this group have so much spam?

2009-09-02 Thread Grant Edwards
On 2009-09-02, Emile van Sebille wrote: > On 9/2/2009 7:07 AM Unknown said... >> A spam/malware merchange who can't afford/arrange other >> internet access? How is net access on the critical path? > > Mailbots (a significant source of spam IMHO) thrive on net access -- for > them, is there anyth

Re: An iteration idiom (Was: Re: [Guppy-pe-list] loading files containing multiple dumps)

2009-09-02 Thread Raymond Hettinger
> I dont know guppy, > but if h.load(f) raises StopIteration upon eof, as seems implied by your > proposal, then something like the following would work. > > sets.extend(h.load(f) for _ in xrange(1e9)) Sounds like hpy has a weird API. Either it should be an iterator supporting __iter__() and nex

Re: Simple addition to random module - Student's t

2009-09-02 Thread Thomas Philips
On Sep 2, 2:37 pm, Mark Dickinson wrote: > On Sep 2, 6:15 pm, Thomas Philips wrote: > > > I mis-spoke - the variance is infinite when df=2 (the variance is df/ > > (df-2), > > Yes:  the variance is infinite both for df=2 and df=1, and Student's t > with df=1 doesn't even have an expectation.  I d

Re: IMGCrush (New Python image optimizing tool)

2009-09-02 Thread kiithsa...@gmail.com
On Sep 2, 8:59 pm, "kiithsa...@gmail.com" wrote: > Hello people, > > I started to work on a small Python script to simplify mass conversion > of images for a website I was working on. > I eventually got interested in the script more than the site istelf, > and it got a lot bigger, so I released it

Re: Why does this group have so much spam?

2009-09-02 Thread Emile van Sebille
On 9/2/2009 7:07 AM Unknown said... A spam/malware merchange who can't afford/arrange other internet access? How is net access on the critical path? Mailbots (a significant source of spam IMHO) thrive on net access -- for them, is there anything _more_ critical? Emile -- http://mail.pyth

Re: notes

2009-09-02 Thread kiithsa...@gmail.com
On Sep 2, 9:27 pm, "kiithsa...@gmail.com" wrote: > Requires ImageMagick and Python (coded in python 2.x, I'm running 2.6 > but it might run on older python as well) Sorry, got confused by Google Groups interface and posted a new topic instead of just replying -- http://mail.python.org/mailman/li

Re: Why does this group have so much spam?

2009-09-02 Thread r
On Sep 2, 4:22 am, MRAB wrote: > The preferred option these days is to slow down net access of the > offenders, not cut them off completely. I'm not sure how many ISPs > actually do that yet. That seems to be the case with ISP and "good" users also in the form of quotas ;-) -- http://mail.pytho

notes

2009-09-02 Thread kiithsa...@gmail.com
Requires ImageMagick and Python (coded in python 2.x, I'm running 2.6 but it might run on older python as well) -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this group have so much spam?

2009-09-02 Thread r
On Sep 2, 12:33 pm, Steven D'Aprano wrote: (snip) > I learned one thing though. System Restore sounds like a good idea, but > in my experience it's only good for restoring malware when you reboot. System restore is a joke! and a complete waste of HD space even if you have TB's to spare! Actuall

Re: Simple addition to random module - Student's t

2009-09-02 Thread Raymond Hettinger
> To get this into core Python, you'd usually submit a feature request > athttp://bugs.python.org. If you do submit a patch, please assign it to me. I've been the primary maintainer for that module for several years. Raymond Hettinger -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this group have so much spam?

2009-09-02 Thread Terry Reedy
Steven D'Aprano wrote: On Wed, 02 Sep 2009 02:16:27 -0400, Terry Reedy wrote: The rationale I have seen is this: if one leaves the wi-fi router open and illegal activity is conducted thru it, and there is no residual evidence on the hard drives of on-premises machines, then one may claim that

Re: Simple addition to random module - Student's t

2009-09-02 Thread Raymond Hettinger
On Sep 2, 6:51 am, Thomas Philips wrote: > While the random module allows one to generate randome numbers with a > variety of distributions, some useful distributions are omitted - the > Student's t being among them. I'm curious to hear what your use cases are. My understanding is that t-distrib

Re: Entry Level Python Jobs

2009-09-02 Thread Adam
On Sep 2, 12:52 pm, JonathanB wrote: > Any other tips? I'm probably going to come off as very old school, but give yourself a good and thorough education in data structures and algorithms. You might never be called on to actually code a quick sort, merge sort, heap sort, doubly-linked list or tr

Re: Why does this group have so much spam?

2009-09-02 Thread David
Il Wed, 02 Sep 2009 10:22:50 +0100, MRAB ha scritto: > The preferred option these days is to slow down net access of the > offenders, not cut them off completely. I'm not sure how many ISPs > actually do that yet. If they do, it doesn't look like it's working that much. D. -- http://mail.python

IMGCrush (New Python image optimizing tool)

2009-09-02 Thread kiithsa...@gmail.com
Hello people, I started to work on a small Python script to simplify mass conversion of images for a website I was working on. I eventually got interested in the script more than the site istelf, and it got a lot bigger, so I released it as an opensource project It's licensed under BSD and not ve

Re: evolution [was Re: An assessment of the Unicode standard]

2009-09-02 Thread Nigel Rantor
r wrote: I'd like to present a bug report to evolution, obviously the garbage collector is malfunctioning. I think most people think that when they read the drivel that you generate. I'm done with your threads and posts. *plonk* -- http://mail.python.org/mailman/listinfo/python-list

Re: pickle error - 'module' object has no attribute '_reconstruct'

2009-09-02 Thread Skip Montanaro
Skip Montanaro pobox.com> writes: > > Saw a new-to-me error today when trying to unpickle a moderately large > object (about 500k): > > AttributeError: 'module' object has no attribute '_reconstruct' I believe I have it figured out. Most of the pickled data consists of numpy arrays. It a

pickle error - 'module' object has no attribute '_reconstruct'

2009-09-02 Thread Skip Montanaro
Saw a new-to-me error today when trying to unpickle a moderately large object (about 500k): AttributeError: 'module' object has no attribute '_reconstruct' Google turned up nothing as far as I could tell, "_reconstruct" doesn't appear in the docs and pickletools.dis() was happy to disassembl

Re: Simple addition to random module - Student's t

2009-09-02 Thread Mark Dickinson
On Sep 2, 6:15 pm, Thomas Philips wrote: > I mis-spoke - the variance is infinite when df=2 (the variance is df/ > (df-2), Yes: the variance is infinite both for df=2 and df=1, and Student's t with df=1 doesn't even have an expectation. I don't see why this would stop you from generating meanin

Re: Entry Level Python Jobs

2009-09-02 Thread Paul Rubin
JonathanB writes: > Any other tips? Learn some more languages besides Python. Python is good to know but other languages present other ways of doing things. A skillful programmer has a variety of techniques to draw from. -- http://mail.python.org/mailman/listinfo/python-list

Re: website feedback to where?

2009-09-02 Thread Terry Reedy
rogerdpack wrote: on this page http://docs.python.org/3.1/tutorial/introduction.html some of the "text" examples are [incorrectly] color formatted. I did not see any problems with my browser (FF3.5), so please be more specific. I assume this a bug reportable to bugs.python.org? Yes, thi

Re: Python on the Web

2009-09-02 Thread Ed Singleton
On Aug 26, 4:17 am, alex23 wrote: > Frameworks created for the sake of creating a framework, as opposed to > those written to meet a defined need, tend to be the worst examples of > masturbatory coding. Indeed, but masturbation is perfectly healthy and acceptable, and we all do it every now and t

Re: Problem w/ mysqldump

2009-09-02 Thread Rami Chowdhury
I tried running the mysqldump command from the python prompt I think you were being asked to try running it from the command prompt (cmd.exe) -- it won't work from the Python prompt, of course. On Wed, 02 Sep 2009 10:50:55 -0700, Victor Subervi wrote: I am running this on Windoze. I do

Python-URL! - weekly Python news and links (Sep 2)

2009-09-02 Thread Gabriel Genellina
QOTW: "I like how being very friendly means calling people after a guy who tried to blow up the English Parliament." - Carl Banks http://groups.google.com/group/comp.lang.python/browse_thread/thread/7a190c24d8025bb4 unichr/ord cannot handle characters outside the BMP in a narrow build:

Re: Issue with writelines

2009-09-02 Thread S.Selvam
On Wed, Sep 2, 2009 at 6:50 PM, LeeRisq wrote: > I've written this program that has been working fine until today. > Can't work out why it stopped working. The program pulls a list from > an xls file, inserts each item from the list into a repeating string, > that then concatenates the repeating

Re: Simple addition to random module - Student's t

2009-09-02 Thread Robert Kern
On 2009-09-02 11:28 AM, Mark Dickinson wrote: On Sep 2, 2:51 pm, Thomas Philips wrote: def student_t(df): # df is the number of degrees of freedom if df< 2 or int(df) != df: raise ValueError, 'student_tvariate: df must be a integer> 1' By the way, why do you exclude th

Re: Problem w/ mysqldump

2009-09-02 Thread Victor Subervi
I am running this on Windoze. I do not use the mysql db without python. I'm just building something for a client. I tried running the mysqldump command from the python prompt. Didn't know I could do that :) It tells me "mysqldump is not defined" :( V On Wed, Sep 2, 2009 at 11:48 AM, Nitebirdz wrot

Re: Entry Level Python Jobs

2009-09-02 Thread Tim Wintle
On Wed, 2009-09-02 at 08:31 -0700, JonathanB wrote: > I am a self-taught Python programmer with a liberal arts degree > (Cross-cultural studies). I have been programming for several years > now and would like to get a job as a python programmer. Unfortunately > most of the job posts I have seen are

Re: evolution [was Re: An assessment of the Unicode standard]

2009-09-02 Thread r
On Sep 2, 4:41 am, Steven D'Aprano wrote: (snip) > > No evolution awards those that benefit evolution. You make it seem as > > evolution is some loving mother hen, quite the contrary! Evolution is > > selfish, greedy, and sometimes evil. And it will endure all of us... > > > remember the old clich

Re: Why does this group have so much spam?

2009-09-02 Thread Steven D'Aprano
On Wed, 02 Sep 2009 06:20:39 -0700, Emile van Sebille wrote: > On 9/1/2009 9:22 PM r said... >> On Sep 1, 10:16 pm, Steven D'Aprano >>> Took me two weeks of elapsed time and around 30 hours of effort to >>> remove those suckers from the machine. Now I run Linux, behind two >>> firewalls. >> >> Ta

ctypes WNetGetUniversalNameW

2009-09-02 Thread Gustavo
Hello, I'm trying to call WNetGetUniversalNameW via the ctypes module but I'm only causing the interpreter to crash. Unfortunately I don't have much experience with the ctypes module and I'm still trying to figure it out. I've searched for a solution to no avail. My confusion is centered around th

Re: Simple addition to random module - Student's t

2009-09-02 Thread Thomas Philips
On Sep 2, 1:03 pm, Thomas Philips wrote: > On Sep 2, 12:28 pm, Mark Dickinson wrote: > > > On Sep 2, 2:51 pm, Thomas Philips wrote: > > > > def student_t(df):         # df is the number of degrees of freedom > > >     if df < 2  or int(df) != df: > > >        raise ValueError, 'student_tvariate:

Re: Entry Level Python Jobs

2009-09-02 Thread Adam
On Sep 2, 11:31 am, JonathanB wrote: > For the hiring managers, if the job post said > "CS Major" in the requirements, would you consider a liberal arts > major at all? I got my English Writing degree in 1990, and I have been a software engineer ever since. Landing the first job was very difficul

website feedback to where?

2009-09-02 Thread rogerdpack
Greetings. A little new to python here, but... on this page http://docs.python.org/3.1/tutorial/introduction.html some of the "text" examples are [incorrectly] color formatted. I assume this a bug reportable to bugs.python.org? Thanks! -r -- http://mail.python.org/mailman/listinfo/python-list

Re: pickling question

2009-09-02 Thread exarkun
On 02:06 pm, gary...@me.com wrote: When you define a class in a script, and then pickle instances of that class in the same script and store them to disk, you can't load that pickle in another script. At least not the straightforward way [pickle.load(file('somefile.pickle'))]. If you try it, yo

Re: Entry Level Python Jobs

2009-09-02 Thread Aahz
In article , JonathanB wrote: > >I am a self-taught Python programmer with a liberal arts degree (Cross- >cultural studies). I have been programming for several years now and >would like to get a job as a python programmer. Unfortunately most of >the job posts I have seen are for CS Majors or peo

Re: Simple addition to random module - Student's t

2009-09-02 Thread Thomas Philips
On Sep 2, 12:28 pm, Mark Dickinson wrote: > On Sep 2, 2:51 pm, Thomas Philips wrote: > > > def student_t(df):         # df is the number of degrees of freedom > >     if df < 2  or int(df) != df: > >        raise ValueError, 'student_tvariate: df must be a integer > 1' > > By the way, why do you

Re: Entry Level Python Jobs

2009-09-02 Thread JonathanB
Ok, so what I'm hearing is "Get a code portfolio together and watch the job board on python.org." Thanks for the advice! I've been watching the python job board 3-4 times a week and I've been working my way through the Project Euler problems in my free time. I also have a trade generator that I wr

Re: Entry Level Python Jobs

2009-09-02 Thread Ethan Furman
Philip Semanchuk wrote: On Sep 2, 2009, at 11:48 AM, r wrote: On Sep 2, 10:31 am, JonathanB wrote: I am a self-taught Python programmer with a liberal arts degree (Cross- cultural studies). I have been programming for several years now and would like to get a job as a python programmer. Un

Re: Entry Level Python Jobs

2009-09-02 Thread Paul Rubin
JonathanB writes: > I am a self-taught Python programmer with a liberal arts degree (Cross- > cultural studies) > Is there a place I can look for job posts for entry level positions > requiring no experience? For the hiring managers, if the job post said > "CS Major" in the requirements, would

  1   2   >