Re: [Tutor] How to print ALL contents of a scrolled Tkinter window?

2015-04-17 Thread Laura Creighton
>While I can probably make this >approach work (It *seems* conceptually simple.), I cannot help but >feel there is a much better way... Tkinter is very old software. This sort of scrolling you want was in no way common when Tkinter was new. For things like this, I just use kivy, which has the ad

Re: [Tutor] How to print ALL contents of a scrolled Tkinter window?

2015-04-17 Thread Laura Creighton
In a message of Fri, 17 Apr 2015 21:06:35 +0100, Alan Gauld writes: >On 17/04/15 15:29, Laura Creighton wrote: > >> just use kivy, which has the advantage that is runs under IOS and >> Android out of the box. > >But does Kivy support hard copy printing? >That's pret

Re: [Tutor] sample dictionairies

2015-04-19 Thread Laura Creighton
In a message of Sat, 18 Apr 2015 18:56:41 -0700, Jim Mooney writes: >Where could I download Python sample dictionaries on different subjects. >They're hard to type and I can only do small, limited ones to practice with. > >-- >Jim For randomly generating data which look like addresses, I use: htt

Re: [Tutor] lists, name semantics

2015-04-19 Thread Laura Creighton
In a message of Sun, 19 Apr 2015 17:23:13 -0500, boB Stepp writes: >On Sun, Apr 19, 2015 at 4:05 PM, Dave Angel wrote: >> abstract, and the details are unimportant to the user. For example, the >> jython system does not use addresses at all. And an object gets moved >> around from time to time w

Re: [Tutor] lists, name semantics

2015-04-19 Thread Laura Creighton
In a message of Sun, 19 Apr 2015 19:19:27 -0400, Dave Angel writes: >Good answer. The java jvm garbage collector is free to move blocks >around to defrag the free space. Correct. >FWIW, I'm told the ID value used is a simple integer, that indexes a >list containing the actual addresses. Also

Re: [Tutor] lists, name semantics

2015-04-19 Thread Laura Creighton
In a message of Sun, 19 Apr 2015 17:23:13 -0500, boB Stepp writes: >The last sentence in this paragraph has me intrigued. Why would an >object, once it has been created, be moved? What practical benefit >does doing this give? > boB If you have more than enough memory in your system, you never do t

Re: [Tutor] How to close a Tkinter window from a different thread?

2015-04-20 Thread Laura Creighton
In a message of Mon, 20 Apr 2015 08:10:38 +0100, Alan Gauld writes: >Trying to manipulate GUIs via the windowing system should always >be a last resort, it is very hard to get right. And the hardness increases exponentially if you want to be portable across different operating systems. Laura __

Re: [Tutor] OT: Is there a good book that covers the history/evolution of software? [Inspired by the thread: lists, name semantics]

