Re: [Tutor] trying to translate and ebcidic file

2011-06-15 Thread Mark Tolonen
here to start? There are a couple of EBCDIC codecs (see list of codecs in http://docs.python.org/library/codecs.html). Try:open('file.txt').read().decode('ibm500').encode('ascii','replace') You'll get '?' for chars ascii doesn't

Re: [Tutor] Socket Programming issue

2011-06-21 Thread Mark Tolonen
accept inside the loop the script will pause waiting for a different client to connect, and won't continue reading the data from the original client. -Mark while 1: client, addr =s.accept() data=client.recv(size) if data: p

Re: [Tutor] [python-win32] Good Book

2011-07-25 Thread Mark Curphey
I strongly recommend Thinking in Python - http://www.greenteapress.com/thinkpython/thinkpython.html I recently wrote a blog about my experiences learning - http://www.curphey.com/2011/07/learn-core-python-in-a-week-my-way/ Sent from my iPhone On Jul 25, 2011, at 5:27 PM, Bill Allen wrote: >>

Re: [Tutor] Input

2011-09-30 Thread Mark Lybrand
There is apparently a livewires package that may be of someuse. On Sep 30, 2011 1:25 PM, "Dave Angel" wrote: > On 09/30/2011 03:24 PM, Cameron Macleod wrote: >> Hi, >> >> When you type >> >> Input("\n\nPress The Enter Key To Exit") >> >> it forces you to press the enter key to close the program. W

[Tutor] The Perennial 3.2 vs 2.7

2011-11-17 Thread Mark Lybrand
in 2.x? Note that I am an experienced programmer, albeit in curly-brace languages (Perl, Java, C#, HTML/CSS/JavaScript), so that will probably count in my favor. But y'all would know better than I if there are significant issues that I will need to overcome conceptually. --

[Tutor] Fwd: Re: The Perennial 3.2 vs 2.7

2011-11-19 Thread Mark Lybrand
Whoops. Hit reply only again. Sorry terry. -- Forwarded message -- From: "Mark Lybrand" Date: Nov 19, 2011 11:02 AM Subject: Re: [Tutor] The Perennial 3.2 vs 2.7 To: "Terry Carroll" Based on what everyone has said and the fact that my learning material is f

[Tutor] Is there a way to add paths in Eric?

2011-11-20 Thread Mark Lybrand
I am using Windows Vista. I have some python scripts I have been developing in my learning folder. Can I add the path to the folder in eric to call them interactively, or will I need to move them? -- Mark :) ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Is there a way to add paths in Eric?

2011-11-20 Thread Mark Lybrand
Okay, I have answered my own question import sys sys.append() Sorry for bothering. Mark On Sun, Nov 20, 2011 at 6:21 PM, Mark Lybrand wrote: > I am using Windows Vista. I have some python scripts I have been > developing in my learning folder. Can I add the path to the folder i

[Tutor] Critique and Question

2011-11-28 Thread Mark Lybrand
.path.join(file_root, this_file), mode='w', encoding='utf-8') as a_file: a_file.write(data) -- Mark :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Critique and Question

2011-11-28 Thread Mark Lybrand
just be 'w'-ing. I will look when I get home. Thanks Mark Also a little bummed that subprocess module doesn't appear to work on windows. I probably (hopefully) won't need it, but it still bums me. On Nov 28, 2011 4:27 AM, "Dave Angel" wrote: > On 11/28/2011 04

Re: [Tutor] Critique and Question

2011-11-28 Thread Mark Lybrand
Just so y'all know, I replaced all the urlopen, read, write, nonsense with the following: urllib.request.urlretrieve(url_root + this_file, os.path.join(file_root, this_file)) and it's all good :) Mark ___ Tutor maillist - Tutor@pyt

[Tutor] useful function or reinventing the wheel??

2011-11-28 Thread Mark Lybrand
ath[0]) del(grow_path[0]) return(dir) Opinions? What should I really be using? -- Mark :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] useful function or reinventing the wheel??

2011-11-28 Thread Mark Lybrand
it recursively based on your suggestion, even though long term, I will just make use of os.makedirs, since that was what I was re-inventing. thanks > > > -- > > DaveA > > -- Mark :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] useful function or reinventing the wheel??

