Re: Detection of a specific sound

2015-11-03 Thread William Ray Wing
> On Oct 25, 2015, at 8:17 PM, Montana Burr wrote: > > I'm looking for a library that will allow Python to listen for the shriek of > a smoke alarm. Once it detects this shriek, it is to notify someone. Ideally, > specificity can be adjusted for the user's environment. For example, I expect >

Re: What does “grep” stand for?

2015-11-06 Thread William Ray Wing
> On Nov 5, 2015, at 10:36 PM, Larry Hudson via Python-list > wrote: > > On 11/05/2015 05:18 PM, Dennis Lee Bieber wrote: >> On Thu, 5 Nov 2015 20:19:39 + (UTC), Grant Edwards >> declaimed the following: >> >>> Though I used a line-editor for a while on VMS, I was never very good >>> at i

Re: Writing a Financial Services App in Python

2015-11-19 Thread William Ray Wing
> On Nov 19, 2015, at 6:59 AM, Cai Gengyang wrote: > > > From YCombinator's new RFS, This is the problem I want to solve as it is a > severe problem I face myself and something I need. I want to write this app > in Python as I heard that Python is a great language that many programmers > use

Re: Python ORM library for distributed mostly-read-only objects?

2014-06-23 Thread William Ray Wing
On Jun 23, 2014, at 12:26 AM, smur...@gmail.com wrote: > On Sunday, June 22, 2014 3:49:53 PM UTC+2, Roy Smith wrote: > >> Can you give us some more quantitative idea of your requirements? How >> many objects? How much total data is being stored? How many queries >> per second, and what is th

Re: What use with Python

2014-07-01 Thread William Ray Wing
On Jul 1, 2014, at 6:56 PM, rxjw...@gmail.com wrote: > Hi, > > I am new to Python. Weeks ago, I was asked about Python questions on an > interview. > Now I want to learn Python, but I do not know what I can do with it on a PC. > Especially I would like to do something interesting instead of som

Re: cx_freeze and temporary files - security related question

2014-07-06 Thread William Ray Wing
On Jul 6, 2014, at 9:21 AM, Richard Damon wrote: > On 5/21/14, 12:42 PM, Nagy László Zsolt wrote: >> I need to create an application for Windows 7 that runs from a flash >> drive. This program would be used to create remote backups of the >> pendrive. The pendrive contains sensitive data, so whe

Re: Does python support ATL Modelling Language?

2014-07-09 Thread William Ray Wing
On Jul 9, 2014, at 4:38 AM, varun bhatnagar wrote: > Hi, > > I am trying to shift my application from JAVA to Python and in JAVA I am > using ATL Transformations (modelling techniques). Is it possible to do that > with Python, does python support ATL Transformations. If not is there any > API

Re: newbee

2014-08-13 Thread William Ray Wing
On Aug 13, 2014, at 9:57 AM, alister wrote: > On Wed, 13 Aug 2014 15:13:34 +0200, Mok-Kong Shen wrote: > >> Am 13.08.2014 13:55, schrieb alister: >> [snip] >> >> A related question: How could one write a Python program and have it run >> on a mobile phone in general (independent of a PC)? >> >

Re: Python makes Dilbert's list

2014-08-24 Thread William Ray Wing
On Aug 24, 2014, at 7:18 PM, Terry Reedy wrote: > For Sunday, Aug 24, 2014. > http://www.dilbert.com/dyn/str_strip/0//000/20/2/5000/500/225504/225504.strip.sunday.gif > — And at the risk of straying a bit OT, here is what Dilbert should have pointed his boss at wrt s

Re: Small World Network model random data generation

2014-08-26 Thread William Ray Wing
On Aug 26, 2014, at 9:23 AM, Dennis Lee Bieber wrote: > On Tue, 26 Aug 2014 12:16:33 +0200, lavanya addepalli > declaimed the following: > >> How can i generate a random data that is identical to my realworld data >> > > By definition, "random data" will be unlikely to ever be "identica

Re: running a python program

