Re: [Tutor] class methods: using class vars as args?

2010-05-27 Thread Mark Lawrence
d some explanations as to what happens, but what are you trying to achieve? Why don't you forget about arg3 because it is arg1, which must exist by creating an instance of class c, or you wouldn't be able to call doSomething in the first place? HTH. Mark Lawrence _

Re: [Tutor] list of dicts <-> dict of lists?

2010-05-27 Thread Mark Lawrence
I confess that I don't like top posting :) Please see below. On 28/05/2010 00:19, Matthew Wood wrote: #!/usr/bin/env python Here's my best attempt. I'm not sure if it's "simpler" than yours, but for me it seems a bit cleaner. Then again, I LOVE the zip operator, and the '*' operator too. :

Re: [Tutor] class methods as static methods?

2010-05-29 Thread Mark Lawrence
) I think that you're trying to build a Yamoto/Musashi before you've built a raft from oil drums or whatever :) If I'm wrong, I'll apologise here and now. For a really great introduction to Python, I suggest diveintopython, it's what got me going eight years ago

Re: [Tutor] class methods as static methods?

2010-05-29 Thread Mark Lawrence
Hi Alex, thanks for the response, please see below. On 30/05/2010 02:50, Alex Hall wrote: On 5/29/10, Mark Lawrence wrote: On 29/05/2010 20:49, Alex Hall wrote: Hi all, In Battleship, I have a weapons.py file, currently with just one missile type (a Harpoon anti-ship missile). This Harpoon

Re: [Tutor] matmolplot

2010-06-01 Thread Mark Lawrence
lem is the call to plt.axis which sets xmin to 350, compare this to your data values where the lowest value of x is 233.27. Note that there is also a matplotlib mailing list. HTH. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscri

Re: [Tutor] while loops causing python.exe to crash on windows

2010-06-07 Thread Mark Lawrence
On 07/06/2010 01:44, Alex Hall wrote: Further to the other comments that you've had, could you please refer to the following, thanks. http://www.catb.org/~esr/faqs/smart-questions.html Kindest regards. Mark Lawrence ___ Tutor maillist -

Re: [Tutor] a class query

2010-06-07 Thread Mark Lawrence
, Malcolm ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor RTFM? :) Kindest regards. Mark Lawrence. ___ Tutor maillist - Tutor

Re: [Tutor] a class query

2010-06-07 Thread Mark Lawrence
lied twice so I won't bother. Apart from that no offence meant, I hope none taken. Kindest regards. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] a class query

2010-06-07 Thread Mark Lawrence
On 07/06/2010 17:30, pyt...@bdurham.com wrote: Hi Mark, I see that Stephen D'Aprano has already replied twice so I won't bother. Apart from that no offence meant, I hope none taken. Your RTFM reply actually gave me a good laugh. No (zero) offence taken. And I appreciate your many helpful pos

Re: [Tutor] Problems with Importing into the Python Shell

2010-06-12 Thread Mark Lawrence
tutorial you're bound to run into exception handling. Can anybody help me with this? Thanks a lot P.S. SORRY FOR THE LONG EMAIL By some standards this doesn't even qualify as short, it's just a snippet. ___ Tutor maillist - Tutor@python.org To unsubscribe o

Re: [Tutor] How to model objects aimed to persistence?

2010-06-16 Thread Mark Lawrence
.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor Hi Jan, I guess you're looking for something like the shelve or pickle modules. http://docs.python.org/library/shelve.html http://docs.python.org/library/pickle.html HTH. Mark Lawrence.

Re: [Tutor] help

2010-06-17 Thread Mark Lawrence
someone, help. I'll leave you to find out the rests of the lyrics. :) Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] help

2010-06-17 Thread Mark Lawrence
On 17/06/2010 19:22, Lowell Tackett wrote: From the virtual desk of Lowell Tackett --- On Thu, 6/17/10, Mark Lawrence wrote: From: Mark Lawrence Subject: Re: [Tutor] help To: tutor@python.org Date: Thursday, June 17, 2010, 8:30 AM On 17/06/2010 08:28, KB SU wrote: help Help, I need

Re: [Tutor] Question

