Re: Quickie - Regexp for a string not at the beginning of the line

2012-10-25 Thread Mark Lawrence
x27;.index('xyz', 1) or 'xyz' in 'yourstring'[1:] -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to change os.popen4 to subprocess

2012-10-26 Thread Mark Lawrence
I suggest you read the tutorial here first http://docs.python.org/tutorial/index.html then the subprocess module here http://docs.python.org/library/subprocess.html#module-subprocess, specifically http://docs.python.org/library/subprocess.html#subprocess-replacements thanks. No

Re: a.index(float('nan')) fails

2012-10-27 Thread Mark Adam
= nan > False Here, equality, IS about number and this is appropriate and conforms to the IEEE standard. >>>> nanlist = [nan] >>>> nan in nanlist > True >>>> nanlist.index(nan) > 0 Here you just see an phenomenon with the python object/reference model, which, being as it is, has nothing to do with numbers. This is an area which, potentially could be changed in Python without violating the IEEE standard whatsoever. Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Where are documentation for Gnome

2012-10-28 Thread Mark Lawrence
On 13/10/2012 18:49, Santosh Kumar wrote: Try your local garden centre. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Python question for some

2012-10-28 Thread Mark Lawrence
On 28/10/2012 23:51, Mark L. Hotz wrote: I have what I think should be a relatively simple question for someone who is knowledgeable about Python. Sorry you've come to the wrong place :) At the IDLE prompt, when I enter "b" > 99, it responds True. In fact, it doesn't

Re: Negative array indicies and slice()

2012-10-29 Thread Mark Lawrence
*much* appreciated. Get yourself a decent email client. I read all the Python lists that I'm interested in using Thunderbird on Windows via gmane. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Negative array indicies and slice()

2012-10-29 Thread Mark Lawrence
y indicies and slice() (but Python arrays haven't been mentioned :), then moved onto (x)range and now lists, dictionaries and the C API for slices. An alternative is to tell us precisely what you're trying to achieve. The odds are that there's a simple answer waiting in t

Re: Immutability and Python

2012-10-29 Thread Mark Lawrence
? I prefer practicality beats purity. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: calling one staticmethod from another

2012-10-30 Thread Mark Lawrence
4/12/java-is-not-python-either.html -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Negative array indicies and slice()

2012-10-30 Thread Mark Lawrence
eters anyway? :) -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Negative array indicies and slice()

2012-10-30 Thread Mark Lawrence
On 30/10/2012 21:47, Ian Kelly wrote: On Tue, Oct 30, 2012 at 3:33 PM, Mark Lawrence wrote: On 30/10/2012 18:02, Ian Kelly wrote: On Tue, Oct 30, 2012 at 10:14 AM, Ethan Furman wrote: File a bug report? Looks like it's already been wontfixed back in 2006: http://bugs.pytho

Re: Negative array indicies and slice()

2012-10-30 Thread Mark Lawrence
On 30/10/2012 15:47, Andrew Robinson wrote: I would refer you to a book written by Steve Maguire, Writing Solid Code; Chapter 5; Candy machine interfaces. The book that took a right hammering here http://accu.org/index.php?module=bookreviews&func=search&rid=467 ? -- Cheers. Mark

Re: Float to String

2012-10-31 Thread Mark Dickinson
e the floating-point format, or if it can't find a way to ensure the proper FPU settings, but I don't know of any current platforms where that's the case.) > Is there any way of forcing the Python-2.6 behavior (for compatibility > reasons when testing)? Not easily, no. -- Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Negative array indicies and slice()

2012-10-31 Thread Mark Lawrence
On 31/10/2012 10:07, Steven D'Aprano wrote: On Tue, 30 Oct 2012 21:33:32 +0000, Mark Lawrence wrote: Absolutely bloody typical, turned down because of an idiot. Who the hell is Tim Peters anyway? :) I see your smiley, but for the benefit of those who actually don't know who

Re: sort order for strings of digits

