[Tutor] Where to store test-code?

2019-06-13 Thread Thomas Güttler
there are several ways. I know that all these ways work. Nevertheless it would be great to have a sane default. If there is a guideline IDEs could assist to create new tests at a common location. Related: https://youtrack.jetbrains.com/issue/JT-53069 Regards, Thomas -- Thomas Guettler http

[Tutor] Iterating through a list of strings

2010-05-02 Thread Thomas C. Hicks
n't understand about processing the items in the list and using the string function x.startswith() and the list function list.remove(). Interestingly if I put in "print x" in place of the lines.remove(x) line I get all the comment lines printed. Can anyone point m

Re: [Tutor] Iterating through a list of strings

2010-05-04 Thread Thomas C. Hicks
Wow, this is great! I appreciate all the pointers, lots to keep learning here. thomas ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Suggestions for output on multiple platforms

2010-06-29 Thread Thomas C. Hicks
m not sure it will be readable under Mac and Windows. Any ideas are welcome! thomas ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help return a pattern from list

2010-07-05 Thread Thomas C. Hicks
.mp3 extension. How to > go about doing this? > > Thanks > Vin I use the fnmatch module: import fnmatch fileList = ["something1.mp3","something2.mp3","something4.pdf","something5.odt"] pattern='*.mp3' for x in fnmatch.filter(fileList

Re: [Tutor] string to list

2010-08-05 Thread Thomas C. Hicks
On Thu, 5 Aug 2010 03:40:55 -0400 Sander Sweers wrote: > On 5 August 2010 06:38, Vikram K wrote: > > Suppose i have this string: > > z = 'AT/CG' > > > > How do i get this list: > > > > zlist = ['A','T/C','G'] > > If you know the format of the string is always the same you can do > something lik

Re: [Tutor] how to do excel in python

2010-08-05 Thread Thomas C. Hicks
On Thu, 5 Aug 2010 10:08:59 -0400 invincible patriot wrote: > hi, > can any one tell me how can I access MS excel worksheet in python and > how can I access itz individual cells..?? > I have had good luck with the xlrd and xlwt modules, you can get them at www.python-excel.org. The Google

Re: [Tutor] While Loops: Coin Flip Game :p:

2010-11-14 Thread Thomas C. Hicks
On Sun, 14 Nov 2010 17:16:36 -0500 Dawn Samson wrote: > Greetings, > > I'm a Python beginner and working my way through Michael Dawson's > Python Programming for the Absolute Beginner. I'm stuck in a > particular challenge that asks me to write a program that "flips a > coin 100 times and then t

[Tutor] implementing a table data structure in python?

2004-12-20 Thread Thomas Clive Richards
Hi, I'm trying to implement a reasonably efficient table data structure, but ith a few quirks... The application I'm building is a CGI program which allows users to view a large table of data. In addition, users can restrict the data shown. Some sample data might look like this: (note you'll

Re: [Tutor] implementing a table data structure in python?

2004-12-21 Thread Thomas Clive Richards
On Wednesday December 22 2004 11:58 am, Alan Gauld wrote: > > Hows about a dictionary of lists. A key per column. The > users pick which columns and you retrieve the lists. And > of course shelve will treat a file like a dictionary... > Ahhh that's better.. I guess I should clarify: it's not

[Tutor] (no subject)

2005-01-08 Thread Jeffrey Thomas Peery
Hello I can’t seem to get the IDLE to start up in my windows XP by clicking on the desktop icon. To start it I have to drop a .py file on the icon. Any ideas?   Also I can’t seem to get xp to recognize .py files belonging to python. Right now the icons for .py is a windows default and not

[Tutor] XP and python 2.4, some progress

2005-01-08 Thread Jeffrey Thomas Peery
I wasn’t able to get the IDLE started in windows XP. I had it working then I upgraded to 2.4, then it didn’t work so I switched back to 2.3, still didn’t work so I’m back to 2.4.  I did some looking around and I was able to get the IDLE started by setting the shortcut on my desktop to:  

[Tutor] extracting matches by paragraph

2006-10-11 Thread Thomas A. Schmitz
this, in a proper format, to a bibtex file. If a paragraph does not provide a value for a particular key, I could then, in a second pass over the bibtex file, delete these lines. But that means I first have to match and extract the values from my parapgraphs. What am I doing wrong? Or

Re: [Tutor] extracting matches by paragraph

2006-10-11 Thread Thomas A. Schmitz
On Oct 11, 2006, at 2:48 PM, Kent Johnson wrote: > Thomas A. Schmitz wrote: >> On Oct 11, 2006, at 12:06 PM, Kent Johnson wrote: >> >>> I would take out the join in this, at least, and return a list of >>> lines. You don't really have a paragraph, you have

[Tutor] SOAPpy and ZSI

2008-03-26 Thread Dan Thomas-Paquin
Hi, I've been tasked with setting up a basic SOAP client and I'm its been the most frustrating python experience. Here's the code: from LoginService_services import * import sys from SOAPpy import SOAPProxy # get a port proxy instance loc = LoginServiceLocator() port = loc.getLogin(in0='pbs_uen',

Re: [Tutor] voluntary work :p:

2011-04-25 Thread Thomas C. Hicks
On Mon, 25 Apr 2011 15:09:02 -0400 Rafael Durán Castañeda wrote: > I recommend you visit > www.pythonchallenge.com > > On 25/04/11 20:42, Wolf Halton wrote: > "Learn Python the Hard Way" is pretty cool. I am always looking for > books that lay it out well. Thank

[Tutor] IDLE/tk in 10.6

2011-07-15 Thread Luke Thomas Mergner
Hi, I am not a professional programmer, but just trying to learn. I'm running Mac 10.6 Snow Leopard. I used MacPorts to install python26, python27, and python3. My python interpreter loads 2.7.2 after I ran the python_select command, which is added via MacPorts I think. I'd like to try IDL

[Tutor] Logger object not passed between modules

2011-07-25 Thread Luke Thomas Mergner
gger. self.logger = logging.getLogger('Frame') # The argument shouldn't matter, as I follow the examples. print self.logger self.logger.info('In frame __init__, the size is : ', self.GetSize) $ python app.py --The log prints -- 2011-07-26 01:39:07,642 - Main - INFO

Re: [Tutor] Assigning range :p:

2011-07-27 Thread Thomas C. Hicks
On Wed, 27 Jul 2011 20:16:31 -0400 Alexander Quest wrote: > Does anyone know how to assign a certain numerical range to a > variable, and then choose the number that is the middle of that > range? For example, I want to assign the variable "X" a range between > 1 and 50, and then I want to have t

[Tutor] Wading through traceback output

2011-12-26 Thread Thomas C. Hicks
rror: More than 4094 XFs (styles) I don't understand this very well at all - any pointers are appreciated. I think what it is saying is that there is a problem with my Python libraries but this is not a problem I have ever seen before. Is it possible the 2.6 libraries were updated in t

Re: [Tutor] Wading through traceback output :p:

2011-12-26 Thread Thomas C. Hicks
On Mon, 26 Dec 2011 07:10:45 -0500 Alan Gauld wrote: > On 26/12/11 11:42, Thomas C. Hicks wrote: > > Given it was working before and not now the obvious question is what > has changed? It looks like you are on a Linux box so do you have > automatic updates switched on? Or do

[Tutor] Debugging While Loops for Control

2012-02-15 Thread Luke Thomas Mergner
Hi, I've been translating and extending the Blackjack project from codeacademy.com into Python. My efforts so far are here: https://gist.github.com/1842131 My problem is that I am using two functions that return True or False to determine whether the player receives another card. Because of th

Re: [Tutor] Debugging While Loops for Control

2012-02-16 Thread Luke Thomas Mergner
> > -- > > Message: 1 > Date: Wed, 15 Feb 2012 23:57:08 -0500 > From: Luke Thomas Mergner > To: tutor@python.org > Subject: [Tutor] Debugging While Loops for Control > Message-ID: > Content-Type

[Tutor] Datetime objects

2012-03-16 Thread Luke Thomas Mergner
Hi, I am having trouble comparing two datetime objects. Using Sqlalchemy I save a string as a date into an sqlite field (which has no native date format, I gather). > import datetime as dt > date_obj = dt.datetime.strptime(date_string,'%m.%d.%Y') I want to compare that date later with an inp

[Tutor] Displaying data in columns

2012-05-07 Thread Thomas C. Hicks
? I know I could write a function that reads the items, figures string lengths, adds padding white space and prints out the columns but am hoping there is a more elegant solution. I am not against reading documentation, just can't find the right module to read about. thomas ___

Re: [Tutor] How to output dictionary data to CSV file :p:

2015-04-28 Thread Thomas C. Hicks
for! Thanks, apparently my knowledge deficit is in understanding dictionary methods. >How rude of me, I neglected to note I am using Python 3.4.3. And now you're top-posting to make it even worse;) Lesson learned! thomas ___ Tutor maillis

Re: [Tutor] How to output dictionary data to CSV file :p:

2015-04-28 Thread Thomas C. Hicks
On 04/28/2015 09:43 PM, Alan Gauld wrote: You could consider JSON too. JSON looks a lot like a Python dictionary of strings so is almost a perfect match to your data. Sounds great, I'll check it out. Thanks! thomas == Thomas C. Hicks, MD, MPH Training Ma

Re: [Tutor] Integrating TDD into my current project work-flows :p:

2015-05-05 Thread Thomas C. Hicks
Django development really drove that idea and its implementation home for me. I believe the user story idea first shows up in chapter 2 of the book. thomas ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.pyth

Re: [Tutor] creat a program that reads frequency of words in file :p:

2015-06-01 Thread Thomas C. Hicks
On 06/01/2015 05:56 PM, Alan Gauld wrote: if text in line: count += 1 print("This word appears", count, "times in the file") And this is, of course, completely off track. You need to split the line into its separate words and store each word into the dictionary. OP may want

Re: [Tutor] Pytest help :p:

2015-07-07 Thread Thomas C. Hicks
gt; mailing list is outstanding, civil, knowledgable people really wanting to help. == Thomas C. Hicks, MD, MPH Training Manager, Gansu Gateway Lanzhou, Gansu, PR China ___ Tutor maillist - Tutor@python.org To unsubscrib

Re: [Tutor] Create complex dictionary :p:

2015-10-22 Thread Thomas C. Hicks
On 10/23/2015 05:19 AM, jarod_v6--- via Tutor wrote: Hi!!I would like to prepare a dictionary with complex structure: complex = {name ="value",surname="po",age=poi) What is the most pythonic way to build a dictionary of dictionary?thanks for any help! This doesn't look too complex so I am

Re: [Tutor] Create complex dictionary :p: :p:

2015-10-22 Thread Thomas C. Hicks
On 10/23/2015 05:59 AM, Alex Kleider wrote: mydict = dict('name'='value', 'surname'='po','age'='poi') Oops, you are correct! Don't want to put the key names in quotes, I mistyped my experiment. SDG, tom ___ Tutor maillist - Tutor@python.org To uns

Re: [Tutor] Recommendations for best tool to write/run Python :p:

2016-03-03 Thread Thomas C. Hicks
Matt, As a physician myself just getting into the world of teaching computer programming I would be very interested to know what you teach to the doctors. Feel free to reply off list, would love to discuss this! === Thomas C. Hicks, MD, MPH Training Manager Gansu Gateway

Re: [Tutor] Recommendations for best tool to write/run Python :p:

2016-03-03 Thread Thomas C. Hicks
used Ipython (now Jupyter) for teaching my kids programming in middle and high school. === Thomas C. Hicks, MD, MPH Training Manager Gansu Gateway, Lanzhou, Gansu ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] Practice Exercises for Beginner ? :p:

2016-06-03 Thread Thomas C. Hicks
On Jun 2, 2016, at 16:43, Andrei Colta wrote: Hi, Anyone can recommend practical work on learning python.. seems reading and reading does not helping. Thanks in advance, Andrei I would echo those saying "make something" - for me the thing that really moved me forward was doing a data projec

[Tutor] writing effective unittests

2013-01-02 Thread Luke Thomas Mergner
good tutorial that I've missed. Based on the O'Reilly 2-Part introduction, I hope that learning to write tests will make my code better. Thanks, -- Luke Thomas Mergner Glendale, CA Sent from Mutt. ___ Tutor maillist - Tutor@python.org

Re: [Tutor] writing effective unittests

2013-01-03 Thread Luke Thomas Mergner
* Albert-Jan Roskam wrote: > > > > Hi, > > > > > I am trying to learn a bit of test-driven programming using unittests and > > nosetests. I am having trouble finding resources that explain how to write > > effective tests. I am not a programmer or a student, so I do not have > > access to

[Tutor] Next steps after creating virtualenv (new github project)?

2019-03-03 Thread Thomas Güttler Lists
nv/bin I want to store my small project in git and upload it to github later. What is the best practice for the directory layout? Are there (official) docs how to start a new project after creating the virtualenv? Regards,   Thomas Güttler -- Thomas Guettler http://www.thomas-guettle

Re: [Tutor] Lucky Boy Sudhir wants to chat

2008-12-17 Thread Williams, Thomas (DSHS/RDA)
Thank you Tom -Original Message- From: Kent Johnson [mailto:ken...@tds.net] Sent: Wednesday, December 17, 2008 6:52 AM To: Lucky Boy Sudhir Cc: tutor@python.org Subject: Re: [Tutor] Lucky Boy Sudhir wants to chat I have unsubscribed Lucky Boy from the list as he is just spamming it. Ken

<    1   2