2010-06-19 Thread Mark Lawrence
ans for me to get to grips with 30 languages takes 150 years. I don't think I'll live to do that. Just my viewpoint. Kindest regards. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] re.sub() query

2010-06-20 Thread Mark Lawrence
h warm regards, -Payal You can do this. >>> re.sub('[lL]','-',a) 'Mary Had a -itt-e -amb' However it strikes me as overkill to use an re for something that could be done with the string replace function. Kindest regards. Mark Lawrence. ___

Re: [Tutor] retrieve URLs and text from web pages

2010-06-29 Thread Mark Lawrence
On 29/06/2010 17:32, Joel Goldstick wrote: [big snips] It might not be completely relevant, but there is nothing to stop anybody mixing regex and/or string methods. Horses for courses? Kindest regards. Mark Lawrence. ___ Tutor maillist - Tutor

Re: [Tutor] puzzled by Python 3's print()

2010-07-01 Thread Mark Lawrence
r@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor Take a look at section 7.1.3 here. http://docs.python.org/py3k/library/string.html#string-formatting This is the recommended way to format str

Re: [Tutor] puzzled by Python 3's print()

2010-07-01 Thread Mark Lawrence
hon.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor Drat, drat and double drat, I believe Dick Dastardly from the Wacky Races cartoons. I meant to mention this, got side-tracked and completely forgot, sorry. Kindest regards. Mark Lawrence. _

Re: [Tutor] S.find()

2010-07-01 Thread Mark Lawrence
of my code posted up at http://pastebin.com/k9nMZNMy, I won't edit the code until I get this worked out, except maybe a few housekeeping things, documentation, etc.* *I've tried everything I can, and I appreciate your time and help! ~Corey Richardson ___

Re: [Tutor] Python Documentation Clarification

2010-07-12 Thread Mark Lawrence
ation... ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor HTH. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscri

Re: [Tutor] A file containing a string of 1 billion random digits.

2010-07-17 Thread Mark Lawrence
i.e. use 'wb' instead of 'w', and don't bother converting to strings? Then when reading the file use 'rb' instead of 'r'. HTH. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] position of an element in list:

2010-07-23 Thread Mark Lawrence
ained within s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Calculating and returning possible combinations of elements from a given set

2010-07-27 Thread Mark Lawrence
advance! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor The lazy way. http://docs.python.org/library/itertools.html Look for combinations(). HTH. Mark Lawrenc

Re: [Tutor] string editing

2010-07-31 Thread Mark Lawrence
t;> ankur = "this is ankur" >>> ankur.replace(' ', '\ ') 'this\\ is\\ ankur' HTH. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Where to start with Unit Testing

2010-08-01 Thread Mark Lawrence
look at the actual Python test code in the Lib\test\ directory. Depending on the code that you're wanting to test you might also want to google for mock+objects, but this can wait until you've got your feet under the table. HTH. Mar

Re: [Tutor] iterating over less than a full list

2010-09-04 Thread Mark Lawrence
else: break Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] dictionary of methods calling syntax

2012-02-08 Thread Mark Lawrence
e of __init__. thanks, matt ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor This should help if you need more info http://code.activestate.com/lists/python-list/403361/

Re: [Tutor] Dictionaries

2012-02-10 Thread Mark Lawrence
-development/python/code/217019 and think about it in relation to the replies you've already had. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Concatenating multiple lines into one

2012-02-10 Thread Mark Lawrence
Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor The advice from Peter is sound if the strings could grow very large but you can simply concatenate the parts if they are not. For the inde

Re: [Tutor] string integers?

2012-02-12 Thread Mark Lawrence
e you can use print str1, print "*", etc See http://docs.python.org/tutorial/inputoutput.html -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to stop a running program in python without closing python interface?

2012-02-12 Thread Mark Lawrence
he process and/or application. ctrl-shift-esc brings up the Task Manager directly. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] ipython trouble with editor