2014-08-27 Thread William Ray Wing
On Aug 27, 2014, at 9:42 AM, ngangsia akumbo wrote: > i have written a small scripts in python that inputs two values and prints > out the sum. > > Ok i want to be able to install this program on a windows 8 machine and run > it as a normal program. > > i want to be able to run it to any wind

Re: python script monitor

2014-09-15 Thread William Ray Wing
On Sep 15, 2014, at 8:07 PM, Nicholas Cannon wrote: > I have made an app that is not fully stable and I would like to monitor the > performance of the app and try and improve the speed of it. I tried to use > the activity monitor on the mac but what I want I'm to see how much ram, cup > and ot

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread William Ray Wing
On Oct 11, 2014, at 3:20 PM, Dennis Lee Bieber wrote: > On Sat, 11 Oct 2014 16:26:43 +0100, duncan smith > declaimed the following: > > >> The media have their own quirks when it comes to English. The BBC >> regularly use "top of" / "bottom of" in the sense of "start of" / "end >> of", but I d

Re: listbox binding..what is the current selection?

2013-03-07 Thread William Ray Wing
On Mar 6, 2013, at 11:38 PM, Rex Macey wrote: > Thanks. I have spent time with the docs, at least with the Python v3.3 and > tkinter v8.5 (pdf). I wish they had more examples. My approach is to browse > the docs, try a program, fail, read the docs, try again. When I can't figure > it out, I

Finding the source of an exception in a python multiprocessing program

2013-04-24 Thread William Ray Wing
I run a bit of python code that monitors my connection to the greater Internet. It checks connectivity to the requested target IP addresses, logging both successes and failures, once every 15 seconds. I see failures quite regularly, predictably on Sunday nights after midnight when various netw

Re: Finding the source of an exception in a python multiprocessing program

2013-04-24 Thread William Ray Wing
On Apr 24, 2013, at 4:31 PM, Neil Cerutti wrote: > On 2013-04-24, William Ray Wing wrote: >> When I look at the pool module, the error is occurring in >> get(self, timeout=None) on the line after the final else: >> >>def get(self, timeout=None): >>

replacing all 'rng's in a buffer with consecutive r[1], r[2]'s