2012-10-31 Thread Mark Lawrence
On 31/10/2012 18:17, Dennis Lee Bieber wrote: Why -- I doubt Python 3.x .sort() and sorted() have removed the optional key and cmp keywords. Nope. I'm busy porting my own code from 2.7 to 3.3 and cmp seems to be very dead. This doesn't help either. c:\Users\Mark\Cash\P

Re: datetime issue

2012-10-31 Thread Mark Lawrence
ever used on a continuing basis Please provide evidence that Thunderbird is buggy. I use it quite happily, don't have problems, and have never seen anybody complaining about it. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: sort order for strings of digits

2012-10-31 Thread Mark Lawrence
On 31/10/2012 22:24, Ian Kelly wrote: On Wed, Oct 31, 2012 at 3:33 PM, Mark Lawrence wrote: Nope. I'm busy porting my own code from 2.7 to 3.3 and cmp seems to be very dead. This doesn't help either. c:\Users\Mark\Cash\Python>**2to3.py Traceback (most recent call last

Re: datetime issue

2012-10-31 Thread Mark Lawrence
On 01/11/2012 00:23, Robert Miles wrote: On 10/31/2012 4:38 PM, Mark Lawrence wrote: On 31/10/2012 19:35, ru...@yahoo.com wrote: On 10/31/2012 09:11 AM, Grant Edwards wrote:> On 2012-09-16, ?? wrote:. "Broken"? Yes. But so is every piece of software in one w

Re: python and Open cv

2012-11-01 Thread Mark Lawrence
ours but a different subject line, and from a gmail address. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Organisation of python classes and their methods

2012-11-02 Thread Mark Lawrence
, grouped nicely in sub-directories. But it seems this is not the python way. Sigh. Thanks for your thoughts, Martin 20 lines of documentation per method? As far as I'm concerned that's not a smell, that's a stink. -- Cheers. Mark Lawrence. -- http://mail.python.org/m

Re: Organisation of python classes and their methods

2012-11-02 Thread Mark Lawrence
On 02/11/2012 08:45, Martin Hewitson wrote: On 2, Nov, 2012, at 09:40 AM, Mark Lawrence wrote: On 02/11/2012 08:08, Martin Hewitson wrote: Even if one takes reasonable numbers: 20 methods, each method has 20 lines of documentation, then we immediately have 400 lines in the file before

Re: Organisation of python classes and their methods

2012-11-02 Thread Mark Lawrence
e mailing lists for numpy and matplotlib, presumably scipy as well, should you have specific questions. Further matplotlib is now at version 1.2rc3 with Python 3 support, yippee. Combine that with the recently released Python 3.3 and it should make one hell of a tool kit :) -- Cheers.

Re: Obnoxious postings from Google Groups