2012-02-13 Thread Mark Lawrence
On 13/02/2012 16:07, Steven D'Aprano wrote: [snipped] You might be better off asking your question on a dedicated ipython support forum. Like http://news.gmane.org/gmane.comp.python.ipython.user -- Cheers. Mark Lawrence. ___ Tutor mai

Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Mark Lawrence
have already responded I don't believe that this will be too difficult to sort as the astropysics package is available on Pypi and there it states that it requires scipy and numpy. Did you or someone else install the package, if the latter can you ask them about this problem? Best of Brit

Re: [Tutor] problem in plotting circular plates at regular separation

2012-02-14 Thread Mark Lawrence
ause I can't be bothered to phrase a question. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread Mark Lawrence
he book reviews here http://accu.org/index.php?module=bookreviews&func=search -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Class definition confusion

2012-02-15 Thread Mark Lawrence
different in that they are are shared at the class level so. >>> class Point: ... """pts in 2d space""" ... x = 3 ... y = 4 ... >>> a = Point() >>> b = Point() >>> a.x 3 >>> b.y 4 HTH. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Class definition confusion

2012-02-15 Thread Mark Lawrence
//mail.python.org/mailman/listinfo/tutor To the OP. Note that __init__ is an initialiser and not a constructor which is __new__, see e.g. http://mail.python.org/pipermail/tutor/2008-April/061426.html -- Cheers. Mark Lawrence. ___ Tutor maillist

Re: [Tutor] finding a maximum between the absolute difference of several columns

2012-02-16 Thread Mark Lawrence
sage is from numpy. See if this can get you going http://stackoverflow.com/questions/1322380/gotchas-where-numpy-differs-from-straight-python. The fourth answer down states "this is a horrible problem" so I'll duck out here, sorry :) -- Cheers. Mark Lawrence. __

Re: [Tutor] finding a maximum between the absolute difference of several columns

2012-02-16 Thread Mark Lawrence
ess maybe my problem is trickier than I first thought! ~Elaina ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor I've found this http://comments.gmane.org/gmane

Re: [Tutor] arrays, while loops

2012-02-18 Thread Mark Lawrence
average number is: ") ##print ("You entered this many numbers above average: ") I'll leave this for you :) ## ___ Tutor maillist - Tutor@python.org To unsubscribe or c

Re: [Tutor] list comprehension efficiency

2012-02-18 Thread Mark Lawrence
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor Use the timeit module to answer Q1 and the dis module to answer Q2. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor

Re: [Tutor] What made Python differ from other Languages?

2012-02-20 Thread Mark Lawrence
to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Create a table by writing to a text file.

2012-02-22 Thread Mark Lawrence
e found here http://docs.python.org/library/string.html#formatexamples -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] I cannot "run" any Python programs

2012-02-22 Thread Mark Lawrence
://docs.python.org/using/windows.html -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Which computer operating system is best for Python developers?

2012-02-22 Thread Mark Lawrence
ls me that reading manuals before trying something tends to save time in the long run. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Reading/dealing/matching with truly huge (ascii) files

2012-02-22 Thread Mark Lawrence
code to make it easier on all MkI eyeballs, e.g. you have Decdeg2=dat2['col4']+(dat2['col5']/60.)+(dat2['col6']/(60.*60.)) I think this looks better as Decdeg2 = dat2['col4'] + (dat2['col5']/60.) + (dat2['col6'] / (60.*60.)) -- Che

Re: [Tutor] Which computer operating system is best for Python developers?

2012-02-23 Thread Mark Lawrence
//bitbucket.org/vinay.sajip/pylauncher Here's the background http://www.python.org/dev/peps/pep-0397/ -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] GameTracker help

2012-02-25 Thread Mark Lawrence
() UserID = getUserNumber() OppUserID = getUserOppNumber() GameType = getGameType() UserSkillLvl = getUserSkillLvl(GameType) UserOppSkillLvl = getUserOppSkillLvl() print "\nPlayer Name:",UserName, "\nOpponent Name:", UserOppName, "\nU

Re: [Tutor] roman to arabic

2012-02-26 Thread Mark Lawrence
e or change subscription options: http://mail.python.org/mailman/listinfo/tutor I'm sorry but the code is so badly formatted via Thunderbird that it's pretty much impossible to work out what you intend. Try resending with the code correctly formatted. Also put print statements

Re: [Tutor] mentorship