2006-10-04 Thread m g william
I read a file into a buffer and subject it to re.sub() I can replace every occurrence of a pattern with a fixed string but when I try to replace each occurrence with a string that changes (by having an incrementing number in it, (ie 'repTxt[1]','repTxt[2]'etc), I note that the incrementing number g

Re: Software licenses and releasing Python programs for review

2005-05-27 Thread James William Pye
On Fri, 27 May 2005 18:50:14 -0700, poisondart wrote: > - being able to distribute it freely, anybody can modify it > - nobody is allowed to make profit from my code (other than myself) Terry mentioned OS.org, so I will not repeat that. (opensource.org) Also, check out http://creativecommons.org.

XML Parsing: Expat Error

2008-07-17 Thread Gerth, William D
Hey all, I'm simply trying to get my feet wet with XML parsing, and I tried to just do something simple with ElementTree, just throw the XML tags from a file into a list. The code is as follows (and may be wrong): import glob import xml.etree.ElementTree as ET tree = ET.parse('nameofFileh

File reading across network (windows)

2008-08-11 Thread Prof. William Battersea
Hello, Suppose I have a Vista machine called VISTA and an XP machine called XP in a workgroup named WORKGROUP. Physically they're connected to a router and I can see lists of public and shared files on each of them. How do I address these for IO? A search suggested that the form open(r"\\server\f

Using Timer or Scheduler in a Class

2008-08-13 Thread Prof. William Battersea
I'd like a class method to fire every n seconds. I tried this: class Timed: def.__init__(self): self.t = Timer(3, self.dothing) def.start(self): self.t.start() def.dothing(self): print "Doing Thing" s = new Timed() s.start() And: class Scheduled: def._

Re: Frustration debugging serial code

2010-05-07 Thread William R. Wing
On May 7, 2010, at 2:08 PM, MRAB wrote: > William R. Wing (Bill Wing) wrote: >> Hello World - >> I'm new to both Python and this list, but here's hoping someone can spot my >> problem. >> System: Mac OS-X, 10.6.3 (Intel dual quad processor) >> Usi

why python don't support "extended slice direct assignment" for lists?

2010-07-02 Thread Robert William Hanks
why pure python don't support "extended slice direct assignment" for lists? today we have to write like this, >>> aList=[0,1,2,3,4,5,6,7,8,9] >>> aList [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> aList[::2]= [None]*len(aList[::2]) #or do the math by hand, what's not always possible >>> aList [None, 1, No

Re: why python don't support "extended slice direct assignment" for lists?

2010-07-02 Thread Robert William Hanks
message -- > From: Steven D'Aprano > To: python-list@python.org > Date: 02 Jul 2010 23:59:52 GMT > Subject: Re: Why defaultdict? > On Fri, 02 Jul 2010 04:11:49 +, Steven D'Aprano wrote: > > > I would like to better understand some of the design choices

problems installing pylab

2017-02-21 Thread Robert William Lunnon
Dear Python I am trying to install pylab alongside python 3.6. However when I type python -m pip install pylab I get the message No module named site In the documentation [documentation for installing python modules in python 3.6.0 documentation] it says: The above example assumes that the opt

Re: Who are the "spacists"?

2017-03-17 Thread William Ray Wing
> On Mar 17, 2017, at 8:52 PM, Mikhail V wrote: > > So Python supports both spaces and tabs for indentation. > > I just wonder, why not forbid spaces in the beginning of lines? > How would one come to the idea to use spaces for indentation at all? > That convention dates all the way back to t

Re: Python and the need for speed

2017-04-10 Thread William Ray Wing
> On Apr 10, 2017, at 8:25 AM, Mikhail V wrote: > > On 10 April 2017 at 02:21, Gregory Ewing wrote: >> >> >> >> My take on the idea of making Python less dynamic in order >> to improve speed is that you'll end up with a language that, >> while it may superficially resemble Python, doesn'

Re: closing image automatically in for loop , python

2017-04-12 Thread William Ray Wing
> On Apr 12, 2017, at 7:18 AM, Masoud Afshari wrote: > > Dear all > > I have several *.sfd files which created by a simulation code. I wrote a > program containing a for Loop which reads each time one .sfd file and plot > the requested Parameters. I have two request: > > 1- my Problem is t

Python, Solaris 10, and Mailman

2011-01-21 Thread McNutt Jr, William R
I am attempting to install Mailman on a Sun Sunfire x4100 box running Solaris ten. I keep running into brick walls that the Mailman group looks at, shrugs, and says, that's a Python problem. Has ANYBODY actually made this work? Currently, I'm attempting to compile Python 2.4.4, which is the rec

Re: Python Programming expert - adding user

2012-07-19 Thread William R. Wing (Bill Wing)
On Jul 17, 2012, at 9:58 PM, Maria Hanna Carmela Dionisio wrote: > Im just a student :) > > Our prof gave as a task that we need to make a program using python (for > redhat) and c++(for windows) > > Our objective is to make a program file and we will said it remotely to > another computer via

Re: trouble with pyplot in os x

2012-08-04 Thread William R. Wing (Bill Wing)
On Aug 3, 2012, at 11:12 PM, Eric wrote: > I'm just starting to futz around with matplotlib and I tried to run this > example from the matplotlib doc page (it's the imshow() example): > > import numpy as np > import matplotlib.cm as cm > import matplotlib.mlab as mlab > import matplotlib.pyplot

Re: Python and OSX 10.8

2012-08-09 Thread William R. Wing (Bill Wing)
On Aug 9, 2012, at 10:38 AM, David Thomas wrote: > Im looking to upgrade my Mac to 10.8 and I'm worried if Python and IDLE may > not run on it. > When I try to run this command in Terminal: python -m idlelib.idle > I can not launch IDLE which comes bundled on Mac. On Lion it's been fine but >

Re: [ANNC] pybotwar-0.8

2012-08-16 Thread William R. Wing (Bill Wing)
On Aug 16, 2012, at 11:40 AM, Ramchandra Apte wrote: > Look you are the only person complaining about top-posting. > GMail uses top-posting by default. > MANY of us find it irritating... and it only takes a second to move your cursor down and play nice. -Bill -- http://mail.python.org/mailma