2012-11-02 Thread Mark Lawrence
ke objective judgements. (I also hope I haven't just been suckered by a troll attempt, windows/unix is better then unix/windows being an age-old means of trolling.) Does Unix now have clustering, or is it still behind VMS aka Very Much Safer? -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: What the diferences : web.py Tornado Twisted ?!

2012-11-02 Thread Mark Lawrence
On 02/11/2012 15:50, nepaul wrote: What the diferences : web.py Tornado Twisted ?! Web.py is spelt w e b . p y. Tornado is spelt T o r n a d o. Twisted is spelt T w i s t e d. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Google spreadsheets - getting started

2012-11-03 Thread Mark Carter
I want to mess around with my online Google spreadsheets from my Linux box programmatically. I am TOTALLY confused. I've got gdata installed, and it appears that the best way to access the spreadsheets is to authenticate with Oauth2. Here's the main thing: how do I get an Oauth2 key to use with

Re: Google spreadsheets - getting started

2012-11-03 Thread Mark Carter
OK, maybe the p12 file is useful after all (?) I've got the following code: import gdata tokenfile = "my-privatekey.p12" f = open(tokenfile, 'r') blob = f.read() f.close() token = gdata.gauth.token_from_blob(blob) When I run that I get: Traceback (most recent call last): File "/home/mcarter/wa

Re: Google spreadsheets - getting started

2012-11-03 Thread Mark Carter
OK, the story so far: import gdata import gdata.auth import gdata.gauth import gdata.docs.service import OpenSSL.crypto tokenfile = "privatekey.p12" #f = open(tokenfile, 'r') #blob = f.read() #f.close() #if blob: p12 = OpenSSL.crypto.load_pkcs12(file(tokenfile, 'rb').read(), 'notasecret') print

Re: Obnoxious postings from Google Groups

2012-11-04 Thread Mark Lawrence
vastly superior to this highly overrated *Nix crap. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: delete value in list in indexing

2012-11-06 Thread Mark Lawrence
On 06/11/2012 06:17, Amit Agrawal wrote: i want to delete list in upper and lower some specific value I think you want to delete a slice so read about slicing here http://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range -- Cheers. Mark Lawrence. -- http

Re: Multi-dimensional list initialization

2012-11-07 Thread Mark Lawrence
On 07/11/2012 22:02, Andrew Robinson wrote: You're doing extremely well, you've overtaken Xah Lee as the biggest waste of space on this list. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Multi-dimensional list initialization

2012-11-08 Thread Mark Lawrence
On 07/11/2012 01:55, Steven D'Aprano wrote: Who knows? Who cares? Nobody does: n -= n But I've seen this scattered through code: x := x - x - x -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Multi-dimensional list initialization

2012-11-08 Thread Mark Lawrence
On 09/11/2012 06:37, Steven D'Aprano wrote: On Fri, 09 Nov 2012 17:07:09 +1100, Chris Angelico wrote: On Fri, Nov 9, 2012 at 12:39 PM, Mark Lawrence wrote: On 07/11/2012 01:55, Steven D'Aprano wrote: Who knows? Who cares? Nobody does: n -= n But I've seen this scatter

Re: Writing game-state data...

2012-11-08 Thread Mark Lawrence
andomly generated -- could that be an issue? Should I just scrap the current system and use pickle? Please always give the complete stack trace, it's provided for a purpose. Here I'll grope around in the dark and guess that you need file_object = shelve.open(... -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: writing a csv file

2012-11-11 Thread Mark Lawrence
zes the data. How can I write the data to a csv file without altering the order prior to the list function. Thanks E Change the line print str(a) to print type(a), a You'll see what the problem is and be able to fix it. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Method default argument whose type is the class not yet defined

2012-11-11 Thread Mark Lawrence
On 12/11/2012 00:31, Oscar Benjamin wrote: Plain wrong. Vectors are not defined *from any origin*. So when the Captain says "full speed ahead, steer 245 degrees", you haven't the faintest idea where you're going, because you have no origin? -- Cheers. Mar

Re: Method default argument whose type is the class not yet defined

2012-11-11 Thread Mark Lawrence
On 12/11/2012 01:18, Oscar Benjamin wrote: On 12 November 2012 01:10, Mark Lawrence wrote: On 12/11/2012 00:31, Oscar Benjamin wrote: Plain wrong. Vectors are not defined *from any origin*. So when the Captain says "full speed ahead, steer 245 degrees", you haven't th

Re: Method default argument whose type is the class not yet defined

2012-11-11 Thread Mark Lawrence
On 12/11/2012 01:15, Roy Smith wrote: In article , Mark Lawrence wrote: On 12/11/2012 00:31, Oscar Benjamin wrote: Plain wrong. Vectors are not defined *from any origin*. So when the Captain says "full speed ahead, steer 245 degrees", you haven't the faintest idea whe

stackoverflow quote on Python

2012-11-12 Thread Mark Lawrence
not being significant differences, should stackoverflow be asked to change their wording? -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: stackoverflow quote on Python

2012-11-13 Thread Mark Lawrence
On 13/11/2012 13:21, wxjmfa...@gmail.com wrote: Le mardi 13 novembre 2012 06:42:19 UTC+1, Steven D'Aprano a écrit : On Tue, 13 Nov 2012 03:08:54 +0000, Mark Lawrence wrote: * strings are now proper text strings (Unicode), not byte strings; Let me laugh. jmf Presumably be

Re: Zipping files

2012-11-13 Thread Mark Lawrence
d. How can I do that? Is there a zip library in python? http://docs.python.org/2/library/zipfile.html Any reason that you couldn't have found this out for yourself, given that there are several search engines available? -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Detect file is locked - windows

2012-11-13 Thread Mark Lawrence
I distinguish these two cases ? Namely, if some application has the file open or not. Thanks, nomadali Anything here help http://www.python.org/dev/peps/pep-3151/ ? -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: access spreadsheet data

2012-11-13 Thread Mark Lawrence
hieve, then you're far more likely to get some useful answers. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Question regarding running .py program

2012-11-15 Thread Mark Lawrence
mma are welcome. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Point of idle curiosity

2012-11-18 Thread Mark Lawrence
ble that it is named after Eric Idle. https://en.wikipedia.org/wiki/IDLE_%28Python%29 -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems on these two questions

2012-11-18 Thread Mark Lawrence
language and OS you're using, what code you've tried so far, and what problems if any you're having. If you're using Python please give us the version, if not please try another mailing list. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Spam source (Re: Horror Horror Horror!!!!!)

2012-11-18 Thread Mark Lawrence
a gmane is effectively zero. YMMV? -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Interview Questions

2012-11-18 Thread Mark Lawrence
. The obvious snag is that may have been Python 2.7 whereas 3.3 is completely different. Sorry but I'm currently wearing my XXXL size Lazy Bone Idle Hat so have no figures to back my probably incorrect memory up, anyone know anything about this? -- Cheers. Mark Lawrence. --

Re: Paid Python work for 30mins - 1 hour

2012-11-19 Thread Mark Adam
.com where you can hire programmers for small projects like this. Good luck, mark -- http://mail.python.org/mailman/listinfo/python-list

[OT]Two-tonne Witch computer gets a reboot

2012-11-19 Thread Mark Lawrence
You may find this interesting http://www.bbc.co.uk/news/technology-20395212 -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Error

2012-11-20 Thread Mark Lawrence
back tells you that the error has occurred at line 47. Looking at that and the lines above, I'd guess your problem lies in the return values from the GenerateRing function. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: 10 sec poll - please reply!

2012-11-20 Thread Mark Lawrence
s to mind as an alternative. Does that change your preference for 'send_keys'? Thanks a lot!!! -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Yet another Python textbook

2012-11-20 Thread Mark Lawrence
roper Unicode handling *and* efficient string handling. ChrisA Rather more polite than the response I've had sitting in my drafts folder for several hours. I'm so pleased I didn't send it, I can now happily delete it and move on :) -- Cheers. Mark Lawrence. -- http://mai

Re: How to use the python to do the unit test

2012-11-20 Thread Mark Lawrence
s the problem? -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Yet another Python textbook

2012-11-21 Thread Mark Lawrence
me)s %(green)s%%(version)s%(reset)s:\n%%(description)s" Which would have parsed to something like: 'FUSCIA{category__name}/RESET{name} GREEN{version}RESET:\n{description}' and 'FUSCIA%(category__name)s/RESET%(name)s GREEN%(version)sRESET:\n %(description)s' Can you seriously say you don't mind the "%(name)s"s in this? * "A {} is in the {}" vs "A %s is in the %s"? C %f style formatting is never going to go so live with it. I know as I asked maybe two years ago. On Python-dev. I think. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Update slider widget range

2012-11-22 Thread Mark Lawrence
read self.slider.valmax = len(self.raw_dicom_stack) If I'm wrong then please ask on the matplotlib users mailing list or possibly stackoverflow. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.popen and the subprocess module

2012-11-27 Thread Mark Lawrence
ess module, implementing os.popen is easy but i hear it is depreciating however I'm finding the implemantation of subprocess daunting can anyone help Dx os.popen is alive and kicking in Python 3.3, see here http://bugs.python.org/issue6490 for more. And I think you meant deprecated :) -

Re: Textmining

2012-12-01 Thread Mark Lawrence
http://packages.python.org/an_example_pypi_project/setuptools.html If any one of the learned members in the room can kindly help it. Learned members in this group? :) Regards, Subhabrata Banerjee. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Good use for itertools.dropwhile and itertools.takewhile

2012-12-05 Thread Mark Lawrence
On 05/12/2012 13:45, Chris Angelico wrote: I tested it on Python 3.2 (yeah, time I upgraded, I know). Bad move, fancy wanting to go to the completely useless version of Python that simply can't handle unicode properly :) -- Cheers. Mark Lawrence. -- http://mail.python.org/ma

Re: http://docs.python.org/2.7/tutorial/index.html

2012-12-05 Thread Mark Lawrence
orial, but dear old gmane delivered me precisely nothing worth commenting on, perhaps because it smelt the Google Screen Of Death? :) Please try Plan B. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Some help in refining this regex for CSV files