2012-03-02 Thread Mark Lawrence
e testing? I welcome any suggestions on any point or question given. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor Start with http://pythonmentors.com/ ?

Re: [Tutor] inserting new lines in long strings while printing

2012-03-06 Thread Mark Lawrence
' for i in range(0, len(onebigstring), 100): # for Python3, xrange for Python 2 print onebigstring[i:i+100] -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.o

Re: [Tutor] misunderstanding "any"

2012-03-06 Thread Mark Lawrence
a class defines ``__getitem__()``, ``x in y`` is true if and only if there is a non- negative integer index *i* such that ``x == y[i]``, and all lower integer indices do not raise ``IndexError`` exception. (If any other exception is raised, it is as if ``in`` raised that exception). The

Re: [Tutor] misunderstanding "any"

2012-03-06 Thread Mark Lawrence
On 07/03/2012 04:36, col speed wrote: On 7 March 2012 10:45, Mark Lawrence wrote: On 07/03/2012 03:24, col speed wrote: Hello again Hope you are all well. I'm trying to make a "match 3" game, where you have a square grid and have to put 3 matching shapes in a row. I need

Re: [Tutor] top-posting and text mode email

2012-03-13 Thread Mark Lawrence
. If not get a different email account :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor This is bottom posted. -- Cheers.

Re: [Tutor] Cannot run python programs on my windows7 computer

2012-03-13 Thread Mark Lawrence
s tell us exactly what you are doing and what the error messages are by cutting and pasting into email, don't try to type stuff yourself. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opti

Re: [Tutor] seeing the results of a python program in windows7

2012-03-14 Thread Mark Lawrence
enough to tell everybody for the record how you overcame the problem "I cannot run Python programs" as asked in the thread entitled "Cannot run python programs on my windows7 computer". -- Cheers. Mark Lawrence. ___ Tutor maillist

Re: [Tutor] how I overcame the problem "I cannot run Python programs"

2012-03-15 Thread Mark Lawrence
asons. Why not stick with pythonwin, it's perfectly adequate for my needs? -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python arthematics

2012-03-22 Thread Mark Lawrence
python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor Take a look at the operator module as it should give you some ideas. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscri

Re: [Tutor] Error handling

2012-03-25 Thread Mark Lawrence
t") else: raise can now be written without the errno import and without manual inspection of exception attributes: try: with open("document.txt") as f: content = f.read() except FileNotFoundError: print("document.txt file is missing") except

Re: [Tutor] Lists and While Loops

2012-03-28 Thread Mark Lawrence
ing to get this done any advice is appreciated. Thanks -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] New to this list ....

2012-03-30 Thread Mark Lawrence
originally. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] New to this list ....

2012-03-30 Thread Mark Lawrence
rs to several other recipes which you might want to take a look at, sorry I meant to mention this earlier. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/lis

Re: [Tutor] Problem Stripping

2012-03-30 Thread Mark Lawrence
p on built-in function strip: strip(...) S.strip([chars]) -> string or unicode Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be

Re: [Tutor] Problem Stripping

2012-03-30 Thread Mark Lawrence
do list comprehension n = "".join([x for x in "this has : some : colons" if x not in ':']) n 'this has some colons' Yuck :( Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type &quo

Re: [Tutor] Problem Stripping

2012-03-31 Thread Mark Lawrence
t; 'www.example.com'.translate(allchars, 'cmowz.') 'exaple' As of Python 2.6 you don't even need the allchars hence >>> 'www.example.com'.translate(None, 'cmowz.') 'exaple' -- Cheers. Mark Lawrence.

Re: [Tutor] Open source projects build using Python

2012-04-03 Thread Mark Lawrence
On 03/04/2012 18:22, Alan Gauld wrote: On 03/04/12 15:45, Simon Yan wrote: Do a search on SourceForge and Google and see what comes up. Hopefully codeplex.com amongst others. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] cPickle/pickle help

2012-04-04 Thread Mark Lawrence
To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor You're probably better off asking on comp.lang.python but the advice will almost certainly be don't do it see e.g. http://www.velocityreviews.com/forums/t944852-re-re-advise-of-programming-on

