unable to run the basic Embedded Python example

2023-06-24 Thread Dave Ohlsson via Python-list
-nologo -Zc:wchar_t -FS -Zc:strictStrings -Zi -MDd -utf-8 -W3 -w44456 -w44457 -w44458 /Fddebug\embedded_python.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_GUI_LIB -DQT_CORE_LIB -I..\embedded_python -I. -I..\Python-3.11.4\Include -I..\Python-3.1

Re: Creating logs with Python

2023-02-22 Thread Dave (NK7Z)
Thank you Gerard! I am working on a project and needed that... :) 73, and thanks, Dave (NK7Z) https://www.nk7z.net ARRL Volunteer Examiner ARRL Technical Specialist, RFI ARRL Asst. Director, NW Division, Technical Resources On 2/22/23 07:03, Weatherby,Gerard wrote: https://docs.python.org/3

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Dave
Hi, I quite like the format that JSON gives - thanks a lot! Cheers Dave > On 9 Jun 2022, at 20:02, Stefan Ram wrote: > > Since nicety is in the eyes of the beholder, I would not > hesitate to write a custom function in this case. Python > has the standard modules &qu

Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Dave
Hi, Before I write my own I wondering if anyone knows of a function that will print a nicely formatted dictionary? By nicely formatted I mean not all on one line! Cheers Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test characters of a string

2022-06-08 Thread Dave
Hi, I’ve found you also need to take care of multiple disk CD releases. These have a format of “1-01 Track Name” “2-02 Trackl Name" Meaning Disk 1 Track1, Disk 2, Track 2. Also A and B Sides (from Vinyl LPs) “A1-Track Name” “B2-Track Name” Side A, Track 1, etc. Cheers Dave >

Re: How to replace characters in a string?

2022-06-08 Thread Dave
at some point, these need to replaced. 3. Other character based of name being of a non-english origin. If find others I’ll add them. I’m using MusicBrainz to do a fuzzy match and get the correct name. it’s not perfect, but works for 99% of files which is good enough for me! Cheers Dave > O

Re: How to replace characters in a string?

2022-06-08 Thread Dave
> On 8 Jun 2022, at 11:25, Dave wrote: > >myNewString = theString.replace("\u2014", “]” #just an example Opps! Make that myNewString = myNewString.replace("\u2014", “]” #just an example -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace characters in a string?

2022-06-08 Thread Dave
extended to include other characters as and when they come up by adding a line as so: myNewString = theString.replace("\u2014", “]” #just an example Which is what I was trying to achieve. All the Best Dave > On 8 Jun 2022, at 11:17, Chris Angelico wrote: > > On Wed,

Re: How to replace characters in a string?

2022-06-08 Thread Dave
r: 'str' object cannot be interpreted as an integer I can’t see of a way to do this in Python? All the Best Dave > On 8 Jun 2022, at 10:14, Chris Angelico wrote: > > On Wed, 8 Jun 2022 at 18:12, Dave wrote: > >> I tried the but it doesn’t seem to work? >> myCompareF

Re: How to replace characters in a string?

2022-06-08 Thread Dave
PS I’ve also tried: myCompareFile1 = myTitleName myCompareFile1.replace("\u2019", "'") myCompareFile2 = myCompareFileName myCompareFile2.replace("\u2019", "'") Which also doesn’t work, the replace itself work but it still fails the compare? &

How to replace characters in a string?

2022-06-08 Thread Dave
th2): print('lengths match: ',myLength1) else: print('lengths mismatch: ',myLength1,' ',myLength2) print(' ') Console: myCompareFile1: 'I\u2019m Mandy Fly Me' myCompareFile2: "I'm Mandy Fly Me" So it looks like the replace isn’t doing anything? I’m an experienced developer but learning Python. All the Best Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test characters of a string

2022-06-07 Thread Dave
I hate regEx and avoid it whenever possible, I’ve never found something that was impossible to do without it. > On 8 Jun 2022, at 00:49, dn wrote: > > On 08/06/2022 10.18, De ongekruisigde wrote: >> On 2022-06-08, Christian Gollwitzer wrote: >>> Am 07.06.22 um 21:

Re: How to test characters of a string

2022-06-07 Thread Dave
rotfl! Nice one! > On 8 Jun 2022, at 00:24, 2qdxy4rzwzuui...@potatochowder.com wrote: > > On 2022-06-07 at 23:07:42 +0100, > Regarding "Re: How to test characters of a string," > MRAB wrote: > >> On 2022-06-07 21:23, Dave wrote: >>> Thanks a

Re: How to test characters of a string

2022-06-07 Thread Dave
single quote in I’m, although it has worked with other songs. Any ideas? All the Best Cheers Dave Here is the whole function/method or whatever it’s called in Python: # # checkMusicFiles

Re: How to test characters of a string

2022-06-07 Thread Dave
A, ok will do, was just trying to be a brief as possible, will post more fully in future. > On 7 Jun 2022, at 23:29, Chris Angelico wrote: > > On Wed, 8 Jun 2022 at 07:24, Barry wrote: >> >> >> >>> On 7 Jun 2022, at 22:04, Dave wrote: >>>

Re: How to test characters of a string

2022-06-07 Thread Dave
those out tomorrow. Thanks for your help - All the Best Dave > On 7 Jun 2022, at 23:01, Dave wrote: > > Hi, > > No, I’ve checked leading/trailing whitespace, it seems to be related to the > variables that are returned from eyed3 in this case, for instance, I added a

Re: How to test characters of a string

2022-06-07 Thread Dave
?). > On 7 Jun 2022, at 22:35, De ongekruisigde > wrote: > > On 2022-06-07, Dave <mailto:d...@looktowindward.com>> wrote: >> Thanks a lot for this! isDigit was the method I was looking for and couldn’t >> find. >> >> I have another problem related

Re: How to test characters of a string

2022-06-07 Thread Dave
022-06-07 at 21:35:43 +0200, > Dave wrote: > >> I’m new to Python and have a simple problem that I can’t seem to find >> the answer. > >> I want to test the first two characters of a string to check if the >> are numeric (00 to 99) and if so remove the fist thr

Re: How to test characters of a string

2022-06-07 Thread Dave
Name Mismatch - Artist: ',myArtistName,' Album: ',myAlbumName,' Track:',myTitleName,' File: ',myFile) Thanks a lot Dave > On 7 Jun 2022, at 21:58, De ongekruisigde > wrote: > > On 2022-06-07, Dave wrote: >> Hi, >> >> I’m new to Pyt

How to test characters of a string

2022-06-07 Thread Dave
still want “Trinket”. I can’t for the life of work out how to do it in Python? All the Best Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread Dave
Thanks! That fixed it! > On 6 Jun 2022, at 18:46, MRAB wrote: > > On 2022-06-06 11:37, Dave wrote: >> Hi, >> I’m trying to get the ID3 tags of an mp3 file. I trying to use the >> MusicCDIdFrame >> method but I can’t seem to get it right. Here is a code sn

Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread Dave
7;, toc=b'') When I run this, I get the following error: File "/Documents/Python/Test1/main.py", line 94, in myCDID = myID3.id3.frames.MusicCDIdFrame(id=b'MCDI', toc=b'') AttributeError: 'Mp3AudioFile' object has no attribute 'id3&#

python 3.9.12 and python 3.10

2022-05-03 Thread Dave Francis
3.9 appeared with my old errors. I uninstalled 3.10 as 3.9 did not appear in control panel. Dell Inspiron 3793 Win 10 Thanks Dave Francis -- https://mail.python.org/mailman/listinfo/python-list

Subprocess Connection Error

2020-10-17 Thread Dave Dungan via Python-list
g. Any help would be appreciated. One more thing, the book says to save it as "types.py". Thank you, Dave Dungan -- https://mail.python.org/mailman/listinfo/python-list

Visualize dataframes in 2 lines

