Re: Xah Lee network abuse

2006-06-11 Thread Mike Schilling
"Erik Max Francis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Mike Schilling wrote: > >> If I were to write, say, that Tony Blair's tax policy will lead to higher >> deficits, I could be convicted of libel? Even if that's true,

Re: Searching and manipulating lists of tuples

2006-06-12 Thread Mike Kent
MTD wrote: > Hello, > > I'm wondering if there's a quick way of resolving this problem. > > In a program, I have a list of tuples of form (str,int), where int is a > count of how often str occurs ... > So clearly that doesn't work... any ideas? Yes, use the proper tool for the job. Tuples are

Re: Python 411.

2006-06-13 Thread Mike T
What exactly is 411 in this context? A reference to higher education perhaps? Or perhaps part of the American constitution? What exactly? Also for that matter what is 101? Cheers, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a better way of accessing functions in a module?

2006-06-13 Thread Mike Kent
Yes, you can go that route. But since it appears that what you are doing is unit testing related, and you are interested in aranging for all of your unit test cases to be run automatically, I'd suggest using the unittest module. -- http://mail.python.org/mailman/listinfo/python-list

Redirecting Print Streams

2006-06-13 Thread Mike Driscoll
27;Description']     zipPart(PackageName, config['ZipFile'])    regPart(PackageName, config['RegFile'], config['RegType'])    SetValueEx(key, PackageName, 0, REG_EXPAND_SZ, iniSerial)    CloseKey(key)Thanks a lot! Mike -- http://mail.python.org/mailman/listinfo/python-list

Legitimate use of the "is" comparison operator?

2006-06-17 Thread Mike Duffy
I just recently realized that the comparison operator "is" actually works for comparing numeric values. Now, I know that its intended use is for testing object identity, but I have used it for a few other things, such as type checking, and I was just wondering whether or not it is considered bad pr

Re: Legitimate use of the "is" comparison operator?

2006-06-17 Thread Mike Duffy
Fredrik Lundh wrote: > > except that it doesn't work. > > writing broken code is never a good practice. > With all due respect, for some reason it seems to work on my machine. Because I certainly agree with you about writing broken code. Python 2.4.2 (#1, Jan 17 2006, 16:52:02) [GCC 4.0.0 20041026

Re: Legitimate use of the "is" comparison operator?

2006-06-17 Thread Mike Duffy
Gary Herron wrote: > > >>> 100 is (99+1) > False > > >>> 2 is (1+1) > True > > >>> 100 is 100 > True > > This is highly implementation dependent. The current (C) implementation > of Python has a cache for small integers, so the attempt to compare > values with "is" works for some small integers, an

Re: unittest behaving oddly

2006-06-20 Thread Mike Kent
David Vincent wrote: > > import unittest > > > > class IntegerArithmenticTestCase(unittest.TestCase): > > def testAdd(self): ## test method names begin 'test*' > > assertEquals((1 + 2), 3) > > assertEquals(0 + 1, 1) assertEquals is a member function, inherited from unittest.T

Re: Specifing arguments type for a function

2006-06-21 Thread Mike Duffy
Paolo Pantaleo wrote: > I have a function > > def f(the_arg): > ... > > and I want to state that the_arg must be only of a certain type > (actually a list). Is there a way to do that? I wrote a cool function decorator just for that purpose. It's posted on the Python Decorator Library at: http://w

'r' vs 'rb' in csv (was Re: Python SHA-1 as a method for unique file identification ? [help!])

2006-06-26 Thread Mike Orr
was the odd bit of sense? I know you end console input by typing ctrl-Z, but I thought it was just like Unix ctrl-D which ends the input but doesn't actually insert that character. -- Mike Orr <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Python UTF-8 and codecs

2006-06-27 Thread Mike Currie
'utf-8', errors='strict') and that doesn't work and I've also try wrapping the file in an utf8_writer using codecs.lookup('utf8') Any clues? Thanks Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Python UTF-8 and codecs

2006-06-27 Thread Mike Currie
files. Finally right before importing them into a database convert them back to new line and tab's thus preserving the field values. Will python not handle the control characters correctly? "Serge Orlov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On

Re: Python UTF-8 and codecs