2011-11-29 Thread Mark Lybrand
ably not worry too much about permissions and failures, but I can appreciate the need for such checks, should I decide to keep this for more widespread use. Thanks again. I will send my solution when I get a chance to get back to it (gotta get myself ahead in machine learning before the weekend ge

[Tutor] Programming Collective Intelligence Study Group

2011-11-29 Thread Mark Lybrand
a heads up when I get everything all set up. -- Mark :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Programming Collective Intelligence Study Group (Mark Lybrand)

2011-11-29 Thread Mark Lybrand
) On Tue, Nov 29, 2011 at 1:44 AM, wrote: > Hey Mark > > Id be very much interested in this. While I mostly lurk on the python > mailing list and have only dabbled in a few quick scripts. Then I wouldnt > mind getting deeper into via a collective group. > > This is the firs

Re: [Tutor] Programming Collective Intelligence Study Group

2011-11-29 Thread Mark Lybrand
hesitate to express your concerns via the list or to me personally, either by email or on Facebook (just kidding). Mark ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Treating lists as lists

2011-11-29 Thread Mark Lybrand
I am pretty sure I saw this somewhere but now I can't. Here's the problem: list = ['hello', 'world'] template = '%s %s' print template % list But it appears that list is just one (list) when I want to treat it as two (items). I can d

Re: [Tutor] Treating lists as lists

2011-11-29 Thread Mark Lybrand
Thanks everyone. Right before quitting time my brain froze up :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Programming Collective Intelligence Study Group

2011-11-29 Thread Mark Lybrand
I am thinking maybe the AI reddit group, AIQUS and the forum on the AI class site. Others? Mark ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python Saved the Day

2011-12-04 Thread Mark Lybrand
me do my data analysis. I was able to sort through all the issues, develop a corrective action plan and verify its accuracy, all in Python. Plan was successfully implemented at 6PM today and all is well again. It was a good week. -- Mark :) ___ Tutor

[Tutor] Fwd: Python Saved the Day

2011-12-04 Thread Mark Lybrand
Forgot to include the list. Sorry. -- Forwarded message -- From: Mark Lybrand Date: Sun, Dec 4, 2011 at 12:59 AM Subject: Re: [Tutor] Python Saved the Day To: wesley chun The quick process of trying out different ideas, first in IDLE and then in script was a biggie. List

[Tutor] TypeError in class destructor

2011-12-10 Thread Mark Lybrand
: self.out_old = sys.stdout sys.stdout = self.out_new def __exit__(self): sys.stdout = self.out_old print('A') with open('out.log', mode='w', encoding='utf-8') as a_file, RedirectStdoutTo(a_file): print('B') print('C') --

Re: [Tutor] TypeError in class destructor

2011-12-10 Thread Mark Lybrand
def __exit__(self, *args): Thanks guys. This is the solution I implemented and it works great. Mark :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] ez_setup.py for Python3 64-bit on Vista

2011-12-31 Thread Mark Lybrand
I have found this script: http://peak.telecommunity.com/dist/ez_setup.py<http://pypi.python.org/pypi/setuptools> But I can see that this is Python 2.x Is there a Python 3 version, or should I be doing something else to install an .egg on my system? Thanks in advance. --

Re: [Tutor] ez_setup.py for Python3 64-bit on Vista

2011-12-31 Thread Mark Lybrand
er is "yes". In which case, if those pip files are in my Download folder, will the easy install put them in the right place or reference them from the Download folder? Mark ___ Tutor maillist - Tutor@python.org To unsubscribe or change su

Re: [Tutor] ez_setup.py for Python3 64-bit on Vista

2011-12-31 Thread Mark Lybrand
I think I got it actually. Thanks. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] want to chat with someone - phone, skype, or email

2012-01-02 Thread Mark Lybrand
ome more info on python as one after another problem gets solved. If you don't have an immediate problem make one. One final idea would be to google "python challenge". One problem after another to complete a sort of scavenger hunt. Mark _

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
/mailman/listinfo/tutor This sums up the Python philosophy. C:\Users\Mark\cpython\PCbuild>py -3.2 -c "import this" The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat i

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] Teaching an 8-year-old programming.

2012-05-20 Thread Mark Lybrand
Have you considered this book: http://www.amazon.com/Hello-World-Computer-Programming-Beginners/dp/1933988495 Mark On Sun, May 20, 2012 at 2:41 PM, boB Stepp wrote: > On Sun, May 20, 2012 at 4:15 PM, Devin Jeanpierre > wrote: >> I've heard remarkable

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.

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