2020-08-22 Thread Dave Dawson
import sho sho.w(dataframe) Install : pip install sho Medium Article: https://medium.com/@davewd/sho-w-dataframe-my-first-package-b7242088b78f Github: https://github.com/davewd/sho -- https://mail.python.org/mailman/listinfo/python-list

Re: low-level csv

2019-11-17 Thread Dave Cinege
mmas while honoring quoted values (and stripping out the quotes) Dave On 2019/11/17 08:18, Antoon Pardon wrote: This is python 2.6->2.7 and 3.5->3.7 I need to convert a string that is a csv line to a list and vice versa. I thought to find functions doing this in the csv module but that do

Re: How to delay until a next increment of time occurs ?

2019-11-14 Thread Dave Cinege
, my advise is doing this *reliably*. In that regard you might need look at locking your C process to 1 CPU and giving it highest priority. (man nice) Once you have this working reliably, you could then look to convert it to a python c-module to more tightly integrate it. Dave On 2019/11

Re: How to delay until a next increment of time occurs ?

2019-11-14 Thread Dave Cinege
Can you expand on what you are trying to accomplish with this? It seems a small C program or library you interface python too is a better solution. With that said, as others mentioned you might need a real time OS or micro controller if this needs to be dead on timing. Dave On 2019/11/13 09

ANNOUNCE: Thesaurus and ThesaurusCfg - recursive mapping and cfg file data types

2019-11-13 Thread Dave Cinege
cfg.opt.verbose True import json >>> print(json.dumps(cfg, indent=4, separators=(',', ': '))) { "prog": { "version": 123 }, "opt": { "verbose": true }, "hi": "Hello" } browse: https://git.cinege.com/thesaurus/ or git clone https://git.cinege.com/thesaurus/ --- Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 2:46:15 PM UTC-4, boB Stepp wrote: > On Sat, Sep 21, 2019 at 1:01 PM Dave Martin wrote: > > > > On Saturday, September 21, 2019 at 1:33:12 PM UTC-4, Terry Reedy wrote: > > > On 9/21/2019 11:53 AM, Dave Martin wrote: > [...] > &g

Re: Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 1:33:12 PM UTC-4, Terry Reedy wrote: > On 9/21/2019 11:53 AM, Dave Martin wrote: > > > > # starAbsMags=df['radial_velocity'] > > > > #GaiaPandasEscapeVelocityCode > > > > import pandas as pd > > import

Re: python is bugging

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 12:44:27 PM UTC-4, Brian Oney wrote: > On Sat, 2019-09-21 at 08:57 -0700, Dave Martin wrote: > > On Saturday, September 21, 2019 at 11:55:29 AM UTC-4, Dave Martin > > wrote: > > > what does expected an indented block > > > &g

Re: python is bugging

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 11:55:29 AM UTC-4, Dave Martin wrote: > what does expected an indented block *what does an indented block mean? -- https://mail.python.org/mailman/listinfo/python-list

python is bugging

2019-09-21 Thread Dave Martin
what does expected an indented block -- https://mail.python.org/mailman/listinfo/python-list

Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
# starAbsMags=df['radial_velocity'] #GaiaPandasEscapeVelocityCode import pandas as pd import numpy as np from astropy.io import fits import astropy import matplotlib.pyplot as plt #get the combined data and load the fits files fits_filename="Gaia_DR2/gaiadr2_100pc.fits" df=pd.DataFrame() wit

Re: Formatting floating point

2019-09-04 Thread Dave via Python-list
On 9/4/19 1:38 PM, Rhodri James wrote: On 04/09/2019 18:12, Dave via Python-list wrote: My question is why, and where do I find a reliable source of information on formatting numbers?  Not interested in replacement values like '{} {}'.format(1, 2). Here: https://docs.python.org

Re: Formatting floating point

2019-09-04 Thread Dave via Python-list
On 9/4/19 1:25 PM, Chris Angelico wrote: On Thu, Sep 5, 2019 at 3:16 AM Dave via Python-list wrote: All, I have been going in circles trying to format a floating point number so there is only 1 decimal place. In reading all of the gobble-gook that passes for Python advice, it looked like I