writelines puzzle

2012-08-22 Thread William R. Wing (Bill Wing)
In the middle of a longer program that reads and plots data from a log file, I have added the following five lines (rtt_data is fully qualified file name): wd = open(rtt_data, 'w') stat = wd.write(str(i)) stat = wd.writelines(str(x_dates[:i])) stat = wd.writelines(str(y_rtt[:i])) wd.close() The

Re: writelines puzzle

2012-08-22 Thread William R. Wing (Bill Wing)
"i" in this instance is 2354, so the file should (I thought) have contained the value of "i" followed by 2 x 2354 values of the data. > On Wed, Aug 22, 2012 at 8:38 AM, William R. Wing (Bill Wing) > wrote: >> In the middle of a longer program that reads and plot

Re: writelines puzzle

2012-08-22 Thread William R. Wing (Bill Wing)
On Aug 22, 2012, at 1:28 PM, Jerry Hill wrote: > On Wed, Aug 22, 2012 at 11:38 AM, William R. Wing (Bill Wing) > wrote: >> Much to my surprise, when I looked at the output file, it only contained 160 >> characters. Catting produces: >> >> StraylightPro:Logs wr

Re: python docs search for 'print'

2012-09-04 Thread William R. Wing (Bill Wing)
On Sep 4, 2012, at 1:58 PM, David Hoese wrote: > A friend made me aware of this: > When a python beginner (2.x) quick searches for "print" on docs.python.org, > the print function doesn't even come up in the top 20 results. The print > statement isn't even listed as far as I can tell. Is ther

Re: Newbie: where's the new python gone?

2012-09-10 Thread William R. Wing (Bill Wing)
On Sep 9, 2012, at 10:28 AM, BobAalsma wrote: > I think I've installed Python 2.7.3 according to the instructions in the > README, and now want to use that version. > However, when typing "python" in Terminal, I get "Python 2.6.4 (r264:75821M, > Oct 27 2009, 19:48:32) ". > So: > (1) I can't se

Re: Newbie: where's the new python gone?

2012-09-10 Thread William R. Wing (Bill Wing)
On Sep 10, 2012, at 11:17 AM, Bob Aalsma wrote: > Well, Bill, better late than never - thanks for stepping in. > You are right, my problems are not yet solved ;) As Hans pointed out, you are looking for python, not Python (the frameworks are named Python, the executable is python). Sorry about

Re: Newbie: where's the new python gone?

2012-09-11 Thread William R. Wing (Bill Wing)
On Sep 11, 2012, at 3:52 AM, Bob Aalsma wrote: > > Op 10 Sep 2012, om 22:53 heeft William R. Wing (Bill Wing) het volgende > geschreven: > >> On Sep 10, 2012, at 11:17 AM, Bob Aalsma wrote: >> >>> Well, Bill, better late than never - thanks for stepping i

Re: Newbie: where's the new python gone?

2012-09-11 Thread William R. Wing (Bill Wing)
On Sep 11, 2012, at 9:12 AM, Bob Aalsma wrote: > Hmm, this feels embarrassing but the good news is that, on seeing the errors, > I remember using a "sudo" with the make install and only later finding out > that I shouldn't have. > > Last login: Tue Sep 11 09:46:11 on ttys000 > macpro1:~ debaas

Re: Python presentations

2012-09-13 Thread William R. Wing (Bill Wing)
On Sep 13, 2012, at 12:00 PM, andrea crotti wrote: > I have to give a couple of Python presentations in the next weeks, and > I'm still thinking what is the best approach. > > In one presentation for example I will present decorators and context > managers, and my biggest doubt is how much I sho

Re: key/value store optimized for disk storage

2012-05-02 Thread William R. Wing (Bill Wing)
On May 2, 2012, at 10:14 PM, Steve Howell wrote: > This is slightly off topic, but I'm hoping folks can point me in the > right direction. > > I'm looking for a fairly lightweight key/value store that works for > this type of problem: > > ideally plays nice with the Python ecosystem > the data

Re: Retrieving result from embedded execution