Re: [Tutor] How to use g_timeout_add () function?

2012-04-06 Thread Mark Lawrence
th the error message cut and pasted. Having said that there's nothing to stop you using gtk_timeout_add as it's only deprecated, i.e. it's been marked for removal at some time in the future. -- Cheers. Mark Lawrence. ___ Tutor maillist

Re: [Tutor] which gets called

2012-04-06 Thread Mark Lawrence
b.onKeyDown(event) It's B.onKeyDown(self, event), without the self you'll get an unbound method error. Johnf ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.pyt

Re: [Tutor] How to use g_timeout_add () function?

2012-04-06 Thread Mark Lawrence
Please don't top post and please reply to the list Top posting fixed. - Forwarded Message - From: Lion Chen To: Mark Lawrence Cc: Sent: Friday, 6 April 2012, 16:43 Subject: Re: [Tutor] How to use g_timeout_add () function? fixed top posting > On 06/04/2012 15:17, Lion Ch

Re: [Tutor] need help with a script..

2012-04-11 Thread Mark Lawrence
function could be written something like this. def convert_proctors(): list_proc = [] for row in csv.reader(open(proctor_file)): list_proc.append(row[0]) return list_proc -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@pyt

Re: [Tutor] write list to columns

2012-04-12 Thread Mark Lawrence
Somehow they only appear as one long row. You need to write newlines but you probably also want to use string formatting to control the amount of space required so that your columns line up. HTH -- Cheers. Mark Lawrence. ___ Tutor maillist

Re: [Tutor] user created lists

2012-04-12 Thread Mark Lawrence
t - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Re.findall()

2012-04-12 Thread Mark Lawrence
il.python.org/mailman/listinfo/tutor Please give us an example of the code that you've tried, what you expect to see and what the actual output from your program was. If an exception occurred please cut and paste the entire exception traceback into this

Re: [Tutor] write list to columns

2012-04-13 Thread Mark Lawrence
On 13/04/2012 08:47, questions anon wrote: thanks all! No problem, but I would like like to point out, albeit repeating myself, that my normal profesional fees apply, i.e. two pints of Ringwood Old Thumper or equivalent should you ever be in my neck of the woods. -- Cheers. Mark Lawrence

Re: [Tutor] creating a regularly placed fields in a line

2012-04-25 Thread Mark Lawrence
On 25/04/2012 16:57, Prasad, Ramit wrote: Not really sure how to do the equivalent with % substitution. Ramit See http://docs.python.org/library/stdtypes.html#string-formatting-operations -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor

Re: [Tutor] virtualenv

2012-04-27 Thread Mark Lawrence
illist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor Google for python virtualenv windows and it's the first hit. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Fwd: help

2012-04-30 Thread Mark Lawrence
using a python program? If not, you should take a look at one of the several excellent tutorials easily found by a web search. The official tutorial is at http://docs.python.org/py3k/tutorial/ and it might be enough for you to at least attempt a solution to your problem." -- Cheers. Mar

Re: [Tutor] Python Variable Addition

2012-04-30 Thread Mark Lawrence
he original error message. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Variable Addition

2012-04-30 Thread Mark Lawrence
On 30/04/2012 19:40, Alan Gauld wrote: On 30/04/12 19:27, Mark Lawrence wrote: print 'Addition of above two numbers are : ', z Except that you'll get two spaces after the colon :) OK thats true, Try this: print 'Addition of above two numbers are :', z for one.

Re: [Tutor] Python Variable Addition

2012-04-30 Thread Mark Lawrence
On 01/05/2012 00:35, Steven D'Aprano wrote: Mark Lawrence wrote: On 30/04/2012 19:40, Alan Gauld wrote: But if the number of spaces is critical string formatting is better still. And better than string addition. True indeed, but which of the three versions of string formatting tha

Re: [Tutor] Is there space a between "#!" and "/usr/bin/env python" ?

2012-05-02 Thread Mark Lawrence
-- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to exit this loop in the interpreter

2012-05-03 Thread Mark Lawrence
.org/mailman/listinfo/tutor I say old chap, it's simply not cricket to hijack a thread, particularly when you've already asked your question some 4 hours and 38 minutes earlier. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Embed python in a website