Formatting floating point

2019-09-04 Thread Dave via Python-list
on formatting numbers? Not interested in replacement values like '{} {}'.format(1, 2). Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: Application Preferences

2019-08-19 Thread Dave via Python-list
On 8/19/19 1:53 PM, Barry Scott wrote: On 19 Aug 2019, at 13:43, Dave via Python-list wrote: The plan for an app that I'm doing was to use SQLite for data and to hold the preference settings as some apps do. The plan was changed last week to allow the user to select the location o

Re: Application Preferences

2019-08-19 Thread Dave via Python-list
On 8/19/19 9:22 AM, Malcolm Greene wrote: Hi Dave, The plan for an app that I'm doing was to use SQLite for data and to hold the preference settings as some apps do. The plan was changed last week to allow the user to select the location of the data files (SQLite) rather than puttin

Application Preferences

2019-08-19 Thread Dave via Python-list
file? How have other Python app developers done in this case? Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Dave via Python-list
gh. Right now I just need to know how to populate the join table and anything else that has escaped me. SQL is cool. SQL + Python (or C or C++ or Java) is more cool. Lot easier to understand than pointer math in C. Dave, -- https://mail.python.org/mailman/listinfo/python-list

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Dave via Python-list
On 8/13/19 2:59 PM, Chris Angelico wrote: On Wed, Aug 14, 2019 at 4:50 AM Dave via Python-list wrote: Some of the tables are related. For example: Hiking_Table Trails_TableJoining_Table -- hike_id PK

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Dave via Python-list
On 8/13/19 4:45 PM, MRAB wrote: On 2019-08-13 19:59, Chris Angelico wrote: On Wed, Aug 14, 2019 at 4:50 AM Dave via Python-list wrote: Some of the tables are related.  For example: Hiking_Table Trails_Table    Joining_Table

Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Dave via Python-list
iated. As for queries, I think I use joins, but a pointer on how to do this would also be appreciated. Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

Python/SQLite best practices

2019-08-05 Thread Dave via Python-list
cur.close() | except Error as e: | print(e) What else? Dave, -- https://mail.python.org/mailman/listinfo/python-list

Re: Python best practice instantiating classes in app

2019-04-29 Thread Dave
On 4/29/19 3:26 PM, Terry Reedy wrote: On 4/29/2019 1:38 PM, Dave wrote: As apps get more complex we add modules, or Python files, to organize things.  One problem I have is a couple of data classes (list of dictionary objects) in a few modules that are used in a number of the other modules

Python best practice instantiating classes in app

2019-04-29 Thread Dave
a little confusing. So what are the suggestions from people that have been down this road before? Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: How call method from a method in same class?

2019-04-01 Thread Dave
On 4/1/19 10:29 PM, Cameron Simpson wrote: On 01Apr2019 22:02, Dave wrote: As classes get more complex, it is good to call a function to do some of the processing, and make the code easier to follow.  My question is how to do that?  I've attached some silly code to illustrate the point.

Re: How call method from a method in same class?

2019-04-01 Thread Dave
On 4/1/19 10:02 PM, Dave wrote: As classes get more complex, it is good to call a function to do some of the processing, and make the code easier to follow.  My question is how to do that?  I've attached some silly code to illustrate the point.  The error is: name 'validScale'

Re: How call method from a method in same class?

2019-04-01 Thread Dave
On 4/1/19 10:12 PM, Irv Kalb wrote: On Apr 1, 2019, at 7:02 PM, Dave wrote: As classes get more complex, it is good to call a function to do some of the processing, and make the code easier to follow. My question is how to do that? I've attached some silly code to illustrate the

How call method from a method in same class?

