Re: Is behavior of += intentional for int?

2009-09-02 Thread Tim Roberts
Steven D'Aprano wrote: >On Sat, 29 Aug 2009 11:11:43 -0700, zaur wrote: > >> I thought that int as object will stay the same object after += but with >> another integer value. My intuition said me that int object which >> represent integer value should behave this way. > >If it did, then you woul

Re: Python3: hex() on arbitrary classes

2009-09-02 Thread Mark Dickinson
On Sep 1, 5:31 pm, Philipp Hagemeister wrote: > Mark Dickinson wrote: > > (...) If you want to be > > able to interpret instances of X as integers in the various Python > > contexts that expect integers (e.g., hex(), but also things like list > > indexing), you should implement the __index__ metho

BeautifulSoup

2009-09-02 Thread elsa
Hi all, if I have some HTML that looks like this: http://BioCyc.org/ECOLI/NEW-IMAGE? type=GENE-IN-CHROM-BROWSER&object=EG12309" onmouseover="return overlib('Gene: yjtD
Product: predicted rRNA methyltransferase, subunit of predicted rRNA methyltransferase
Intergenic distanc

Re: BeautifulSoup

>>> from BeautifulSoup import BeautifulSoup >>> soup = BeautifulSoup("""http://BioCyc.org/ECOLI/NEW-IMAGE? ... type=GENE-IN-CHROM-BROWSER&object=EG12309" onmouseover="return ... overlib('Gene: yjtDProduct: predicted rRNA methyltransferase, subunit of predicted rRNA ... methyltransferaseIntergenic d

Re: Daemon process

On Wednesday 02 September 2009 05:57:02 Shan wrote: > I have XML RPC Server listening on a port. This XML RPC Server works > fine when i run it as foreground process. All the clients are able to > connect with the XML RPC Server. But when i run it as daemon(not using > &. I am doing it in python wa

Re: Why does this group have so much spam?

On Wed, 02 Sep 2009 02:16:27 -0400, Terry Reedy wrote: > Steven D'Aprano wrote: > >>> I have read more that one person advocating leaving one's wi-fi base >>> open for anyone to use as the 'neighborly' thing to do. >> >> That's a different kettle of fish. You don't do anybody any harm by >> payi

Re: map

On Aug 31, 11:44 pm, Hendrik van Rooyen wrote: > On Monday 31 August 2009 11:31:34 Piet van Oostrum wrote: > > > But ultimately it is also very much a matter of taste, preference and > > habit. > > This is true, but there is another reason that I posted - I have noticed that > there seems to be a

Re: An assessment of the Unicode standard

On Wednesday 02 September 2009 08:52:55 Gabriel Genellina wrote: > En Tue, 01 Sep 2009 19:49:57 -0300, r escribió: > > On Sep 1, 1:52 pm, Hyuga wrote: > > (snip) > > > >> I'd say don't feel the troll, but too late for that I guess.   > > > > The only trolls in this thread are you and the others w

AttributeError: 'NoneType' object has no attribute 'get_text'

On Wed, Sep 2, 2009 at 10:11 AM, Raji Seetharaman wrote: > > Thanks MRAB. Now it works. > Raji.S -- http://mail.python.org/mailman/listinfo/python-list

Re: BeautifulSoup

elsa wrote: > if I have some HTML that looks like this: > > http://BioCyc.org/ECOLI/NEW-IMAGE? > type=GENE-IN-CHROM-BROWSER&object=EG12309" onmouseover="return > overlib('Gene: yjtD
Product: b> predicted rRNA methyltransferase, subunit of predicted rRNA > methyltransferase

Re: Is behavior of += intentional for int?

> Carl Banks (CB) wrote: >CB> On Sep 1, 10:40 am, Piet van Oostrum wrote: >>> >>> Numbers are immutable by nature (math). The number 3.14 remains 3.14 >>> whatever you try to do with it. What you call an immutable number is in >>> fact a container that contains a number. >CB> I wouldn't ag

Re: Problem with multiprocessing

tleeuwenb...@gmail.com wrote: > I have a problem using multiprocessing in a simple way. I created a > file, testmp.py, with the following contents: > > --- > import multiprocessing as mp > > p = mp.Pool(5) > > def f(x): > return x * x > > print

Re: Problem with multiprocessing

On 09/02/2009 04:51 AM, Peter Otten wrote: tleeuwenb...@gmail.com wrote: I have a problem using multiprocessing in a simple way. I created a file, testmp.py, with the following contents: --- import multiprocessing as mp p = mp.Pool(5) def f(x):

Re: Why does this group have so much spam?

Steven D'Aprano wrote: On Tue, 01 Sep 2009 20:48:19 +0200, David wrote: Il Tue, 1 Sep 2009 11:50:14 +0200, Andre Engels ha scritto: What about mailing lists? There exist well-functioning mailing lists with thousands of subscribers. Being a posting member of those will significantly increase

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

This thread has intrigued me enough to bite the bullet and look up "r"'s posts. Oh my! They say a little learning is a dangerous thing, and this is a great example -- the only think bigger than r's ignorance and naivety on these topics is his confidence that he alone understands The Truth. Oh w

Re: An assessment of the Unicode standard

En Wed, 02 Sep 2009 04:58:43 -0300, Hendrik van Rooyen escribió: On Wednesday 02 September 2009 08:52:55 Gabriel Genellina wrote: Bueno, voy a escribir en el segundo lenguaje más hablado en el mundo (español), después del mandarín (con más de 1000 millones de personas). What do you call so

Re: using queue

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. Just checking here to see if I'm on the right path. The code I have currently compiles a bunch of

Problem w/ mysqldump

Hi: I have the following python code: import os os.system("mysqldump -u root -pPASSWORD --opt spreadsheets > dump.sql") This nicely creates the file...but the file is empty! The database exists and has lots of data, I double-checked it. If there is nothing wrong with my code, is there some way to d

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

Steven D'Aprano wrote: I'd like to add the following: It is an intriguing human trade to attribute emotions and reasons to things that have none. Intriguing because I haven't observed yet that it provides an advantage, but it happens so often that I can't exclude it either. I find that evol

Re: Why does this group have so much spam?

Am 01.09.2009 22:10, schrieb David: Il Mon, 31 Aug 2009 20:06:54 -0700 (PDT), r ha scritto: ... The system is definitely flawed. I am no internet expert so i don't really know what we could do to fix it. I do fear goverment or corporations taking over of the internet and robbing use of our fre

Re: Can't set attribute?!

dolgion ch: >good to know about this __slots__ thing, i'll keep it in mind< What you have to keep in mind is that it's better to not use __slots__ unless you really need to. Generally you need it not for the purposes a person coming from a static language is tempted to use it for. It's mostly usef

Re: Problem w/ mysqldump

On Wed, Sep 02, 2009 at 06:43:12AM -0400, Victor Subervi wrote: > Hi: > I have the following python code: > import os > os.system("mysqldump -u root -pPASSWORD --opt spreadsheets > dump.sql") > This nicely creates the file...but the file is empty! The database exists > and has lots of data, I doubl

exec globals and locals

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 interpreter to execute the code string "print 'a'" with empty globa

Re: Is it a bug?

Oops, missed out that... thanks On Sun, Aug 30, 2009 at 2:25 PM, Jan Kaliszewski wrote: > 30-08-2009 o 06:10:46 Abhishek Mishra wrote: > >> The single quote \' is the culprit. >> When you say  words = ["Hi", "Whats up", "Bye"] and try print words, >> you get this - >> ['Hi', 'Whats up', 'Bye'] >>

Re: Is behavior of += intentional for int?

On Sep 2, 12:07 am, Tim Roberts wrote: > Steven D'Aprano wrote: > >On Sat, 29 Aug 2009 11:11:43 -0700, zaur wrote: > > >> I thought that int as object will stay the same object after += but with > >> another integer value. My intuition said me that int object which > >> represent integer value sh

Re: Problem w/ mysqldump

Obviously I'm sure. It created the file. But the file was blank. How can I do a mysqldump in mysql itself? V On Wed, Sep 2, 2009 at 8:13 AM, Nitebirdz wrote: > On Wed, Sep 02, 2009 at 06:43:12AM -0400, Victor Subervi wrote: > > Hi: > > I have the following python code: > > import os > > os.syst

Re: Why does this group have so much spam?

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. Takes me less than one hour to rebuild my system If that's your job (as it's som

Issue with writelines

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 string and writes it to a text file. It has worked fine u

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

Sverker Nilsson wrote: Sverker Nilsson wrote: It reads one Stat object at a time and wants to report something when there is no more to be read from the file. Hmm, am I right in thinking the above can more nicely be written as: >>> from guppy import hpy >>> h = hpy() >>> f = open(r'your.hp

Simple addition to random module - Student's t

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. This distribution is easily derived from the normal distribution and the chi-squared distribution (which in turn is a special cas

Re: win32ui DLL Load Failed

On Sep 1, 12:14 am, Gregor Horvath wrote: > Am Mon, 31 Aug 2009 12:43:04 -0700 (PDT) > schriebMikeC: > > > I have a python executable that's failing to load on a user's machine > > running Windows XP. My developer machine is also running Windows XP. I > > have determined that it is failing when it

Re: Why does this group have so much spam?

On 2009-09-02, Terry Reedy wrote: > Steven D'Aprano wrote: > >>> I have read more that one person advocating >>> leaving one's wi-fi base open for anyone to use as the 'neighborly' >>> thing to do. >> >> That's a different kettle of fish. You don't do anybody any >> harm by paying for Internet ac

Re: Why does this group have so much spam?

On 2009-09-02, Steven D'Aprano wrote: > On Wed, 02 Sep 2009 02:16:27 -0400, Terry Reedy wrote: > >> Steven D'Aprano wrote: >> I have read more that one person advocating leaving one's wi-fi base open for anyone to use as the 'neighborly' thing to do. >>> >>> That's a different kettle o

Re: An assessment of the Unicode standard

Gabriel Genellina wrote: > Looks like we all will have to learn mandarin! A nice language but with a > high entrance barrier for western people. It will pay off in the long run. Problem for me: it seems most people in Toronto speak Cantonese. That's just something I'll have to deal with. Wrot

Re: Problem w/ mysqldump

On 9/2/2009 3:43 AM Victor Subervi said... Hi: I have the following python code: import os os.system("mysqldump -u root -pPASSWORD --opt spreadsheets > dump.sql") First, test this at the system command line -- you'll likely get an empty file there as well, so calling from within python simply

pickling question

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, you get an AttributeError during the

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

On Sep 2, 2:51 pm, 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. This distribution is easily derived from > the normal distribution and the chi-sq

Entry Level Python Jobs

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 people with experience. Is there a place

Re: Problem w/ mysqldump

On Wed, Sep 02, 2009 at 08:43:22AM -0400, Victor Subervi wrote: > > Obviously I'm sure. It created the file. But the file was blank. How can I > do a mysqldump in mysql itself? > As I said, I only got a blank file when the actual command itself failed. How do you dump the MySQL database itself w

Re: Problem w/ mysqldump

Not sure how to test it at the command line as you recommend; however, I most certainly did supply the db name. I most certainly did check the docs. I also looked at code I had previously written that worked. So I'm stumped! Is there any way to print it out to screen or (better yet) print to screen

Re: Entry Level Python Jobs

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. Unfortunately most of > the job posts I have seen are for CS Major

Re: pickling question

On Sep 2, 7:06 am, Gary Robinson 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 yo

Re: Entry Level Python Jobs

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. Unfortunately most of the j

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

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 the possibility df=1 here? -- Mark -- http://m

Re: Entry Level Python Jobs

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

Re: Entry Level Python Jobs

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

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: Simple addition to random module - Student's t

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

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: pickling question

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

website feedback to where?

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: Entry Level Python Jobs

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

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

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:

ctypes WNetGetUniversalNameW

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: Why does this group have so much spam?

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

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

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: Entry Level Python Jobs

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: Problem w/ mysqldump

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: Simple addition to random module - Student's t

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: Issue with writelines

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

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

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: Problem w/ mysqldump

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

Re: Python on the Web

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: website feedback to where?

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: Entry Level Python Jobs

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: Simple addition to random module - Student's t

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

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

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: pickle error - 'module' object has no attribute '_reconstruct'

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

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

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

IMGCrush (New Python image optimizing tool)

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: Why does this group have so much spam?

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

Re: Entry Level Python Jobs

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: Simple addition to random module - Student's t

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: Why does this group have so much spam?

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

> 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?

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

notes

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?

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

Re: notes

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?

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: IMGCrush (New Python image optimizing tool)

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: Simple addition to random module - Student's t

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: An iteration idiom (Was: Re: [Guppy-pe-list] loading files containing multiple dumps)

> 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: Why does this group have so much spam?

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: Why does this group have so much spam?

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: exec globals and locals

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: exec globals and locals

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: website feedback to where?

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

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: exec globals and locals

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: Simple addition to random module - Student's t

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: website feedback to where?

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: Problem w/ mysqldump

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: pickling question

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: website feedback to where?

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: website feedback to where?

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?

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

Creating slice notation from string

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: Creating slice notation from string

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

Re: Creating slice notation from string

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

  1   2   >