2012-12-06 Thread Mark Lawrence
ch(pattern, line) Do you've any better ideas guys? I will really appreciate all help. I'd simply use the csv module from the standard library to read your files, discarding anything that you regard as bad. I'd certainly not use a regex for this. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused compare function :)

2012-12-06 Thread Mark Lawrence
it'll cost to fix and get your cheque book out, perhaps that'll focus your mind. I'll not apologise for being blunt as your follow up is less than two hours after your previous post. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Problem using py-bt, py-locals, etc. during GDB debugging

2012-12-06 Thread Mark Shroyer
tu's GCC 4.6.3), after loading that Python's own copy of python-gdb.py into GDB. Any ideas? Thanks... Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem using py-bt, py-locals, etc. during GDB debugging [solved]

2012-12-06 Thread Mark Shroyer
On Thu, Dec 06, 2012 at 04:39:41PM -0500, Mark Shroyer wrote: > I'm having trouble with the py-bt, py-locals, etc. GDB commands (from > Python's python-gdb.py) while using GDB 7.4 to debug Python 2.7.3; I was > wondering if anyone here could offer advice. > > Briefly, py

Re: Problem using py-bt, py-locals, etc. during GDB debugging [solved]

2012-12-06 Thread Mark Shroyer
On Thu, Dec 06, 2012 at 07:37:22PM -0500, MRAB wrote: > On 2012-12-07 00:22, Mark Shroyer wrote: > > > > [...] > > > > 2. Patch Python 2.7.3's python-gdb.py as follows: > > > > === 8< = > > > > ---