2019-04-01 Thread Dave
but maybe not the correct way. Suggestions? Dave, class TempConverter(): """ Temperature Converter converts a tempeature from one scale to another scale. For example: 32, F, C will return 0 degrees C """ def __init__(self, temperatur

Re: configparser - which one?

2019-03-26 Thread Dave
On 3/26/19 4:29 AM, Terry Reedy wrote: On 3/25/2019 8:10 PM, Dave wrote: I use Python3 3, and expected learning how to use configparser would be no big deal.  Well!  Seems there is configparser, stdconfigparser, and configparser is what IDLE uses.  I would read the extra or deleted features

Re: configparser - which one?

2019-03-25 Thread Dave
On 3/25/19 10:58 PM, DL Neil wrote: Dave, On 26/03/19 1:10 PM, Dave wrote: I use Python3 3, and expected learning how to use configparser would be no big deal.  Well!  Seems there is configparser, stdconfigparser, and safeconfigparser, and multiple ways to set the section and entries to the

configparser - which one?

2019-03-25 Thread Dave
#x27;) parser.set('default', 'units_measure', 'english') parser.set('default', 'background_color', 'white') parser.set('default', 'useDefaults', 'true') parser.set('default', 'numToDisp', '12') parser.set('default', 'pi', '3.14') The advantage of the former is that it will handle 'DEFAULT', while the last one won't. I like the former, but not sure if it is the future. Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: Creating GUI Applications with wxPython

2019-02-27 Thread Dave
On 2/27/19 11:38 AM, Rhodri James wrote: On 27/02/2019 15:37, Dave wrote: * GUI must support all desktops with a native look and feel.  Kivy fails this one.  Will have mobile apps later in the year, so it would be nice if one GUI fits all, but am ok with 2 gui's if needed. This requir

Re: ANN: Creating GUI Applications with wxPython

2019-02-27 Thread Dave
Sorry about the duplicate messages - bad hair day! Dave, On 2/27/19 10:38 AM, Dave wrote: On 1/14/19 2:08 PM, Mike Driscoll wrote: Hi, I just thought I would let you all know that I am working on my 2nd wxPython book, "Creating GUI Applications with wxPython". This one wil

Re: ANN: Creating GUI Applications with wxPython

2019-02-27 Thread Dave
one GUI fits all, but am ok with 2 gui's if needed. * A great book taking me from beginner to expert. Dave, -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: Creating GUI Applications with wxPython

2019-02-27 Thread Dave
one GUI fits all, but am ok with 2 gui's if needed. * A great book taking me from beginner to expert. Dave, -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: Creating GUI Applications with wxPython

2019-02-27 Thread Dave
Windows and Mac/Unix/CUPS. * GUI must support all desktops with a native look and feel. Kivy fails this one. Will have mobile apps later in the year, so it would be nice if one GUI fits all, but am ok with 2 gui's if needed. * A great book taking me from beginner to expert. Dave, -- h

preferences file

2019-01-24 Thread Dave
c? 3. File location? I'm using Ubuntu and I believe that the correct location would be home/.config/ . What about Mac and Windows? Would like to find a Python library that handles all of this, but so far... Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

System printer object

2019-01-07 Thread Dave
and properties. Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: Kivy native GUI examples

2019-01-07 Thread Dave
On 1/7/19 11:14 AM, Thomas Jollans wrote: On 07/01/2019 15.51, Dave wrote: I need to select a Python GUI.  It needs to cover all of the desktops (Linux, Windows, Apple) and hopefully mobile (Android and Ios).  I'm looking at Kivy, but have yet to find an example app. that has a native lo

Kivy native GUI examples

2019-01-07 Thread Dave
ow of some examples? Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: Appending data to a json file

2017-04-04 Thread Dave
On 04/04/2017 01:50 PM, Rob Gaddi wrote: On 04/04/2017 10:23 AM, Dave wrote: I don't care for the idea of replacing the data file for every save. My preference would to append to the existing data file - makes more sense. However, that is not how json works. So, I'm conside

Re: Appending data to a json file

2017-04-04 Thread Dave
On 04/04/2017 10:17 AM, Michael Torrie wrote: On 04/03/2017 11:31 PM, dieter wrote: Dave writes: I created a python program that gets data from a user, stores the data as a dictionary in a list of dictionaries. When the program quits, it saves the data file. My desire is to append the new

Appending data to a json file

2017-04-03 Thread Dave
ay to do that. The advice I have seen on the web is to load the data when the program starts, append the new user input to the list, then re-write the data file. Is that the best way, or is there a better way? Thanks, Dave -- https://mail.python.org/mailman/listinfo/python-list

where is it

2016-08-06 Thread Dave via Python-list
I am trying to associate the .py file extension with idle...where IS idle? Can you make it a bit more difficult to load/use your software please. -- https://mail.python.org/mailman/listinfo/python-list

Re: exit from Tkinter mainloop Python 2.7

2016-02-24 Thread Dave Farrance
kevind0...@gmail.com wrote: >from Tkinter import * > >def butContinue(): >root1.destroy() As Christian said, you're destroying the root window and its children, so instead use root1.quit() here. > ... > >root1.mainloop() > >print entryName.get("1.0", "end-1c" ) >print entryPWord.get("1.0", "

Re: [newbie] Problem with matplotlib

2016-02-20 Thread Dave Farrance
Dave Farrance wrote: >It occurs to me now that the trackback might misidentify the module in >use, if say, you'd named a file "numbers.py" then got rid of it later >leaving a "numbers.pyc" somewhere. If so, see where it is: > >import numbers >print nu

Re: [newbie] Problem with matplotlib

2016-02-20 Thread Dave Farrance
It occurs to me now that the trackback might misidentify the module in use, if say, you'd named a file "numbers.py" then got rid of it later leaving a "numbers.pyc" somewhere. If so, see where it is: import numbers print numbers.__file__ -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] Problem with matplotlib

2016-02-20 Thread Dave Farrance
jenswaelk...@gmail.com wrote: > File "/usr/lib/python2.7/decimal.py", line 3744, in >_numbers.Number.register(Decimal) >AttributeError: 'module' object has no attribute 'Number' Your decimal module seems broken. Confirm that in the Python shell: import numbers print numbers.Number I'm gue

Re: Tkinter problem: TclError> couldn't connect to display ":0

2016-02-05 Thread Dave Farrance
gemjack...@gmail.com wrote: >This fixed my problem with thkinter. sudo cp ~/.Xauthority ~root/ Which means that you were creating a GUI window with Python as root, which is to be avoided if you can. If you can't avoid it and you're running it with sudo in a bash console, rather than a root

Please Unsubscribe

2016-01-24 Thread Dave Tan
-- https://mail.python.org/mailman/listinfo/python-list

Re: Install Numba on Debian

2016-01-23 Thread Dave Farrance
Dave Farrance wrote: >I'd like to install Numba on Debian Jessie to work with the system >Python 2.7.9 (rather than installing Anaconda). OK, never mind. Fixed. By Googling the first error code, finding a suggested fix for that, running again, Googling the new error, and several

Install Numba on Debian

2016-01-23 Thread Dave Farrance
I'd like to install Numba on Debian Jessie to work with the system Python 2.7.9 (rather than installing Anaconda). When I follow the instructions at https://github.com/numba/numba#custom-python-environments ...I get errors when trying to install Numba either with the git clone method or installin

Re: help

2016-01-15 Thread Dave Farrance
sam Rogers wrote: >  I have downloaded python 2.7  with no problem. It works. I am trying to get >pyserial to work. I have tried many different solutions. I am not  sure if it >works or not. How can I be sure? I am using windows 7.  I did not see any help >at python.org. Can you help? >PS my g

Re: Turtle

2016-01-15 Thread Dave Farrance
Stallone Carl wrote: >I am currently using python 3.5.0 and I have been trying to write a program >using turtle but is not seem to be working. I have followed all tutarial on >the web and when i compare it with my code my am duing everything the same >way but it still don't seems to be working I

Re: Unicode failure (Solved)

2015-12-06 Thread Dave Farrance
"D'Arcy J.M. Cain" wrote: >On Fri, 4 Dec 2015 18:28:22 -0500 >Terry Reedy wrote: >> Tk widgets, and hence IDLE windows, will print any character from >> \u to \u without raising, even if the result is blank or ?. >> Higher codepoints fail, but allowing the entire BMP is better than >> an

Re: Unicode failure

2015-12-06 Thread Dave Farrance
I was taking it for granted that you knew how to set environment variables, but just in case you don't: In the shell, (are you using BASH?), put this: export PYTHONIOENCODING=UTF-8 ...then run your script. Remember that this is *not* a permanent fix. -- https://mail.python.org/mailman/listinfo/

Re: Unicode failure

2015-12-06 Thread Dave Farrance
"D'Arcy J.M. Cain" wrote: >... >utf-8 >Traceback (most recent call last): > File "./g", line 5, in >print(u"\N{TRADE MARK SIGN}") >UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in >position 0: ordinal not in range(128) I *presume* that you're using Linux since you've go

Re: Object identity has no necessary connection to memory location (was: What is a function parameter =[] for?)

2015-11-26 Thread Dave Farrance
Ben Finney wrote: >Dave Farrance writes: > >> Marko Rauhamaa wrote: >> >> >Dave Farrance : >> > >> >> (Conversely, I see that unlike CPython, all PyPy's numbers have >> >> unchanging ids, even after exiting PyPy and r

Re: What is a function parameter =[] for?

2015-11-26 Thread Dave Farrance
Marko Rauhamaa wrote: >Dave Farrance : > >> (Conversely, I see that unlike CPython, all PyPy's numbers have >> unchanging ids, even after exiting PyPy and restarting, so it seems >> that PyPy's numerical ids are "faked".) > >What's a fake

Re: Help needed with compiling python

2015-11-26 Thread Dave Farrance
Cecil Westerhof wrote: >On Wednesday 25 Nov 2015 23:58 CET, Laura Creighton wrote: >> >> Your Suse system probably wants to use python for something. If your >> system python is damaged, you badly need to fix that, using the >> system package managers tools, before Suse does some sort of update >

Re: What is a function parameter =[] for?

2015-11-26 Thread Dave Farrance
Alan Bawden wrote: >Chris Angelico writes: > ... >> Python 2.7.8 (2.4.0+dfsg-3, Dec 20 2014, 13:30:46) >> [PyPy 2.4.0 with GCC 4.9.2] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> tuple([]) is tuple([]) >> False > >I said I wouldn't be suprised if it

Re: Is there any reason to introduce this intermediate variable (sz)?

2015-11-18 Thread Dave Farrance
fl wrote: >Hi, >I find the following code snippet, which is useful in my project: > ... >correctly. Could you see something useful with variable 'sz'? So that's example code in "An Introduction to the Kalman Filter" by Greg Welch and Gary Bishop, and no, that construct was unnecessary. As you've

Re: Problems using struct pack/unpack in files, and reading them.

2015-11-17 Thread Dave Farrance
Steven D'Aprano wrote: >On Mon, 16 Nov 2015 05:15 pm, Gregory Ewing wrote: > >> Ints are not the only thing that // can be applied to: >> >> >>> 1.0//0.01 >> 99.0 > >Good catch! Hmmm. I see that the float for 0.01 _is_ slightly larger than 0.01 >>> Decimal(0.01) Decimal('0.012

Re: What is '@' for

2015-11-14 Thread Dave Farrance
fl wrote: >I read the following code snippet. A question is here about '@'. >I don't find the answer online yet. I recommend this: "Understanding Python Decorators in 12 Easy Steps!" http://simeonfranklin.com/blog/2012/jul/1/python-decorators-in-12-steps/ -- https://mail.python.org/mailman/li

Re: don't understand matrix-multiplication should be reversed in python?

2015-11-13 Thread Dave Farrance
PythonDude wrote: >On Thursday, 12 November 2015 22:57:21 UTC+1, Robert Kern wrote: >> He simply instantiated the two vectors as row-vectors instead of >> column-vectors, >> which he could have easily done, so he had to flip the matrix expression. > >Thank you very much Robert - I just had to

Re: Unbuffered stderr in Python 3

2015-11-04 Thread Dave Farrance
Random832 wrote: >The opposite of line buffering is not no buffering, but full >(i.e. block) buffering, that doesn't get flushed until it runs >out of space. TextIOWrapper has its own internal buffer, and its >design apparently doesn't contemplate the possibility of using >it with a raw FileIO ob

Re: python doesn't install

2015-11-02 Thread Dave Farrance
Tim Golden wrote: >I'm afraid you've been bitten by the fact that we no longer support >Windows XP and haven't communicated this very well. We have a new >version of the installer almost ready for release which indicates this >much earlier (and more obviously). I'm afraid if you're on XP you'r

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-07 Thread Dave Farrance
Rob Gaddi wrote: >So, this is odd. I'm running Ubuntu 14.04, and my system did a kernel >upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic. >And pyserial (2.7, installed through pip) stopped working. When KDE's "Plasma 5" appeared with Kubuntu 15.04, I found it to be to

Re: matplotlib timer

2015-10-01 Thread Dave Farrance
Laura Creighton wrote: >In a message of Thu, 01 Oct 2015 20:03:26 +0100, Dave Farrance writes: >>Laura Creighton wrote: >> >>>In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes: >>>>Yet the documentation says that it's mandatory for t

Re: matplotlib timer

2015-10-01 Thread Dave Farrance
Laura Creighton wrote: >In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes: >>Yet the documentation says that it's mandatory for the GUI backend base >>to implement stop() but that single_shot is optional. Ho hum. > >report as a bug. its a doc bug a

Re: matplotlib timer

2015-10-01 Thread Dave Farrance
Laura Creighton wrote: >In a message of Thu, 01 Oct 2015 17:36:50 +0100, Dave Farrance writes: >>I'm trying to set up the basics of a timer-scheduled function in >>matplotlib and I can't figure out how to stop the timer. Maybe the >>stop() method is dysfunction

matplotlib timer

2015-10-01 Thread Dave Farrance
I'm trying to set up the basics of a timer-scheduled function in matplotlib and I can't figure out how to stop the timer. Maybe the stop() method is dysfunctional in Ubuntu 14.04 or maybe I'm getting the syntax wrong. If anybody's got matplotlib installed, can you try this code and tell me if it s

Re: pygame basic question

2015-09-08 Thread Dave Farrance
"ast" wrote: >DISPLAYSURF = pygame.display.set_mode((400, 300)) >pygame.display.set_caption('Hello World!') > >The first line opens a 400x300 pygame window. >The second one writes "Hello World" on top of it. > >I am just wondering how function set_caption finds the windows >since the window's nam

Re: "no module named kivy" import error in ubuntu 14.04

2015-08-16 Thread Dave Farrance
shiva upreti wrote: >Hi >I am new to linux. I tried various things in attempt to install kivy. I >installed python 2.7.10 Just to make clear what others have said -- replacing Ubuntu 14.04's system Python 2.7.6 is a bad idea and will break stuff, so if you really must have the latest version of

Re: I'm a newbie and I'm still stumped...

2015-08-03 Thread Dave Farrance
Dwight GoldWinde wrote: >Here are the results I got below, showing the same error. The first line >says, >"2.7.6 (default, Sep 9 2014, 15:04:36)”. Does that mean I am running the >old Python? How could that be since I am SURE I downloaded 3.4.3 (it even >gives the folder name as “Python 3.4” in

Re: How to Calculate NPV?

2015-07-30 Thread Dave Farrance
ryguy7272 wrote: >PERFECT!! SO SIMPLE!! >I don't know why the author didn't do that in the book. The book is evidently giving you code snippets to enter into Python's own interactive interpreter, i.e., you enter "python" at the command line, then you manually type each command which immediately

  1   2   3   4   5   6   7   8   9   10   >