2012-05-08 Thread William R. Wing (Bill Wing)
On May 8, 2012, at 3:07 PM, F L wrote: > Hello everyone, > > We are trying to implement our own interactive interpreter in our application > using an embedded Python interpreter. > > I was wondering what would be the best way to retreive as text the result of > executing Python code. The text

Re: tee-like behavior in Python

2012-05-09 Thread William R. Wing (Bill Wing)
On May 9, 2012, at 11:35 AM, Florian Lindner wrote: > Hello, > > how can I achieve a behavior like tee in Python? > > * execute an application > * leave the output to stdout and stderr untouched > * but capture both and save it to a file (resp. file-like object) > > I have this code > > proc =

Re: Python Book for a C Programmer?

2012-05-24 Thread William R. Wing (Bill Wing)
On May 23, 2012, at 7:45 PM, hsa...@gmail.com wrote: > I am trying to join an online class that uses python. I need to brush up on > the language quickly. Is there a good book or resource that covers it well > but does not have to explain what an if..then..else statement is? > > Thanks. > -- >

Re: ./configure

2012-06-03 Thread William R. Wing (Bill Wing)
On Jun 3, 2012, at 8:31 PM, Steven D'Aprano wrote: > On Sun, 03 Jun 2012 15:01:07 -0700, Janet Heath wrote: > >> Thanks Alain. I should have a compiler on my Mac OS X Lion. I am >> thinking that it isn't set in my $PATH variable. I don't know where the >> $PATH is set at. I will check to see

Re: Compare 2 times

2012-06-06 Thread William R. Wing (Bill Wing)
On Jun 6, 2012, at 9:29 AM, Alain Ketterlin wrote: > loial writes: > >> I have a requirement to test the creation time of a file with the >> current time and raise a message if the file is more than 15 minutes >> old. >> Platform is Unix. >> I have looked at using os.path.getctime for the file

Re: Compare 2 times

2012-06-06 Thread William R. Wing (Bill Wing)
On Jun 6, 2012, at 9:45 AM, William R. Wing (Bill Wing) wrote: > On Jun 6, 2012, at 9:29 AM, Alain Ketterlin wrote: > >> loial writes: >> >>> I have a requirement to test the creation time of a file with the >>> current time and raise a message if the f

Frustration debugging serial code

2010-05-07 Thread William R. Wing (Bill Wing)
Hello World - I'm new to both Python and this list, but here's hoping someone can spot my problem. System: Mac OS-X, 10.6.3 (Intel dual quad processor) Using Python 2.6.1, and pyserial-2.5_rc2-py2.6 The following snippet of code is designed to open a port via a KeySpan USB-to-serial converter

Re: Frustration debugging serial code

2010-05-07 Thread William R. Wing (Bill Wing)
See comments in-line. On May 7, 2010, at 3:23 PM, MRAB wrote: > William R. Wing (Bill Wing) wrote: >> On May 7, 2010, at 2:08 PM, MRAB wrote: >>> William R. Wing (Bill Wing) wrote: >>>> Hello World - >>>> I'm new to both Python and this list, but

Re: Frustration debugging serial code

2010-05-07 Thread William R. Wing (Bill Wing)
On May 7, 2010, at 4:12 PM, J. Cliff Dyer wrote: > On Fri, 2010-05-07 at 15:36 -0400, William R. Wing wrote: > >> >> Maybe I should have been more explicit. The first line in the Python >> file is: >> >> >> #!/usr/bin/env Python (alternatively #!/u

Re: Frustration debugging serial code

2010-05-07 Thread William R. Wing (Bill Wing)
On May 7, 2010, at 10:18 PM, MRAB wrote: > William R. Wing (Bill Wing) wrote: >> See comments in-line. >> On May 7, 2010, at 3:23 PM, MRAB wrote: >>> William R. Wing (Bill Wing) wrote: >>>> On May 7, 2010, at 2:08 PM, MRAB wrote: [byte -byte- byte] &

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread William Ray Wing via Python-list
> On Jan 26, 2021, at 2:00 PM, C W wrote: > > Hello everyone, > > I'm a long time Matlab and R user working on data science. How do you > troubleshooting/debugging in Python? > Another approach is to run the code in an IDE. I happen to use Wing, but that is a coincidence. But almost ANY