Re: pyodbc utf-8

2012-12-07 Thread Mark Lawrence
://nedbatchelder.com/text/unipain.html -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with Singleton SafeConfigParser

2012-12-08 Thread Mark Lawrence
ven be trying this sort of thing until then. Thank you for the simple answer. Josh For the benefit of the OP and others, if you want to gain more knowledge about patterns in Python such as the Singleton, I suggest you use your favourite search engine to find "Alex Martelli Python p

Re: Parsing in Python

2012-12-09 Thread Mark Lawrence
built in. If anyone can kindly suggest. Regards, Subhabrata. Take your pick from http://nedbatchelder.com/text/python-parsers.html -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: why does dead code costs time?

2012-12-09 Thread Mark Lawrence
On 09/12/2012 14:11, Ramchandra Apte wrote: peehole haha Double spaced crap from you again not so haha. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb insert HTML code error

2012-12-10 Thread Mark Lawrence
S, Python version, calling code, what you expect to happen, what actually happened, apart from that your request for assistance is perfect. Usually I'd be able to help but sadly my crystal ball is in for repairs at the moment. Would you please be kind enough to elucidate. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb insert HTML code error

2012-12-10 Thread Mark Lawrence
Brilliant, I think your problem is in line 97 of the code that you *HAVEN'T QUOTED*. Please go here, read and inwardly digest before you say anything else http://www.sscce.org/ -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params"

2012-12-10 Thread Mark Hammond
ling list where many people will be able to help. HTH, Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params"

2012-12-11 Thread Mark Hammond
On 12/12/2012 2:48 AM, bitbucket wrote: On Monday, December 10, 2012 8:16:43 PM UTC-5, Mark Hammond wrote: "out" params are best supported if the object supplied a typelib - then Python knows the params are out and does the right thing automagically. If out params are detected, the