2006-06-27 Thread Mike Currie
write(filteredLine) Traceback (most recent call last): File "", line 1, in ? File "C:\Python24\lib\codecs.py", line 501, in write return self.writer.write(data) File "C:\Python24\lib\codecs.py", line 178, in write data, consumed = self.encode(object, self.errors)

Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread Mike Currie
Can anyone explain why I'm getting an ascii encoding error when I'm trying to write out using a UTF-8 encoder? Thanks Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> filterMap = {} >>> for i

Re: Python UTF-8 and codecs

2006-06-27 Thread Mike Currie
Well, not really. It doesn't affect the result. I still get the error message. Did you get a different result? "Serge Orlov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 6/27/06, Mike Currie <[EMAIL PROTECTED]> wrote: >> Okay, >

Re: Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread Mike Currie
27;ve been left with the implementation however. "John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 28/06/2006 7:46 AM, Mike Currie wrote: >> Can anyone explain why I'm getting an ascii encoding error when I'm >> trying to

? on scipy.fftpack

2006-06-28 Thread Mike Duffy
I've been debugging a simulation I wrote a while ago, and it seems that the problem is in the fft module itself. I'm trying a simple test by just feeding the function a basic real gaussian. Obviously, I should get back the same real gaussian, but what I get is not even close. Can anyone help me? Th

Re: ? on scipy.fftpack

2006-06-28 Thread Mike Duffy
Robert Kern wrote: > You will probably want to ask scipy questions on scipy-user. There aren't many > scipy people here. > >http://www.scipy.org/Mailing_Lists > > I haven't run your code, yet, but one of the things you are running into is > the > FFT packing convention for FFTs on real functi

Re: ? on scipy.fftpack

2006-06-28 Thread Mike Duffy
Oops, sorry. I see what you mean. I was reading the docs for the regular (complex) fft function, since that was what I was initially having the bug with. I was just using the rfft to simplify things, but I guess that was ironic. Anyway, I appreciate your help and don't mean to burden you. Again, I

Re: List Manipulation

2006-07-04 Thread Mike Kent
Roman wrote: > I would appreciate it if somebody could tell me where I went wrong in > the following snipet: > > When I run I get no result > > cnt = 0 > p=[] > reader = csv.reader(file("f:\webserver\inp.txt"), dialect="excel", > quotechar="'", delimiter='\t') > for line in

Re: List Manipulation

2006-07-04 Thread Mike Kent
Roman wrote: > Thanks for your help > > My intention is to create matrix based on parsed csv file. So, I would > like to have a list of columns (which are also lists). > > I have made the following changes and it still doesn't work. > > > cnt = 0 > p=[[], [], [], [], [], [], [], [], [], [], []] >

Re: Easier way to save result of a function?

2006-07-04 Thread Mike Kent
James Mitchelhill wrote: > Sorry for the clunky subject line - I have a feeling that not knowing > the proper terms for this is part of my problem. > > I'm trying to write a class that analyses some data. I only want it to > do as much work as necessary, so it saves method results to a > dictionary

Re: 2 problems

2006-07-07 Thread Mike Kent
[EMAIL PROTECTED] wrote: > Hello,Im using Python 2.4.2 and I'm starting a few very basic > programs,but theres two problems I've not found the answers for. > My first problem is I need code that will count the number of letters > in a string and return that number to a variable. >>> s = "hello" >

Egg problem (~/.python-eggs)

2006-08-30 Thread Mike Orr
akedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/root/.python-eggs' Can I make it use a different eggs directory? Any other idea how to install a program using eggs on a server? BTW, Python is Gentoo's /usr/bin/python 2.4.2. The eggs are installed in /usr/local/lib/python2.4 to prevent them from mixing with Gentoo packages in /usr/lib. --Mike <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: Egg problem (~/.python-eggs)

2006-08-30 Thread Mike Orr
Mike Orr wrote: > I'm trying to install a program that uses Durus on a server. It > appears that if a Python program uses eggs, it creates a > ~/.python-eggs/ directory, so the home directory must be writeable. > This conflicts with server environments where you want to ru

Re: Python newbie with a problem writing files

2006-09-03 Thread Mike Kent
> feed_list = open("feed_listing.conf","r") What could it be about the above line that means "Open this file for READ ONLY"? -- http://mail.python.org/mailman/listinfo/python-list

What are super()'s semantics?

2006-09-04 Thread Mike Krell
work? BTW, the official docs are even worse in this regard. AFAICT, they essentially say that super() returns a superclass with no discussion of diamond inheritance or any hint of how the semantics of super(B, self).met() would be any different than those of A.met(self). This seems like very important functionality to be documented in the official docs so poorly. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: What are super()'s semantics?