Re: Ann: New Python curses book

2021-03-30 Thread William Ray Wing via Python-list
I’ve ordered the book (physical volume). It will fulfill a need I’ve had for some time. Unfortunately, it is only available in the UK store, so the shipping cost by far outweighs the book’s cost. Hope for other’s sake, it migrates to the other Amazon stores fairly quickly. Thanks, Bill > On

Re: Matplotlib 3D limitations, please recommend alternative

2018-07-04 Thread William Ray Wing via Python-list
> On Jul 4, 2018, at 5:53 PM, John Ladasky wrote: > > I'm a regular Matplotlib user. Normally, I graph functions. I just > attempted to graph an icosahedral surface using the plot_trisurf() methods of > Matplotlib's Axes3D. I have discovered that Matplotlib is basically > hard-wired for gra

Re: How to change '\\' to '\'

2018-10-01 Thread William Ray Wing via Python-list
> On Oct 1, 2018, at 10:17 PM, Jach Fong wrote: > > Thanks for your info about how Windows supports the forward slash. > > I don't quit sure what is the meaning of "top posting" in your mail. > If its meaning (forgive me if I was wrong) is where the reply was put > in mail, I have reason of st

Re: Creating Win .exe file from *.py on Linux

2018-10-02 Thread William Ray Wing via Python-list
> On Oct 2, 2018, at 3:03 PM, John Doe wrote: > > Hello World > > Is it possible to create on Linux win .exe file from *.py file? > -- > https://mail.python.org/mailman/listinfo/python-list As was pointed out here a day or so ago, the answer is yes, but it is a two step process. First step

Re: the python name

2019-01-04 Thread William Ray Wing via Python-list
On 3/01/19 2:03 PM, Avi Gross wrote: > Challenge: Can we name any computer language whose name really would suggest > it was a computer language? > I think the name is the least important aspect of a computer language. I’d like to propose that classic FORTRAN (FORmulaTRANslator) came/comes close.

Re: the python name

2019-01-04 Thread William Ray Wing via Python-list
> On Jan 4, 2019, at 11:34 AM, Avi Gross wrote: > > [BYTE] > As I joked in an earlier message, I remember using a version of FORTRAN > called WATFOR. Yes, there was a WATFIV. > > Yah - WATFOR was Waterloo FORTRAN, an interpreted FORTRAN that was used a lot in intro classes. No matter w

Re: Levenberg-Marquardt non-linear least-squares fitting in Python

2019-03-28 Thread William Ray Wing via Python-list
> On Mar 28, 2019, at 7:54 AM, Madhavan Bomidi wrote: > > Hi, > > I have x and y variables data arrays. These two variables are assumed to be > related as y = A * exp(x/B). Now, I wanted to use Levenberg-Marquardt > non-linear least-squares fitting to find A and B for the best fit of the >

Re: Levenberg-Marquardt non-linear least-squares fitting in Python [follow-on]

2019-03-28 Thread William Ray Wing via Python-list
Below I’ve included the code I ran, reasonably (I think) commented. Note the reference to the example. The data actually came from a pandas data frame that was in turn filled from a 100 MB data file that included lots of other data not needed for this, which was a curve fit to a calibration ru

Re: [Tutor] Questions

2019-04-08 Thread William Ray Wing via Python-list
filings of individual > companies by putting in a ticker (preferably in excel, but an be done > elsewhere). Trying to figure out how to even start setting this up. > > Thank you! > > On Sun, Apr 7, 2019 at 8:57 PM William Ray Wing <mailto:w...@mac.com>> wrote: >

Re: questions re: calendar module

2020-08-01 Thread William Ray Wing via Python-list
> On Aug 1, 2020, at 10:35 AM, o1bigtenor wrote: > > On Sat, Aug 1, 2020 at 9:29 AM o1bigtenor wrote: >> >>> On Sat, Aug 1, 2020 at 6:58 AM Peter Otten <__pete...@web.de> wrote: >>> >>> o1bigtenor wrote: >>> >>> import calendar >>> print (calendar.calendar(2024,1,1,2,8)) >>> I

<    1   2   3   4   5   6