Re: Matplotlib/Pylab Error

2012-12-11 Thread Mark Lawrence
otlib users mailing list. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: samba 4 release

2012-12-12 Thread Mark Lawrence
/samba-4.0.0.html Awesome!!! But what the is it??? -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Hollow square program

2012-12-12 Thread Mark Lawrence
On 12/12/2012 17:52, siimnur...@gmail.com wrote: Thanks, got it now :) Please quote something in context for future readers. Roughly translated THE ONLY GOOD GOOGLE USER IS A DEAD GOOGLE USER -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Mark Lawrence
#x27;t peak your interest, then move on...nothing here for you to see. Please don't place responses like this. The Python community prides itself on tolerance. If you don't wish to follow that recommendation please go to an alternative site. -- Cheers. Mark Lawrence. -- http

Re: Find lowest level directory

2012-12-13 Thread Mark Lawrence
os.path.walk in Python 2 is called os.walk in Python 3. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom alphabetical sort

2012-12-24 Thread Mark Lawrence
Dutch and members of the PSU. A slight aside, I understand that the BDFL is currently on holiday. For those who want a revolution now is as good a time as any :) -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Beowulf clusters

2013-01-13 Thread Mark Janssen
On Sun, Jan 13, 2013 at 8:19 PM, Oscar Benjamin wrote: > On 14 January 2013 02:10, Mark Janssen wrote: >> Has anyone used python for high-performance computing on Beowulf clusters? > > Yes. How did they deal with the Global interpreter lock across many machines? Cheers,

Re: Beowulf clusters

2013-01-13 Thread Mark Janssen
On Sun, Jan 13, 2013 at 8:37 PM, Oscar Benjamin wrote: > On 14 January 2013 02:33, Mark Janssen wrote: >> Lol, well that's why I'm asking. I don't see how they can do it >> without considerable difficulties. > > What do you want the GIL for across machines? T

atexit handler in IDLE?

2013-01-15 Thread Mark Janssen
an item for this in IDLE's TODO list. I was going to implement it, which is fairly east, but never got to it. mark -- http://mail.python.org/mailman/listinfo/python-list

Param decorator - can you suggest improvements

2013-01-17 Thread Mark Carter
I thought it would be interesting to try to implement Scheme SRFI 39 (Parameter objects) in Python. The idea is that you define a function that returns a default value. If you call that function with no arguments, it returns the current default. If you call it with an argument, it resets the de

Re: Converting a string to a number by using INT (no hash method)

2013-01-22 Thread Mark Lawrence
DATABASE ANYMORE!!! this is just great! Hi Iron Skull, I hereby nominate you for Troll of the Millenium. -- Cheers. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list

Re: Using filepath method to identify an .html page

2013-01-22 Thread Mark Lawrence
spoon. Im starving HELP Unfortunately a spoon wouldn't help in this case as the soup is being served in a basket. However I still absolutely insist that a Python solution to this problem is found. -- Cheers. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list

Re: Uniquely identifying each & every html template

2013-01-23 Thread Mark Lawrence
d and sod off. What an appalling lack of manners, it's sod off please :) -- Cheers. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list

Re: Using filepath method to identify an .html page

2013-01-23 Thread Mark Lawrence
iddie ride. Congratulations on beating a dead horse into mince-meat and successfully milking the one-uddered cow until the pale is full. I hope that you enjoyed your meal. Pail not pale :) Or to borrow a phrase, "I say GOOD DAY, sir!" Or madam? -- Cheers. Mark Lawrence -- http://mai

Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Mark Lawrence
On 24/01/2013 19:34, Leonard, Arah wrote: It's just a text file after all. True indeed, let's not worry about trivial issues like indentation, mixing tabs and spaces or whatever. Notepad anybody? :) -- Cheers. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list

Re: unittest and threading

2012-01-25 Thread Mark Hammond
s in parallel. nose is still worth having a look at - personally I just use it as a runner and where possible ignore its api... Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: surprising result all (generator) (bug??)