2006-09-04 Thread Mike Krell
__mro__ attribute can be referenced only on classes. Somehow, this confused me into thinking that the operative MRO for each call to super() would be dictated by the class where the call was being made rather than by the single instance of D as specified by the second parameter. Mike -- http:

Re: What are super()'s semantics?

2006-09-04 Thread Mike Krell
x's example, an instance of the D class would have an MRO of essentially (D, C, B, A), and yet not realize that this was strangly similar to the output of the example. D'oh! Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-11 Thread Mike Owens
I coworker pointed me to this thread. >>>and why it isn't SQL. >> It isn't SQL simply because SQL won't let you insert text >> into a numeric field. > Yup, I have to agree that's pretty crappy. (Makes mental note to limit > use of SQLite). Ever heard of check constraints? That's another feature

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-11 Thread Mike Owens
On 9/11/06, Marty <[EMAIL PROTECTED]> wrote: > In all seriousness, the information you present here is great, and > much appreciated. Your sarcastic, condescending tone kind of gets in > the way of the message, though. Sarcastic, perhaps. Condesceding, I think not. It is ridiculous that people ca

Re: Is it just me, or is Sqlite3 goofy?

2006-09-11 Thread Mike Owens
On 9/11/06, Steve Holden <[EMAIL PROTECTED]> wrote: > Sure. But if you go back to the start of the thread you'll remember the > OP was originally complaining that SQLite was being promoted in the > Python docs as SQL compliant. Define "SQL compliant." That's about as technically precise as saying

Re: Is it just me, or is Sqlite3 goofy?

2006-09-11 Thread Mike Owens
On 11 Sep 2006 18:23:50 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Can you run your car on diesel fuel? > > Why not? > > Because your car's specification says to use gasoline? > > If your car has been designed to run on diesel, you shouldn't > be saying it has gasoline engine. Duh. No

Re: Is it just me, or is Sqlite3 goofy?

2006-09-11 Thread Mike Owens
ple of SQLite listening and responding to constructive feedback. When I first started using SQLite, it didn't have an autoincrement primary key. I made a case for it, asked nicely, and it was done in three days. Most people will agree that this approach tends to work better in most projec

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-12 Thread Mike Owens
On 12 Sep 2006 00:15:41 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Just to be fair... > > You do hear many people claiming exactly that, and the primary > complaint is often exactly the same one that's being levelled against > sqlite here (it's incredibly lax with types and does sometim

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Mike Owens
On 11 Sep 2006 21:35:28 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Mike Owens wrote: > > On 11 Sep 2006 18:23:50 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > Can you run your car on diesel fuel? > > > > > > Why not

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Mike Owens
On 11 Sep 2006 23:29:28 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > But it was stated in the sqlite docs that ALL SQL databases > use static types implying that sqlite will be incompatible > with any "heavy" database should the need arise to migrate > upwards. The issue is not that there

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Mike Owens
On 12 Sep 2006 08:29:34 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > > > But no one appreciates my finding those faults. > > > > No one appreciates the tone in which you report these alleged faults, > > Your tone is not so great either. And what would you expect after someone who h

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Mike Owens
On 12 Sep 2006 09:31:54 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > To use your specious analogy, it represents another way of doing > > things, which you admit yourself works. That's your justification for > > calling Richard Hipp a crackpot? > > What was Richard Hipp's justification

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Mike Owens
On 12 Sep 2006 10:24:00 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > So, knowing that, would you agree that > > > If switching to a larger database such as PostgreSQL or Oracle > is later necessary, the switch should be relatively easy. > > > is misleading if not outright untruthful? N

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Mike Owens
On 12 Sep 2006 10:47:22 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > So you admit that Richard Hipp's characterization of SQL was > rude. And now that we've established what you are, we're just > haggling over price. No, you've just managed to try and take the heat off of yourself. I nev

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Mike Owens
On 12 Sep 2006 10:47:22 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Why? I'm not requesting that dynamic typing be removed from > sqlite. I'm not even requesting that the slander in the sqlite docs > be removed. What I'm requesting is that these "features" of > sqlite be better presented

Re: License / Registration key enabled software

2006-09-27 Thread Mike Playle
out, because it won't help against crackers. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: License / Registration key enabled software