2015-04-20 Thread Laura Creighton
Newman, W., Sproull, R. (1979), Principles of Interactive Computer Graphics, Mcgraw-Hill College, ISBN 0-07-046338-7 is a very good read. It is understandably dated, but then it was history that you were looking for. And the book has 2 parts -- a history of the computer architectures we had (in

Re: [Tutor] sample dictionairies

2015-04-20 Thread Laura Creighton
In a message of Sun, 19 Apr 2015 20:49:27 -0700, Jim Mooney writes: >Come to think of it, since I used | as a delimiter, what happens if you >generate a CSV file from data that already has commas in the text? > >-- >Jim In Sweden, and lots of other places, we do numbers differently. This is One

Re: [Tutor] name shortening in a csv module output

2015-04-24 Thread Laura Creighton
In a message of Fri, 24 Apr 2015 12:46:20 +1000, "Steven D'Aprano" writes: >The Japanese, Chinese and Korean >governments, as well as linguists, are all in agreement that despite a >few minor differences, the three languages share a common character set. I don't think that is quite the way to sa

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-24 Thread Laura Creighton
In a message of Fri, 24 Apr 2015 14:09:45 -0500, boB Stepp writes: >First question: What testing modules/frameworks should I start out >with? Doing a quick scan of the books I have, mention is made of >doctest and unittest modules in the Python standard libraries. But >mention is also made of two

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread Laura Creighton
In a message of Fri, 24 Apr 2015 20:24:38 -0500, boB Stepp writes: >I have joined! Great! Great! >The Python versions at work are 2.4.4 and 2.6.4(?)(Not certain about >the last digit there.) Based on responses to date, the fact that >unittest is in the standard library and that because of this mo

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-29 Thread Laura Creighton
Glad things are going better. Next step. Can you get git running on your solaris machines? Easiest is if it is already installed or if the powers that be will install it for you. But if not, you ought to be able to build your own git from source and run it on your Solaris machines. This li

Re: [Tutor] Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?

2015-04-29 Thread Laura Creighton
I forget. You are writing these things as functions rather than methods of a class, because you don't know how to use classes yet? Because you are absolutely correct that there are ways to simplify this, but if you don't know how to use classes yet, put this on hold until you do. And this partic

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-30 Thread Laura Creighton
In a message of Wed, 29 Apr 2015 23:28:59 -0500, boB Stepp writes: >The main danger as I see it is that if I am not careful, then the code >on the dev environment could diverge from the state of code on my >Windows PC, i.e., I forgot to do the scp part. But when I am actively >working on a section

Re: [Tutor] Python 2.4 (was comparison operators)

2015-04-30 Thread Laura Creighton
Python 2.4 is really old, right now. OpenCSW has 2.6.9 http://www.opencsw.org/package/python/ Any chance you could use that? Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/l

Re: [Tutor] Good Taste Question: Using SQLite3 in Python

2015-04-30 Thread Laura Creighton
The fact that _ and __ are intended as throw away values is only clear to people who have read a particular doc about coding styles. If you haven't read the doc, you don't know what is going on. I name my throw away variables junk, and if there are lots of them, for instance when I am reading fro

Re: [Tutor] Tutor Digest, Vol 135, Issue 12

2015-05-12 Thread Laura Creighton
In a message of Tue, 05 May 2015 09:55:32 +0100, Alan Gauld writes: >On 05/05/15 08:17, Siya 360 wrote: > >> Twice i unsubscribed to this mailing list, and i still continue to get them, >> why? > >The web page is the only way to unsubscribe. Nobody else >on the list can unsubscribe you. This is

Re: [Tutor] Open a Url in new tab and tab switching in IE using python and selenium

2015-05-12 Thread Laura Creighton
In a message of Wed, 06 May 2015 00:15:39 +0100, Alan Gauld writes: >On 05/05/15 19:22, shweta kaushik wrote: >> Thanks Steve for the information. >> I searched but was not able to find suitable forum to shoot this question. >> So posted here if anyone can help out. >> > >As Steve suggested the mai

Re: [Tutor] reading lines from a list of files

2015-05-14 Thread Laura Creighton
In a message of Wed, 13 May 2015 22:27:11 -0700, Alex Kleider writes: >As a follow up question: >The following seems to work- > > for f_name in list_of_file_names: > for line in open(f_name, 'r'): > process(line) > >but should I be worried that the file doesn't get explicitl

Re: [Tutor] Help with writing a bean bag toss game in python

2015-05-20 Thread Laura Creighton
e as if you were a turtle crawling around the screen? https://docs.python.org/2/library/turtle.html In either case, can you show us some code? Thanks very much, Laura Creighton ___ Tutor maillist - Tutor@python.org To unsubscribe or change subs

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Laura Creighton
In a message of Thu, 21 May 2015 15:54:20 +0100, Bod Soutar writes: >ls *.pyc *.pso >> .hidden > >should work > >root@localhost:~# mkdir hide_test >root@localhost:~# cd hide_test/ >root@localhost:~/hide_test# touch a.pyc b.pyc c.pyo d.py e.txt >root@localhost:~/hide_test# ls >a.pyc b.pyc c.pyo

Re: [Tutor] Extracting data between strings

2015-05-27 Thread Laura Creighton
In a message of Wed, 27 May 2015 10:52:40 -0400, richard kappler writes: >Windows assumes you are an idiot…Linux demands proof. We're all rolling on the floor laughing from this one. Is it original with you? Thank you. Laura ___ Tutor maillist - Tu

Re: [Tutor] Yielding from a with block

2015-05-29 Thread Laura Creighton
In a message of Fri, 29 May 2015 14:13:16 +0100, Oscar Benjamin writes: >Python 2.7.2 (1.8+dfsg-2, Feb 19 2012, 19:18:08) >[PyPy 1.8.0 with GCC 4.6.2] > >$ pypy gencm.py >Entering >End of program > >The __exit__ method was not called at all under pypy. Even if I don't >keep a reference to g outsid

Re: [Tutor] unittest with random population data

2015-05-30 Thread Laura Creighton
In a message of Sat, 30 May 2015 12:16:01 +0100, Sydney Shall writes: >MAC OSX 10.10.3 >Enthought Python 2.7 > >I am an almost beginner. > >Following advice from you generous people, I have chosen a project that >interests me, to develop some knowledge of python. >My projest is a simulation of a b

Re: [Tutor] League Secretary Application

2015-05-30 Thread Laura Creighton
In a message of Sat, 30 May 2015 13:32:09 +0100, Stephen Nelson-Smith writes: >Hello, > >I'm the league secretary for a table tennis league. I have to generate a >weekly results report, league table, and player averages, from results >cards which arrive by post or email. > >The data is of the form

Re: [Tutor] Should error checking be duplicated for both functions if one function calls another one?

2015-06-01 Thread Laura Creighton
How many layers do you expect your program to have? (And if the answer is 'a whole lot' then maybe your design needs to be reconsidered.) Dealing with the exception at the lowest level that can deal with it is usually a good idea. Also dealing with the exception at the top level, so that when ba

Re: [Tutor] Trouble using bioread to convert files from .acq to .mat

2015-06-02 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 15:50:26 -0400, Ila Kumar writes: >Hello, > >I am a new Python user attempting to use bioread ( >https://pypi.python.org/pypi/bioread/0.9.5) to convert files from >aqknowledge to matlab. I am using a 64-bit PC, and I have downloaded >Matlab, Python, numpy, scipy and

Re: [Tutor] Image library

2015-06-04 Thread Laura Creighton
In a message of Thu, 04 Jun 2015 14:09:43 -, abhijeet...@yahoo.in writes: >hello , sir i wanted to know that how can i show or display a simple image >using python 3.4The thing is that i want to know that there is no image module >or library located in the library folder under python 3.4.?sir

Re: [Tutor] Trouble using bioread to convert files from .acq to .mat (fwd)

2015-06-04 Thread Laura Creighton
Missed sending this to the list. Sorry. In a message of Wed, 03 Jun 2015 08:56:48 -0400, Ila Kumar writes: >Laura, that was it! Thank you so much. You are most welcome. > >However, now I am confused about what I need to type into the Command >prompt window (on a 64-bit windows computer, using p

Re: [Tutor] Sorting a list of list

2015-06-05 Thread Laura Creighton
In a message of Fri, 05 Jun 2015 21:16:33 +0100, Stephen Nelson-Smith writes: >As part of my league secretary program (to which thread I shall reply again >shortly), I need to sort a list of lists. I've worked out that I can use >sorted() and operator.itemgetter to sort by a value at a known posit

Re: [Tutor] Generate Prime Numbers

2015-06-10 Thread Laura Creighton
In a message of Wed, 10 Jun 2015 23:11:36 +0530, Mirage Web Studio writes: > > > >On 2015-05-31 5:04 AM, Alan Gauld wrote: >> On 30/05/15 19:14, George wrote: > >Excuse me please for replying late. > >I got lists to use the method and it is more efficient and faster. >(Takes about 10 secs to proce

Re: [Tutor] Generate Prime Numbers

2015-06-11 Thread Laura Creighton
Alas, PyPy STM only works for 64 bit linux for now. You are catching the PyPy project at the edge of its 'bleeding edge research'. We think in 1 or 2 releases windows users should be able to get it too, and I will let you know when that happens. And no promises. These sorts of things have a habi

tutor@python.org

2015-06-11 Thread Laura Creighton
In a message of Thu, 11 Jun 2015 09:25:25 -0400, Michelle Meiduo Wu writes: >Hi there, >I'm looking for a language to write test scripts for our application. I read >some document and found Pytest can be used to write simpler code compared with >using unittest in Python. Does anybody know what's

tutor@python.org

2015-06-12 Thread Laura Creighton
In a message of Fri, 12 Jun 2015 15:58:03 +1000, Cameron Simpson writes: >On 11Jun2015 18:55, alan.ga...@btinternet.com >wrote: >>On 11/06/15 14:25, Michelle Meiduo Wu wrote: >>>I read some document and found Pytest can be used to write >>> simpler code compared with using unittest in Python. >>

tutor@python.org

2015-06-12 Thread Laura Creighton
In a message of Fri, 12 Jun 2015 17:26:42 +0100, Alan Gauld writes: >I stand corrected but it still seems to me like its easier to >test in the language in which you develop. And most languages >have testing frameworks these days. Many languages have extremely poor testing frameworks. And when it

tutor@python.org

2015-06-12 Thread Laura Creighton
In a message of Fri, 12 Jun 2015 17:51:55 -0400, Michelle Meiduo Wu writes: >Yes, I also found Py.test is a good testing framework for automation testing. >Another one is Robot testing framework. It's also a testing framework based on >Python Unittest framework. >Hard to pick one to use:) pytes

Re: [Tutor] about the gui development

2015-06-13 Thread Laura Creighton
you have some local friendly talent, ask them what they recommend. I think that tkinter, for instance, is easier to use than PyQt, but if you have local PyQt experts, (and don't have tkinter experts) I would go with PyQt witout any hesitation. Best of luck, Laura Creighton

Re: [Tutor] python 3.4 documentation

2015-06-14 Thread Laura Creighton
This is working for me https://docs.python.org/3.3/download.html Where do you find the broken link? That needs fixing. Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinf

Re: [Tutor] python 3.4 documentation

2015-06-14 Thread Laura Creighton
In a message of Sun, 14 Jun 2015 15:50:38 -0700, Alex Kleider writes: >On 2015-06-14 12:36, Hilton Fernandes wrote: >> Hello, Alex ! >> >> I believe that maybe in the page >> https://docs.python.org/3/download.html > >Thank you Hilton, Laura and Peter for pointing me in the right >direction. >Bei

Re: [Tutor] python 3.4 documentation

2015-06-15 Thread Laura Creighton
In a message of Sun, 14 Jun 2015 19:59:00 -0700, Alex Kleider writes: >On 2015-06-14 17:13, Laura Creighton wrote: >> In a message of Sun, 14 Jun 2015 15:50:38 -0700, Alex Kleider writes: >>> On 2015-06-14 12:36, Hilton Fernandes wrote: >>>> Hello, Alex ! >>

Re: [Tutor] Tutor Digest, Vol 136, Issue 27

2015-06-15 Thread Laura Creighton
This doesn't quite do what you want but should give you some ideas as to how to proceed. https://mail.python.org/pipermail/tkinter-discuss/2012-January/003041.html Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opti

Re: [Tutor] Variables in email addresses

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 02:05:49 +0100, Oliver Mercer-Deadman writes: >Hi I am a complete newbie but am hoping to learn some python for a >particular project. Before I hurl myself in I would like to know if a key >element is going to be possible. > >I will need to be able to use a variable

Re: [Tutor] Help understanding list comprehensions

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 14:28:54 +0530, Anubhav Yadav writes: >Either the subject is misleading or you misunderstand something. Im am >sorry to tell you the great truth, but there was no list comprehension in >your code at all, just a list. Comprehension is what Alan wrote for you, >that

Re: [Tutor] Dynamic linking vs Static linking of libraries in python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 07:52:46 -, Velummaylum Kajenthiran via Tu tor writes: Dear Sir/MadamI know the difference between static and dynamic linking in C or C++. But what does it mean this in Python? Since it's just an interpreter, and only having one style of import mechanism of

Re: [Tutor] Help understanding list comprehensions

2015-06-18 Thread Laura Creighton
In a message of Thu, 18 Jun 2015 04:40:05 -, Anubhav Yadav writes: >So I need to create a copy of the list before trying to iterate through the >list. >Thanks a lot everyone for their answers. Er, I think you understand, but what you need to do is to make a copy of the list, and _interate thro

[Tutor] web development question

2015-06-21 Thread Laura Creighton
If you don't know javascript, and want to code your website in python, you might consider using web2py http://www.web2py.com/ With web2py a whole lot of things happen automatically for you more or less 'by magic'. Whether you consider this a really great thing because you didn't want to have to

Re: [Tutor] web development question

2015-06-21 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 20:09:54 +0100, Alan Gauld writes: >On 21/06/15 18:32, Laura Creighton wrote: >> If you don't know javascript, and want to code your website in >> python, you might consider using web2py >> >> http://www.web2py.com/ > > &g

Re: [Tutor] method conflict?

2015-07-04 Thread Laura Creighton
In a message of Thu, 02 Jul 2015 17:39:12 -0700, "Jim Mooney Py3.4.3winXP" writ es: >Okay, it appears the method in a class has its own ID, but all >instantiations of that method have identical IDs. But what happens if we >have a huge number of instantiations trying to access the identical method >

Re: [Tutor] about real-time audio synthesis and algorithmic composition

2015-07-04 Thread Laura Creighton
In a message of Sat, 04 Jul 2015 12:05:47 +0800, "Paul" writes: >Hi ! >I'm a rookie to programming, and just graduated from a conservatory of music >last year. I'm interested in real-time audio synthesis and algorithmic >composition, I can write a little bit SuperCollider and Django. I just buy a

Re: [Tutor] about real-time audio synthesis and algorithmic composition

2015-07-04 Thread Laura Creighton
In a message of Sun, 05 Jul 2015 12:18:34 +0800, "Zhongye" writes: >Thanks for your helpful reply. >I have check them, that it control SuperCollider via OSC (Open Sound Control), >and it provides with a simpler API to use those libraries. >Is that mean if I write some python scripts importing it,

Re: [Tutor] about real-time audio synthesis and algorithmic composition

2015-07-05 Thread Laura Creighton
In a message of Sun, 05 Jul 2015 12:04:42 +0800, "Zhongye" writes: >Thank for your helpful replay, I had a rough learning route. >I think I need learn some basics via the book firstly, and try to write some >code for sound using the standard library. > >I have check the link you send to me, I'm in

Re: [Tutor] Access HBase

2015-07-11 Thread Laura Creighton
In a message of Sat, 11 Jul 2015 09:01:15 -0400, Michelle Meiduo Wu writes: >Hi there, >I'm just starting to use Python. I'd like to ask which Library is good for >Python to access HBASE? > >Besides Happybase and Python HBase, is there any other one? Which is more >robotic and better functional?

Re: [Tutor] Access HBase

2015-07-12 Thread Laura Creighton
In a message of Sat, 11 Jul 2015 23:46:56 -0400, Michelle Meiduo Wu writes: >Thanks a lot! > >Do you know anything about HappyBase compared with Jython? > >Best, >Michelle I don't know anything at all about HappyBase, and next to nothing about Hadoop. But I know quite a bit about Jython. The Py

Re: [Tutor] Access HBase

2015-07-12 Thread Laura Creighton
In a message of Sun, 12 Jul 2015 12:46:15 +0200, Laura Creighton writes: >If you want >to use a library and it is written in Java, usually -- not all of the >time, but most of the time -- you can wrap it very easily, import it, >and it works. I mispoke here. Most of the time you don

Re: [Tutor] Access HBase

2015-07-12 Thread Laura Creighton
In a message of Sun, 12 Jul 2015 16:57:36 +0100, Alan Gauld writes: >On 11/07/15 14:01, Michelle Meiduo Wu wrote: >> Hi there, >> I'm just starting to use Python. I'd like to ask which Library is good for >> Python to access HBASE? > >I know next to nothing about HBase (I read the IBM blurb) but

Re: [Tutor] reading Fortran unformatted files with Python

2015-07-13 Thread Laura Creighton
In a message of Mon, 13 Jul 2015 11:14:36 -0400, Gabriele Brambilla writes: >Hi, > >I have problems reading unformatted fortran output (binary) with python. > >I have a code in fortran where I write data on a file inside a cycle: > >write(11) x,y,z,BA01(i,j,k,1),BA01(i,j,k,2),1 >BB01(i,j,k,1),BB01(

Re: [Tutor] reading Fortran unformatted files with Python

2015-07-13 Thread Laura Creighton
In a message of Mon, 13 Jul 2015 15:32:06 -0400, Gabriele Brambilla writes: >Hi, > >sorry for the confusion I understood that the Real(8) I'm using correspond >to dtype float64 in Python. >With the second method it seems to work but I get a wrong number of >elements. > >They should be grouped by 21

Re: [Tutor] How to use tkinter with a touch screen device?

2015-07-17 Thread Laura Creighton
The place to ask this question is https://mail.python.org/mailman/listinfo/tkinter-discuss but I think you are out of luck. On the other hand, kivy ought to work for you. http://kivy.org/#home I've yet to try it on a windows tablet, though. Laura __

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-17 Thread Laura Creighton
I have a plug in usb keyboard that I can just plug into my tablet. It works great for data entry. I don't know anything about windows tablets though, this is working for android. You need a usb port that is capable of being both a slave and a master. Most of them can do this these days -- if yo

Re: [Tutor] How to use tkinter with a touch screen device?

2015-07-17 Thread Laura Creighton
In a message of Fri, 17 Jul 2015 22:49:16 -0500, boB Stepp writes: >> ... On the other hand, kivy >> ought to work for you. http://kivy.org/#home I've yet to try it on >> a windows tablet, though. > >I think it was you who mentioned this GUI framework on the main python >list fairly recently. In

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-17 Thread Laura Creighton
In a message of Fri, 17 Jul 2015 23:57:01 -0500, boB Stepp writes: >But for this student assessment project, it is going to have to be >without all the desired bells and whistles to have something that will >be practically useful for her when school starts. Especially when I >am certain Vonda is s

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-19 Thread Laura Creighton
In a message of Sun, 19 Jul 2015 16:27:13 +1000, "Steven D'Aprano" writes: >I'm not sure if it runs on Macs, but it should work on Android, Windows, >and Linux, and of course it is entire Python-based. Python 2.7 only on for MacOSX. Python 3 is coming very soon. Laura _

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-19 Thread Laura Creighton
In a message of Sun, 19 Jul 2015 18:11:36 -0400, Dave P writes: >On Jul 19, 2015 5:43 AM, "Laura Creighton" wrote: >> >> In a message of Sun, 19 Jul 2015 16:27:13 +1000, "Steven D'Aprano" writes: >> >I'm not sure if it runs on Macs, but it

Re: [Tutor] Identifying V3 examples

2015-07-23 Thread Laura Creighton
s ago, and the people who like to read posts interleaved, with new content after what it refers to won. There is a current certain problem with email readers for smartphones that don't let you do this, but that's not your problem, we see. :) >Jon Paris >jon.f.pa...

Re: [Tutor] Identifying V3 examples

2015-07-23 Thread Laura Creighton
In a message of Thu, 23 Jul 2015 10:55:13 -0400, Jon Paris writes: >On Jul 23, 2015, at 10:41 AM, Steven D'Aprano wrote: >> In these sorts of technical forums, email is a discussion between >> multiple parties, not just two, often in slow motion (sometimes replies >> may not come in for a wee

Re: [Tutor] Identifying V3 examples

2015-07-23 Thread Laura Creighton
In a message of Thu, 23 Jul 2015 10:54:09 -0400, Jon Paris writes: >I’ve been posting to many different sites for twenty plus years and never had >this kind of complaint. I can’t even find a way of telling my email client >(Mac) to do it the way you want. Right now I’m manually changing every >r

Re: [Tutor] Identifying V3 examples

2015-07-23 Thread Laura Creighton
In a message of Thu, 23 Jul 2015 15:10:14 -0400, Jon Paris writes: > >Thanks for the info Laura - I don’t think I can use it though unless it >provides for activation against only one email account. For the vast majority >of my mail (this is my only usenet type group) I need it the “normal” way.

Re: [Tutor] Identifying V3 examples

2015-07-23 Thread Laura Creighton
In a message of Thu, 23 Jul 2015 16:23:29 -0400, Jon Paris writes: >Well I confess that is what I was expecting, and certainly you have been very >friendly for which I thank you. It did feel a little odd to come to a >beginners group and immediately get dumped on. > >C’est la via. I have now fou

Re: [Tutor] Identifying V3 examples

2015-07-23 Thread Laura Creighton
In a message of Thu, 23 Jul 2015 15:10:14 -0400, Jon Paris writes: >> You may find this program useful. >> http://www.macupdate.com/app/mac/40735/href=%27 >> >> But you still have to go back and trim out unnecessary verbiage. >> >> Laura > >Thanks for the info Laura - I don’t think I can use it t

Re: [Tutor] How to generate a pure tones and random noise using Python?

2015-07-25 Thread Laura Creighton
In a message of Sat, 25 Jul 2015 19:15:31 +0800, Paul Z writes: >Hi All, > >I try to train my listening by using python. (estimating the frequency of >sound) >So... Are there some way to generate a fixed frequency sound in different >waves (eg. Sine Wave, Saw Wave, Triangle Wave etc.) and differe

Re: [Tutor] _ vs. _name vs. __name vs. name_ vs. __name__ usages

2015-07-25 Thread Laura Creighton
In a message of Sat, 25 Jul 2015 16:08:03 -0500, boB Stepp writes: >After having a long discussion with my wife on her user requirements, >I am convinced that an OO approach is required. Which is just as well >as that has been one of my next areas of learning to do. I am >currently reading "Pytho

Re: [Tutor] scratching my head

2015-08-02 Thread Laura Creighton
I think people are giving you sub-optimal advice. Python has a module in the standard library for doing exactly what you want to do -- match files with certain extensions. See: https://docs.python.org/2/library/fnmatch.html It's unix style file matching, but I am fairly certain this works on win

Re: [Tutor] infix to postfix eval

2015-08-03 Thread Laura Creighton
Hi Anish. I wanted to let you know something I found out last week. Even when you select plain text email, gmail will mangle any lines of text starting with one or more '>' marks. So when you write: >>> import string >>> string.uppercase 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' >>> string.digits

Re: [Tutor] question / decision tree

2015-08-03 Thread Laura Creighton
est them yourself, and we can help with getting the code to work, if you need help with that. If, on the other hand, machine learning is new to you, you will need to understand more about that first, and will probably need a textbook. The Russell and Norvig book is very good, but there are other

Re: [Tutor] scratching my head

2015-08-03 Thread Laura Creighton
In a message of Mon, 03 Aug 2015 18:22:32 +1000, Cameron Simpson writes: >That depends. This is the tutor list; we're helping Clayton debug his code as >an aid to learning. While it's good to know about the facilities in the >standard library, pointing him directly at fnmatch (which I'd entirely

Re: [Tutor] scratching my head

2015-08-05 Thread Laura Creighton
In a message of Wed, 05 Aug 2015 08:43:45 +0200, Peter Otten writes: >Laura Creighton wrote: >but I don't think that's simpler. Can you enlighten me? When I got here, I landed in the middle of a discussion on how to use regexps for solving this. Plus a slew of string handling fu

Re: [Tutor] question / decision tree

2015-08-05 Thread Laura Creighton
In a message of Mon, 03 Aug 2015 10:38:40 +0100, matej taferner writes: >Or maybe should I go with the tkinter? You have to decide whether what you want is a Stand Alone GUI Application (in which case tkinter could be a fine idea) or a web app. It sounds to me as if you want your customers to nav

Re: [Tutor] How can this code be made even better ?

2015-08-06 Thread Laura Creighton
In a message of Thu, 06 Aug 2015 11:24:21 +0545, Aadesh Shrestha writes: >import re > >text = input('Enter your text with phone number using xx-xxx format \n') >contact = re.compile(r'\d\d-\d\d\d\d\d\d\d') > >for i in range(len(text)): >chunk = text[i:i+10] >mo = contact.search(chunk) >

Re: [Tutor] how to define constant width errorbars on log-log plot

2015-08-06 Thread Laura Creighton
In a message of Thu, 06 Aug 2015 12:41:22 -0300, Colin Ross writes: >Does anyone have an example code that shows how to plot errorbars with a >constant line width for a dataset on a log log plot? Thank you. Assuming you want to use matplotlib (there are other python programs that do this) see: h

Re: [Tutor] Python Certifications

2015-08-08 Thread Laura Creighton
This page is relevant: https://wiki.python.org/moin/PythonTraining Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Speech Recognition (was Help)

2015-08-10 Thread Laura Creighton
Shannon Callahan, I found this blog post: https://wolfpaulus.com/jounal/embedded/raspberrypi2-sr/ Looks like this person is using CMUs Sphinx to do the speech recognition stuff. Maybe this is what you are looking for? Laura ___ Tutor maillist - Tuto

Re: [Tutor] Refresh library imported

2015-08-11 Thread Laura Creighton
If you have an .ipython config file, and these lists aren't empty, just add '%autoreload 2' and 'autoreload' to whatever already is there. Hope this helps, Laura Creighton ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Need advise on protein sequence alignment code in python 2.7 giving wrong output

2015-08-11 Thread Laura Creighton
You posted incomplete code -- at any rate I cannot get it to work. However, I think the problem is here: for i in xrange(len(v)): for j in xrange(len(w)): if max(S[i][j-1],S[i-1][j],S[i-1][j-1]) == S[i-1][j]: When j is 0, j-1 refers to the end of the list, which makes no

Re: [Tutor] Need advise on protein sequence alignment code in python 2.7 giving wrong output

2015-08-11 Thread Laura Creighton
I wrote: >>> nwalign.global_align("PLEASANTLY", "MEANLY", gap_open=-5, gap_extend=-5, matrix='./BLOSUM62.txt') >>> ('PLEASANTLY', '-MEA--N-LY') I forgot to mention that I got my BLOSUM62.txt from http://www.ncbi.nlm.nih.gov/Class/FieldGuide/BLOSUM62.txt in case that matters. Laur

Re: [Tutor] How to effectively use a Student class with SQLite [Was Re: How to design object interactions with an SQLite db?]

2015-08-13 Thread Laura Creighton
If your students need to provide a unique email address, then that is a possibility to use to distinguish between ones with the same name. In Sweden, where this is known as the 'Anders Andersson' problem (that being the most common name in Sweden, and any organisation with more than a handful of me

Re: [Tutor] How to effectively use a Student class with SQLite [Was Re: How to design object interactions with an SQLite db?]

2015-08-14 Thread Laura Creighton
In a message of Thu, 13 Aug 2015 23:42:33 -0500, boB Stepp writes: >Many of my wife's students do have their own email accounts, but, >alas, not all of them. I have not totally thought this through yet, >but the student data will include their parents' names and some of >their data. But it will b

Re: [Tutor] cannot get a label message to display immediately

2015-08-14 Thread Laura Creighton
In a message of Fri, 14 Aug 2015 11:32:59 -0500, Bill Allen writes: >I am working in Tkinter. The scenario is that I click a button that >starts a function running. No problem there. However, the function may >take some time to run and I do not want the user to be worried. I am >wanting to

Re: [Tutor] try and file existence

2015-08-15 Thread Laura Creighton
In a message of Sat, 15 Aug 2015 14:24:21 -0500, boB Stepp writes: >I understand your points, but wonder then what is the intended use for >os.path.exists()? That is, in what types of circumstances would it be >both appropriate and safe to use? > >boB If you want to locate dangling symlinks, os.

Re: [Tutor] variable naming conventions

2015-08-16 Thread Laura Creighton
In a message of Sat, 15 Aug 2015 18:24:53 -0700, D Wyatt writes: >It seems every book I read these days uses camel case for variable names in >Python. I was once told that using underscores is preferred. Is there a >preference in the Python community or does it really matter? I'd like to >instil

Re: [Tutor] try and file existence

2015-08-16 Thread Laura Creighton
In a message of Sat, 15 Aug 2015 15:20:19 -0700, "Clayton Kirkwood" writes: >> If you want to locate dangling symlinks, os.path.exists will return >False, so >> the symlink is there, but the file it pointed to is long gone. > >Can't you do that with os.path.open() and get a value in os.path.status

Re: [Tutor] Where should unit test files go in a project directory structure and some related questions?

2015-08-16 Thread Laura Creighton
In a message of Sun, 16 Aug 2015 18:45:31 +0100, Alan Gauld writes: >On 16/08/15 16:41, Alex Kleider wrote: > >>> - src the code >>> -- lang folder per language used - sql, python, C, bash, etc >>> --- lib modules/packages - subfolder per package >>> --- test test code - sub-tree

Re: [Tutor] Where should unit test files go in a project directory structure and some related questions?

2015-08-16 Thread Laura Creighton
In a message of Sun, 16 Aug 2015 12:46:59 -0700, Alex Kleider writes: >On 2015-08-16 10:45, Alan Gauld wrote: > >> Thee are several options. >> 1) create links from, main to the test files needed >> 2) alter sys.path so imports can see the test folder >> 3) alter the PYTHONPATH environment var > >>

Re: [Tutor] pip install in a virtualenv *without* internet?

2015-08-18 Thread Laura Creighton
In a message of Tue, 18 Aug 2015 20:10:15 -, Albert-Jan Roskam writes: >So I would like to pip install a openpyxl AND its specific dependencies in a >virtualenv. >The problem is that I can't use pip to download the packages from Pypi because >I do not have a regular internet connection. Is t

Re: [Tutor] About using list in a function

2015-08-19 Thread Laura Creighton
In a message of Wed, 19 Aug 2015 18:25:56 +0100, Alan Gauld writes: >On 19/08/15 17:09, Michelle Meiduo Wu wrote: >> Hi there, >> I'm trying to use List in a function. But it doesn't work. Here are sample >> code not work: ---def getResult():ls >> = []l

Re: [Tutor] About using list in a function

2015-08-19 Thread Laura Creighton
Scrambled in the archives, too https://mail.python.org/pipermail/tutor/2015-August/106528.html And looks like something thought it would be best as only one line of text. Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] About using list in a function

2015-08-19 Thread Laura Creighton
In a message of Thu, 20 Aug 2015 00:37:17 +0100, Alan Gauld writes: >On 19/08/15 18:25, Alan Gauld wrote: >> On 19/08/15 17:09, Michelle Meiduo Wu wrote: >>> Hi there, >>> I'm trying to use List in a function. But it doesn't work. Here are >>> sample code not work: -

Re: [Tutor] Request for help with os.walk() combining os.path.ismount() in Linux

2015-08-20 Thread Laura Creighton
In a message of Thu, 20 Aug 2015 09:25:29 +0100, Alan Gauld writes: > >It always amazes me how often the same issues come up in >rapid succession. We must have had 4 or 5 of these types >of errors in the last couple of months, and other times >we go for 6 months or more without it being raised! :-)

Re: [Tutor] Do not understand why test is running.

2015-08-21 Thread Laura Creighton
In a message of Fri, 21 Aug 2015 06:26:11 -0700, Alex Kleider writes: >On 2015-08-20 23:16, Peter Otten wrote: > > >> Yea, breaking things is an art form ;) > > >> $ python3 -m unittest -h >> usage: python3 -m unittest [-h] [-v] [-q] [-f] [-c] [-b] [tests [tests >> ...]] >> >. >> >> For test

Re: [Tutor] Can someone explain this to me please

2015-08-21 Thread Laura Creighton
In a message of Fri, 21 Aug 2015 14:04:18 -0400, Jon Paris writes: >This code: > >import sys >x = sys.maxsize >print ("Max size is: ", x) >y = (x + 1) >print ("y is", type(y), "with a value of", y) > >Produces this result: > >Max size is: 9223372036854775807 >y is with a value of 9223372036854775

  1   2   >