2012-01-31 Thread Mark Dickinson
On Jan 31, 6:40 am, Neal Becker wrote: > I was just bitten by this unexpected behavior: > > In [24]: all ([i > 0 for i in xrange (10)]) > Out[24]: False > > In [25]: all (i > 0 for i in xrange (10)) > Out[25]: True What does: >>> import numpy >>>

Re: surprising result all (generator) (bug??)

2012-01-31 Thread Mark Dickinson
On Jan 31, 7:24 am, Neal Becker wrote: > In [31]: all is numpy.all > Out[31]: True > > Excellent detective work, Mark!  But it still is unexpected, at least to me. Agreed that it's a bit surprising. It's a consequence of NumPy's general mechanisms for converting

Re: Registry entries set up by the Windows installer

2012-02-01 Thread Mark Hammond
t that - bdist_wininst installers? FWIW, my encounters with virtualenv haven't forced me to hack the registry - I just install bdist_wininst packages into the "parent" Python which isn't ideal but works fine for me. This was a year or so ago, so the world might have changed since then. Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with COM_error

2012-02-06 Thread Mark Hammond
ls in that way when the path isn't valid... Mark On 4/02/2012 12:10 AM, John Lay wrote: I am not a programmer, but this past week I have had a crash course in python scripting am have been rather impressed with myself for having written a fairly complicated script that among many other

Re: iterating over list with one mising value

2012-02-07 Thread Mark Lawrence
ing', 2, 'encountered', 1, 'eleven', 1, 'during', 3, 'district', 1, 'difficulty', 1, 'cord', 1, 'consecutive', 1, 'colour', 1, 'cleared', 1, 'child', 1, 'checkups', 1, 'came', 1, 'but', 2, 'breathing', 2, 'breath', 1, 'blood', 2, 'bleeding', 1, 'birth', 4, 'before', 1, 'bad', 1, 'average', 1, 'at', 2, 'assist', 1, 'artificial', 1, 'around', 2, 'antenatal', 1, 'and', 5, 'an', 1, 'ambrical', 1, 'air', 1, 'abdominal', 1, '600am', 1, '100pm', 1, '', 3, 'other'] for i in range(0, len(x), 2): print x[i-1], x[i] other with 3 which ... 1 3 other Houston, we've got a problem:) -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: PythonWin debugger holds onto global logging objects too long

2012-02-07 Thread Mark Hammond
onwin does not spawn a clean python interpreter for every run, keeping the same one. That is what everyone's pythonwin does :) It always works "in process" - not ideal, but also likely to not change. Cheers, Mark So you could possibly keep adding log handlers to your loggers because

Cycle around a sequence

2012-02-07 Thread Mark Lawrence
some definition of better? PythonWin 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32. Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information. >>> from itertools import chain >>> a=range(10) >

Re: when to use import statements in the header, when to use import statements in the blocks where they are used?

2012-02-08 Thread Mark Lawrence
discusses startup times for anyone who's interested. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cycle around a sequence

2012-02-08 Thread Mark Lawrence
On 08/02/2012 01:26, Dennis Lee Bieber wrote: On Wed, 08 Feb 2012 01:10:28 +, Mark Lawrence wrote: I'm looking at a way of cycling around a sequence i.e. starting at some given location in the middle of a sequence and running to the end before coming back to the beginning and runni

Re: Cycle around a sequence

2012-02-08 Thread Mark Lawrence
On 08/02/2012 14:25, Neil Cerutti wrote: On 2012-02-08, Mark Lawrence wrote: I'm looking at a way of cycling around a sequence i.e. starting at some given location in the middle of a sequence and running to the end before coming back to the beginning and running to the start place. Abou

Re: Read-only attribute in module

2012-02-09 Thread Mark Lawrence
THIS_IS_A_CONSTANT. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Any idea for build code bars???

2012-02-10 Thread Mark Lawrence
should give you some ideas. http://pypi.python.org/pypi/pyBarcode -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

<    2   3   4   5   6   7   8   9   10   11   >