2006-09-28 Thread Mike Playle
are they more likely to just start it up and start working? Of course this argument really applies only to large, expensive commercial packages. I'd certainly agree that licence keys are often used inappropriately in a way which doesn't really benefit anyone, but this doesn't

Re: License / Registration key enabled software

2006-09-28 Thread Mike Playle
On Wed, 27 Sep 2006 12:21:08 -0500, Robert Kern wrote: > Mike Playle wrote: >> For instance a customer might want to buy a license to >> use your software on up to 5 machines at once, but still >> have the software installed on every machine in the >> company. License s

Re: License / Registration key enabled software

2006-09-28 Thread Mike Playle
On Thu, 28 Sep 2006 17:36:02 +0200, Sybren Stuvel wrote: > Mike Playle enlightened us with: >> Having installed it all over the shop, how can you be sure that only 5 >> people are using it at any one time? > > Write the software in such a way that it needs a certificate o

Re: License / Registration key enabled software

2006-09-28 Thread Mike Playle
ill succeed no matter what you do, so you shouldn't worry about them. Worry instead about the people who DON'T want to use it illegitimately. Can a license key scheme help them? If so, implement it. No trickery is needed - a simple comparison will suffice. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: for: else: - any practical uses for the else clause?

2006-09-29 Thread Mike Klaas
It is > > meaningless without break. > > The else clause *is* executed when there is no data on which to iterate. > Your example even demonstrates that clearly: Yes--there is a missing "just" in that sentence. -Mike -- http://mail.python.org/mailman/listinfo/python-list

SAX2 Download

2006-11-28 Thread Mike P
Does anyone know where i can download acopy of the SAX2 module? Cheers Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: SAX2 Download

2006-11-28 Thread Mike P
Fredrik Lundh wrote: > Mike P wrote: > > > Does anyone know where i can download acopy of the SAX2 module? > > the built-in xml.sax module implements the SAX 2 protocol, if that's > what you're looking for: > > http://docs.python.org/lib/module-xml.sax

win32 com problem