2012-05-03 Thread Mark Lawrence
20105/ -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Embed python in a website

2012-05-04 Thread Mark Lawrence
On 04/05/2012 02:02, Mark Lawrence wrote: On 03/05/2012 23:56, Emile van Sebille wrote: On 5/3/2012 2:28 PM Adrian said... I recently created a gui form using tkinter, is it possible to integrate this form to my website page? How do i integrate? pyjs aka pyjamas allows you to write once

Re: [Tutor] Curious dictionary printing

2012-05-07 Thread Mark Lawrence
t;, "stadium": "Shea Stadium"} when I print it: print(Namath) I get: {'phone': '212-222-', 'first_name': 'Joe', 'last_name': 'Namath', 'email': 'joe.nam...@gmail.com', 'stadium': &#

Re: [Tutor] Script to search in string of values from file A in file B

2012-05-09 Thread Mark Lawrence
've missed it. Afonso ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@pytho

Re: [Tutor] hello~

2012-05-13 Thread Mark Lawrence
he command. it doesnt produce an error message tho.. just repeats "return Error("%s I couldn't find %s anywhere", user.name.title(), name.title())" ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription op

Re: [Tutor] sorry seems like it was sent in html

2012-05-13 Thread Mark Lawrence
@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor No :( Please cut and past the exact code that you're using and the exception that you're getting, without that that it's impossible for us to help you. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] table to dictionary and then analysis

2012-05-17 Thread Mark Lawrence
n.org/pipermail/python-dev/2009-September/092399.html Rather than repeat myself, I will just point to what I wrote back in January: http://mail.python.org/pipermail/python-list/2012-January/1285894.html You beat me to it :) -- Cheers. Mark Lawrence. ___

Re: [Tutor] print 'hello world' - invalid syntax

2012-05-20 Thread Mark Lawrence
ail.python.org/mailman/listinfo/tutor Print is a function in Python 3, so you need print('hello world'). -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Query with SOAP request generation, which other modules can be used.

2012-05-23 Thread Mark Lawrence
.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list bangpyp...@python.org http://mail.python.org/mailman/listinfo/bangpypers What is the unladen airspeed velocity of a swallow in flight? -- Cheers. Mark Lawrence. _

Re: [Tutor] removing sq. of items.

2012-05-23 Thread Mark Lawrence
Python mailing lists. I complained several months ago but was told to shut up as it had previously caused too many flame wars. I guess there's two options, keep reminding peole or give up, I prefer the former but would certainly consider the other. -- Cheers. Mark Law

Re: [Tutor] Running .py Files

2012-06-05 Thread Mark Lawrence
docs.python.org/release/3.2/using/windows.html, any problems please feel free to ask as we don't bite :) -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] special attributes naming confusion

2012-06-06 Thread Mark Lawrence
re may be differences in Python 3.x. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] properties beginner M Dawson book

2012-06-11 Thread Mark Lawrence
On 11/06/2012 16:05, brian arb wrote: I would look into pylint, Python source code looking for bugs and signs of poor quality. Or pychecker or pyflakes. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Query - Where to put in global variables, if needed, as a good programming practice

2012-06-15 Thread Mark Lawrence
x27;t understand why you would need global variables, and then promptly start discussing them wrt classes. Please explain what you are trying to achieve and I'm certain that we'll come up with the best solution for your use case. -- Cheers.

Re: [Tutor] How does slicing work?

2012-06-16 Thread Mark Lawrence
rg To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor I suggest you read the tutorial before starting on source code. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscri

Re: [Tutor] Help with Matplotlib labels

2012-06-19 Thread Mark Lawrence
worth posting questions there. No probably about it, I've asked questions there and like all Python lists found them extremely friendly and helpful. -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe or c

Re: [Tutor] (no subject)

2012-06-19 Thread Mark Lawrence
key. if Eword in Edictionary: print(Edictionary[Eword]) else: print("oops But note the comparison between LBYL and EAFP - I'll leave those interested to google for it :) -- Cheers. Mark Lawrence. ___ Tutor maillist - T

  1   2   3   4   5   6   7   8   9   >