2006-12-05 Thread Mike P
I've got a slight problem when running an excel macro from python using the win32.com.client module, in that it says it can't load the DLL file (it doesn't say which one) and gives me the following error message Traceback (most recent call last): File "", line 93, in ? File ">", line 14, in R

Re: win32 com problem

2006-12-05 Thread Mike P
te xl.Application.Run("CTP.xla!sheet1.CTP") I'm running via SPSS V15 which has a python plugin, i was previousky running in V14 using the exact same code with no problems? Thanks again Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: win32 com problem

2006-12-05 Thread Mike P
No Problem, Thanks for your help so far, i've sent this problem off to SPSS as it seems it doesn't work on a work colleagues machine either Thanks for your time though Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterating over several lists at once

2006-12-13 Thread Mike Erickson
>>> a [1, 2, 3, 4, 5, 6, 7] >>> for odd in (num for num in a if num % 2 == 1): ... print odd ... 1 3 5 7 there is also continue, which I think is a good compromise: >>> for num in a: ... if num % 2 == 0: ... continue ... print num ... 1 3 5 7

Elliptic Curve Library

2006-12-23 Thread Mike Tammerman
Hi, I need an elliptic curve library that can be used by python. I googled but couldn't find a one. I'll appreciate, if you could show me. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Elliptic Curve Library

2006-12-23 Thread Mike Tammerman
I will try to implement an ID-Based Cryptography. I also need bilinear pairing operations. Mike vasudevram wrote: > Mike Tammerman wrote: > > Hi, > > > > I need an elliptic curve library that can be used by python. I googled > > but couldn't find a one. I

Summarizing data by week

2007-01-09 Thread Mike Orr
the Thursday of that week, and start from there. Then all my conversions would be to iso_week rather than from iso_week. Is there a better way to do this? --Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: make a class instance from a string ?

2006-02-24 Thread Mike Woodhouse
Is there anything particularly bad with obj = eval(classname + "()") ? It appears to work, but I'm a noobie so I could be missing something nasty, in which any edication would be gratefully received. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Can optparse do dependencies?

2006-02-26 Thread Mike Erickson
ot;you must use p to use q") The meaning of -b doesn't change when it follows -a, but if you want that, it is doable by extending optparse. There is even an example in the very good "extending optik"[1] documentation available off the sf.net site: http://optik.sourc

Re: bytecode non-backcompatibility

2005-04-30 Thread Mike Meyer
Maurice LING <[EMAIL PROTECTED]> writes: > So if C extension API (or whatever that is really called) is stable, > the system admin can just copy all of /sw/lib/python2.3/site-packages > into /sw/lib/python2.4/site-packages and it should work. From what > you've said, it seems that this isn't possib

Re: Ron Grossi: God is not a man

2005-04-30 Thread Mike brown
Just go away from RMMGA -- http://mail.python.org/mailman/listinfo/python-list

Re: How to track down all required shared libraries?

2005-04-30 Thread Mike Rovner
a good way to track down all shared libraries required to run a Python program? Daehyok Shin To get executable requirements use ldd. When python can't load a lib at run-time usually ImportError is raised. As with other errors you can never know which libs will be dynamically required. Mike --

Re: scope acting weird

2005-05-01 Thread Mike Meyer
"Gabriel B." <[EMAIL PROTECTED]> writes: > i have the following code: > > Ui.py: > import Tkinter as Tk > import UiMainScreen > > UiMainScreen.py: > class UiMainScreen( Tk.Frame ): > > > and i get the following error: > File "UiMainScreen.py", line 1, in ? > class UiMainScreen(Tk.Fr

Re: So many things that need to be decided....

2005-05-02 Thread Mike Meyer
"Heather Stovold" <[EMAIL PROTECTED]> writes: > Wow - deciding to program in python sure requires a lot of decisions! It wasn't for me. > So far: > > I've decided on python for the programming language. > I've decided on wxpython for the GUI Hmm. I started writing CGI apps, so I didn't need

Re: So many things that need to be decided....

2005-05-03 Thread Mike Meyer
"Heather Stovold" <[EMAIL PROTECTED]> writes: >> > I've decided on DrPython for the Editor >> >> An editor for each language? Is that the kind of tower you get when >> you start using IDEs? I just kept right on using the same text editor >> I'd been using for the last 20 (now 30) years. > I ha

Re: control precision for str(obj) output?

2005-05-03 Thread Mike Meyer
Bo Peng <[EMAIL PROTECTED]> writes: > Dear list, > > I have enjoyed the convenience to output any object with str(obj) for > a while. However, I get long output for things like str([0.0002]) in > my output (which bothers my users more than me though). I also do not > understand why the following i

Python FAQ entries (Was: control precision for str(obj) output?)

2005-05-04 Thread Mike Meyer
"Dan Bishop" <[EMAIL PROTECTED]> writes: > Andrew Dalke wrote: >> Mike Meyer wrote: >> > Someone want to tell me the procedure for submitting FAQ entries, > so I >> > can do that for this? >> >> You mean more than what already exists

Re: How To Reply

2005-05-04 Thread Mike Meyer
François Pinard <[EMAIL PROTECTED]> writes: > [Peter Hansen] > >> You are forced to cut and paste if you want to get the messages in a >> digest. I doubt any mail program has been designed to know how to do >> anything smarter, > > Lars Magne Ingebrigtsen's wonderful Gnus (a much boosted, combi

Re: python and glut

2005-05-04 Thread Mike Meyer
"max(01)*" <[EMAIL PROTECTED]> writes: > $ python GLE.py > freeglut (GLE.py): OpenGL GLX extension not supported by display ':0.0' > > what's up? what's missing? The GLX extension to your X server. > i use a standard debian installation. I don't know which X debian uses, and it may have changed

Re: utf encoding error

2005-05-04 Thread Mike Thompson
Timothy Smith wrote: > hi there, this one is in relation to my py2exe saga. > > when i compile a package using py2exe i get the error msg below, if i > just run the py files it doesn't error, so i assume pysvn is trying to > use something thats not being included in the build. only i have no ide

Re: Determine ip address

2005-05-05 Thread Mike Meyer
[Format recovered from top-posting.] [EMAIL PROTECTED] writes: > codecraig ha scritto: >>how can i use python to figure the ip address of the machine which >> the python script is running on? I dont mean like 127.0.0.1but i >> want the external IP address (such as ipconfig on windows disp

Re: Sockets

2005-05-05 Thread Mike Meyer
Dan <[EMAIL PROTECTED]> writes: > I think that the best way to send the notification to this server > application is via a udp message. Alternatively, I could use tcp, but > I don't think I'll need the extra complexity for what I want to do. > (Other suggestions welcome.) upd isn't reliable. If

Re: So many things that need to be decided....

2005-05-05 Thread Mike Meyer
Nick Vargish <[EMAIL PROTECTED]> writes: > Mage <[EMAIL PROTECTED]> writes: > >> - identing with tabs > > Indenting with tabs is pretty much frowned upon in Python, as Guido > relates in PEP 8: > > http://www.python.org/peps/pep-0008.html > > I guess it doesn't matter much if you are the only pers

Re: hard memory limits

2005-05-06 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Maurice LING wrote: >> Will adding more RAM helps in this case? > > probably. more swap space might also help. or you could use a > smarter malloc package. posting more details on your platform, > toolchain, python version, and list building approac

Re: Getting number of iteration

2005-05-06 Thread Mike Meyer
Bill Mill <[EMAIL PROTECTED]> writes: > On 5/6/05, Florian Lindner <[EMAIL PROTECTED]> wrote: >> Hello, >> when I'm iterating through a list with: >> >> for x in list: >> >> how can I get the number of the current iteration? > Earlier: > > n = 0 > for x in lst: > print "iteration %d on eleme

Re: hard memory limits

2005-05-06 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > James Stroud wrote: > >> > does Mac OS X ship with memory limits set by default? isn't that >> > a single-user system? >> >> Dear original poster or whoever is interested in OS X: >> >> OS X is not a single user system. It is BSD based unix. And its [

Re: hard memory limits

2005-05-06 Thread Mike Meyer
Maurice LING <[EMAIL PROTECTED]> writes: > Hi everyone, > > thanks for your help. > > Yes, I'm using Mac OSX 1.3 with 256MB Ram. Each element in the list is > a float. The list is actually a retrieved results of document IDs from > SOAP interface. And Mac OSX does not have 'unlimit' command as sho

Re: hard memory limits

2005-05-06 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >> > So why would Apple insist on setting unusably low process limits, when >> > the others don't? >> >> You're making an unwarranted assumption here - that the OP w

Re: Newbie : checking semantics

2005-05-07 Thread Mike Meyer
"LDD" <[EMAIL PROTECTED]> writes: > I am new to python and was very enthustic about its possibilities when > I discover that python is really what it is : just a scripting > language. That "just" covers a *very* big application space. So-called scripting languages are being used in an ever-wideni

Re: New Python regex Doc

2005-05-07 Thread Mike Meyer
"Xah Lee" <[EMAIL PROTECTED]> writes: > Let me expose one another fucking incompetent part of Python doc, in > illustration of the Info Tech industry's masturbation and ignorant > nature. What you actually expose is your own ignorance. > Note: “In other words, the "|" operator is never greedy.”

Re: Advice needed on __del__

2005-05-09 Thread Mike Meyer
phil <[EMAIL PROTECTED]> writes: > By the way, I understand that __del__ is only called when the last > reference to an instance is deled. That's fine, if consistent. Actually, __del__ is called when the instance is garbage collected. Exactly when that is is implementation dependent. In the impl

Re: Question: Threading and embedding python in an application

2005-05-10 Thread Mike Meyer
David Harrison <[EMAIL PROTECTED]> writes: > I am working on an application on Mac OS X that calls out > to python via PyImport_ImportModule(). I find that if > the imported module creates and starts a python thread, > the thread seems to be killed when the import of > the module is complete. I

Re: Merging overlapping spans/ranges

2005-05-10 Thread Mike Rovner
Max M wrote: > I am writing a "find-free-time" function for a calendar. There are a lot > of time spans with start end times, some overlapping, some not. > > To find the free time spans, I first need to convert the events into a > list of non overlapping time spans "meta-spans". > "Almost" lin

Re: Need a little parse help

2005-05-10 Thread Mike Meyer
"Michael Hartl" <[EMAIL PROTECTED]> writes: > I'd also like to note that both the inputfiles variable and the > readlines() method are superfluous; to iterate through the file line by > line, use either > > for line in open(inputfilename): > # do something with line > > or (my personal prefere

Re: pyvm -- faster python

2005-05-11 Thread Mike Meyer
Stelios Xanthakis <[EMAIL PROTECTED]> writes: > - hacking SWIG. Shouldn't be too hard and will instantly give > us access to wx, qt, etc. You can't assume that because some package is a C/C++ library wrapped for Python that it uses SWIG. pyqt, for example, doesn't use SWIG at all. It

Re: Defunct Processes With subprocess.Popen

2005-05-11 Thread Mike Meyer
John Abel <[EMAIL PROTECTED]> writes: > Hi! > > I'm currently writing a script which launches external programs, but > it keeps leaving zombie/defunct processes behind, until I kill the > launching script, which is a bit of a pain, as it's supposed to be a > daemon. The code I'm using is: > > new

Re: Problems with csv module

2005-05-11 Thread Mike Meyer
John Machin <[EMAIL PROTECTED]> writes: > The CSV format is not defined at all, AFAIK. Just for the record, http://www.ietf.org/internet-drafts/draft-shafranovich-mime-csv-05.txt >. You'll also see application that deal with the application/csv MIME type. http://www.mire

Re: HELP Printing with wxPython

2005-05-11 Thread Mike Meyer
James Carroll <[EMAIL PROTECTED]> writes: > If you are doing this just for yourself, and you know you have a > printer that will really print just the plain text when you send it > plain text (like a dot matrix printer from the early 90s) then you can > probably open the printer device and send it

Re: Importing modules

2005-05-11 Thread Mike Meyer
[EMAIL PROTECTED] writes: > A part the fact that I have not understood the "real" difference > between import and from ... import (or also from... import *), is it > possible to re-build the application in only one chunck? > This is only to better understand the application's structure, in order >

Re: Finding startup files

2005-05-11 Thread Mike Meyer
jeff elkins <[EMAIL PROTECTED]> writes: > On Wednesday 11 May 2005 04:44 pm, Grant Edwards wrote: >> On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> > The following script demonstrates a method that should work for you. I >> > believe it is entirely cross-platform. >> > >> > #! /usr

Re: reg mail sending without smtp module

2005-05-12 Thread Mike Meyer
praba kar <[EMAIL PROTECTED]> writes: > In Php we can build a Mail Message by > Mail_mime class and send this message by > Mail::Factory's class send Method. Here Php > doesn't use any smtp modules. Like that > In Python I used email.Message class to > build Mail Message and Now I am searching > mo

Re: HELP Printing with wxPython

2005-05-12 Thread Mike Meyer
jeff elkins <[EMAIL PROTECTED]> writes: >> Instead, as was suggested earlier, use the "lpr" command and send it >> the text/data on standard input. Any reasonably managed Unix system >> should be able to handle a fair range of graphics formats, though >> postscript is preferred. > I've been using:

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-12 Thread Mike brown
I don't give a feather or a fig. MJRB -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Documentation (should be better?)

2005-05-12 Thread Mike Meyer
"Christopher J. Bottaro" <[EMAIL PROTECTED]> writes: > because there are no namespaces or classes, but still I think Python could > do something similar. Say for instance search for "append" and it will > come back with a page for list's append, a page for array's append, etc. A seperate page fo

Re: pyvm -- faster python

2005-05-12 Thread Mike Meyer
Paul Rubin writes: > Andrew Dalke <[EMAIL PROTECTED]> writes: > >> Years ago, presented at one of the Python conferences, was a program >> to generate C code from the byte code The conclusion I recall >> was that it wasn't faster - at best a few percent - and there

Re: bash like expansion

2005-05-12 Thread Mike Meyer
"bill" <[EMAIL PROTECTED]> writes: > Consider the following: > > import os, commands > os.environ['QWE']="string with foo" > a = '$QWE ${QWE/foo/baz}' > b = commands.getoutput('echo ' + a) > > > This does what I want, which is to expand > a according to the standard bash expansion rules > (so b n

Re: space saving retitle of thread

2005-05-14 Thread Mike Painter
Johnny Gentile wrote: > aa. I just added a second monitor and have over two feet of monitor as 1280 x 1024. Outlook expands this message and it still runs off the right side of the second monitor. -- http://mail.python.org/mailman/listinfo/python-list

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-15 Thread Mike brown
In article <[EMAIL PROTECTED]>, "Bubba" <[EMAIL PROTECTED]> wrote: > I'm so glad you've decided what everyone believes > Some of us don't. Believe that is. In anything in particular. MJRB -- http://mail.python.org/mailman/listinfo/python-list

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-16 Thread Mike Meyer
[EMAIL PROTECTED] (Mike brown) writes: > In article <[EMAIL PROTECTED]>, "Bubba" <[EMAIL PROTECTED]> wrote: > >> I'm so glad you've decided what everyone believes >> > > > > Some of us don't. > > > > > >

<    12   13   14   15   16   17   18   19   20   21   >