Re: Looking for a name for a deployment framework...

2013-06-24 Thread Cousin Stanley
[email protected] wrote: > Any suggestions for a good name, > for a framework that does > automatic server deployments ? asdf : automatic server deployment framework -- Stanley C. Kitching Human Being Phoenix, Arizona -- http://mail.python.org/mailman/listinfo/python-list

Re: [newbie] problem with data (different behaviour between batch and interactive use)

2012-06-27 Thread Cousin Stanley
Jean Dupont wrote: > I have some data which is presented > in the following format to me : > > +3.874693E-01,+9.999889E-03,+9.91E+37,+1.876595E+04,+3.994000E+04 > > I'm only interested in the first two fields i.e. > > +3.874693E-01,+9.999889E-03 > The following program will read line

Re: Eclipse and the Python plugin

2012-08-03 Thread Cousin Stanley
lipska the kat wrote: > > I can now create, debug and test a simple IRC server > written in Java and an IRC Bot that I am attempting > to build in Python > For a bit of inspiration python-irc-bot-wise you might look at supybot It's currently available in debian wheezy

Re: Fast forward-backward (write-read)

2012-10-23 Thread Cousin Stanley
Virgil Stokes wrote: > Not sure about "tac" --- could you provide more details on this > and/or a simple example of how it could be used for fast reversed > "reading" of a data file ? tac is available as a command under linux $ whatis tac tac (1) - concatenate and print files in re

Re: Questions about "compiled" Python (beginner)

2012-01-29 Thread Cousin Stanley
This short article provides some basic information about .pyc and .pyo files http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html -- Stanley C. Kitching Human Being Phoenix, Arizona -- http://mail.python.org/mailman/listinfo/python-list

Re: python for android anyone?

2012-05-28 Thread Cousin Stanley
rusi wrote: > > Any specific tips will of course be welcome < but also the general idea > -- is android really python friendly (yet)? You might take a look at Kivy http://kivy.org/ "It is built with Cython ( C extensions for Python ) and, in order to create apps, Python

Re: NEED HELP-process words in a text file

2011-06-24 Thread Cousin Stanley
Chris Rebert wrote: > Netiquette comment: Please avoid SHOUTING > The brilliant beam of light that first thought capitilized words amounted to shouting never programmed cobol, fortran, or pl/1 in the 1960s or 1970s :-) How or why this behavior was cultivated and contin

Re: NEED HELP-process words in a text file

2011-06-24 Thread Cousin Stanley
John Gordon wrote: > In Cousin Stanley > writes: > >> How or why this behavior was cultivated >> and continues to spread is mind boggling > > The behavior of writing in all caps, > or the behavior of equating such writing with shouting ? The latter

Re: NEED HELP-process words in a text file

2011-06-26 Thread Cousin Stanley
Steven D'Aprano wrote: > If ONE word in uppercase is read in a SLIGHTLY louder voice, > then naturally it doesn't take much imagination TO READ > EVEN QUITE SHORT PASSAGES OF UNINTERRUPTED UPPERCASE WORDS > AS SHOUTING LOUDLY -- And it doesn't take much of a reality check through my own

Re: Automatic placement of a text box? ie empty legend [matplotlib]

2011-06-29 Thread Cousin Stanley
Christopher Barrington-Leigh wrote: > I'd like to have the Sample A box place itself > in the optimal empty space, so as not to overlay > any graphing elements (if possible): > A simple alternative might be to place the label just outside of the plot region either at the top or the

Re: web browsing short cut

2011-07-07 Thread Cousin Stanley
Chris Angelico wrote: > > > http://blah/blah";> > http://another/blah";> > > > http://third/blah";> > http://final/blah";> > > > > That should divide your screen four ways > ( if I haven't botched my HTML > - ages since I've used frames ). html !botched :-

Re: python xauth

2011-07-10 Thread Cousin Stanley
kracekumar ramaraju wrote: > I am looking to use xauth in python ? > > It is for my command line process, > I would like to have few examples > and resources. A simple example >>> import subprocess as SP >>> >>> proc = [ 'xauth' , 'list' , ':0' ] >>> >>> pipe = SP.Popen( proc , stdo

Re: learning another programing language

2011-07-24 Thread Cousin Stanley
Benjamin Gregg wrote: > > I want to know is there any good tutorials or tips > for learning C++/java after using python? You might find the following site to be useful java information http://mindprod.com/jgloss/jgloss.html -- Stanley C. Kitching Human Being Phoenix, Arizo

Only 7 Years

2011-03-29 Thread Cousin Stanley
On May 8, 2004 I posted a note[1] here in comp.lang.python with a subject line of Lost : Plot_Demo looking for a small 2d plot program that I had seen, misplaced, and which I thought came along as a demo with a PYTHON installation This morning after rooting about in an old JYT

Re: pyGTK identify a button

2011-05-25 Thread Cousin Stanley
Tracubik wrote: > Hi all, > i'm trying to write a simple windows with two button in GTK, > i need a way to identify wich button is pressed. > #!/usr/bin/env python import gtk def console_display( button , args ) : a0 , a1 , a2 = args print '%s %s %s ' % ( a0 , a1 , a2

Re: enum

2017-10-31 Thread Cousin Stanley
ast wrote: > https://docs.python.org/3.5/library/enum.html#planet > > Documentation says that the value of the enum > members will be passed to this method. > > But in that case __init__ waits for two arguments, mass > and radius, while enum member's value is a tuple. > > It seems that there is

Re: Problem: Need galileo running on debian wheezy

2018-03-01 Thread Cousin Stanley
Gene Heskett wrote: > I know its supposed to be in the debian stretch repo's. > > I've been told to get a fitbit, but they don't support linux > of any flavor, and that leaves galileo as the possible solution? > > So how should I proceed since the only stretch machine I have ATM > is an arm64,

Re: Problem: Need galileo running on debian wheezy

2018-03-02 Thread Cousin Stanley
Gene Heskett wrote: > > And the rock64 doesn't have wifi hardware > that I know of. > I did manage to get wifi working on my rock64 using a usb wifi dongle ordered from their store It was a bit fiddly to set up, somewhat shaky connection-wise, and slower than I was com

Re: Convert the decimal numbers expressed in a `numpy.ndarray` into a matrix representing elements in fractional form

2022-05-18 Thread Cousin Stanley
#!/usr/bin/env python3 ''' NewsGroup comp.lang.python Subject .. Convert the decimal numbers expressed in a numpy.ndarray into a matrix representing elements in fractiona Date . 2022-05-16 Post_By ..

Re: Convert the decimal numbers expressed in a `numpy.ndarray` into a matrix representing elements in fractional form

2022-05-23 Thread Cousin Stanley
> hongy... wrote > > This method doesn't work, as shown below: > ? b > > [0.0, -1.0, 0.0, 0.25] > [1.0, 0.0, 0.0, 0.25] > [0.0, 0.0, 1.0, 0.25] > [0.0, 0.0, 0.0, 1.0] > > a > > 0 0 0 1 > # --- Using debian 11.3 bullseye python 3.9

Re: issue with seaborn

2021-02-20 Thread Cousin Stanley
Dino wrote: > trying to do some dayaviz with Italian Covid Open Data ( > https://github.com/italia/covid19-opendata-vaccini/ ) > > here's how I pull my data: > > import sys > import urllib.request > import pandas as pd > import ssl > ssl._create_default_https_context

Re: Where is the problem?

2021-02-26 Thread Cousin Stanley
RD wrote: > Python 3.4.3 on WinXP. > > I create a Tk canvas and draw on it with create_text(), > create_line(), and create_polygon with fill and stipple. > > So far, so good, looks fine on the screen. > > So I go to send it to a postsctript file: > > bmap.postscript(file="tmp.ps", colormode='c

Re: Where is the problem?

2021-02-27 Thread Cousin Stanley
RD wrote: > In article , [email protected] says... > > [snip] > >> I have a couple of postscript saving examples >> that include the following geometry parameters >> which produce .ps files that render the same >> as the canvas drawings when viewed in ghostsript. > >> retva

Re: What to write or search on github to get the code for what is written below:

2022-01-28 Thread Cousin Stanley
Dennis Lee Bieber wrote: > > How would you do this assignment on paper ? > Your patience and willingness to help and guide someone else with such a complete and understanable post is hihgly commendable. Thanks -- Stanley C. Kitching Human Being Phoenix, Arizona -- htt

Re: What to write or search on github to get the code for what is written below:

2022-01-28 Thread Cousin Stanley
Dennis Lee Bieber wrote: > Ignoring the code spam I presume > I'm an sqlite user myself and was glad to see the code you posted and have a couple of tiny example book/author sql3 databases but nothing resembling an actual library check in/out program I've never used PySi

Re: Python LSTM forecast future values for time series

2022-02-12 Thread Cousin Stanley
Jorge Conforte wrote: > > I'm starting run the LSTM to forecast future values for time serie data. > > please can someone give me some information > on how i can predict future values ​​> for my time series using LSTM. Thanks, Conrado I cannot personlly help but a google search using

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-10 Thread Cousin Stanley
Marco Sulla wrote: >> >> Maybe Debian itself? > > I tried Debian on a VM, but I found it too much basical. A little > example: it does not have the shortcut ctrl+alt+t to open a terminal > that Ubuntu has. I'm quite sure it's simple to add, but I'm starting > to be old and lazy... > I use the

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-11 Thread Cousin Stanley
Cousin Stanley wrote: >> apt-cache search lxqt | grep ^lxqt Chris Angelico wrote: > Much faster: > > apt-cache pkgnames lxqt > > apt-cache search will look for "lxqt" in descriptions too, > hence the need to filter those out > > apt-cache pkgnames

Re: Python Dice Game/Need help with my script/looping!

2016-11-03 Thread Cousin Stanley
Constantin Sorin wrote: > Hello,I recently started to make a dice game in python. > > Everything was nice and beautiful,until now. > > My problem is that when I try to play and I win or lost > or it's equal next time it will continue only with that. > Following is a link to a version o

Re: Get min and max dates

2016-12-08 Thread Cousin Stanley
DFS wrote: > > Not wanting to use any date parsing libraries, > If you happen reconsider date parsing libraries the strptime function from the datetime module might be useful #!/usr/bin/env python3 from datetime import datetime dates = [ '10-Mar-1998' , '20

Re: How to move the scrollbar to inside the text widget

2018-06-03 Thread Cousin Stanley
[email protected] wrote: > I am a Newbie > > I have this code > > from tkinter import * > > root = Tk() > root.geometry("1200x1000+30+30") > # width x height + x_offset + y_offset: > T = Text(root, height=10, width=100) > T.place(x=20, y=30) > for i in range(40): >T.insert(END, "This is l

Re: [Tutor] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in Python

2018-11-09 Thread Cousin Stanley
srinivasan wrote: > Even after changing as per the below > "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3" > or: > 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3' > or: > "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3" > > Still my output is: > */dev/mmcblk1p1: LABEL="efi" UUID="1084

Re: Guys, can you please share me some sites where we can practice python programs for beginners and Intermediate.

2016-06-23 Thread Cousin Stanley
DFS wrote: > Here's a fun one: scraping data off a website, > and storing it in a SQLite database file. > After testing your example code here I found that the length of the categories list was 1 less than the terms list after applying dropwords in the terms list comprehensio

Re: Guys, can you please share me some sites where we can practice python programs for beginners and Intermediate.

2016-06-23 Thread Cousin Stanley
DFS wrote: > On 6/23/2016 11:11 AM, Cousin Stanley wrote: >> DFS wrote: >> >>> Here's a fun one: scraping data off a website, >>> and storing it in a SQLite database file. >>> >> >> After testing your example code here I found &g

Re: Assignment Versus Equality

2016-06-26 Thread Cousin Stanley
Dennis Lee Bieber wrote: > > but I'm sure we'd have a revolt > if Python comparison operators looked like: > > a .eq. b > a .ne. b > a .gt. b .or. c .lt. d > a .le. b .and. c .ge. d > As someone who learned fortran in the mid 1960s and pounded a lot of fortran code in the 1970s

Re: Stupid question, just need a quick and dirty fix

2016-07-22 Thread Cousin Stanley
Jordan Bayless wrote: > > desired = Id < 10 or Id > 133 or Id in good_ids > > When I try to validate whether I passed that check, > I'm told there's a Name error and it's not defined > On the outside chance that failing to define Id produces the Name error, I defined Id in a fo

Re: Program to keep track of success percentage

2018-12-10 Thread Cousin Stanley
Musatov wrote: > I am thinking about a program where the only user input is win/loss. > > The program let's you know if you have won > more than 31% of the time or not. > > Any suggestions about how to approach authoring > such a program? Thanks. The following results are from a python to

Re: polar coordinates?

2018-12-10 Thread Cousin Stanley
Brian Christiansen wrote: > > I guess my question is if python can do this natively > or if there is a package somewhere ( polar.py ? ) that can do this > You might consider matplotlib for polar coordinate plotting ... https://matplotlib.org/examples/pylab_examples/polar_demo.

Re: Make sure the window title is visible in tkinter

2019-06-26 Thread Cousin Stanley
Cecil Westerhof wrote: > I need to write a desktop program. I choose to use tkinter. > > How can I make sure the window title is visible? For example > when I have the following code : > from tkinter import Button, filedialog, Label, messagebox, Tk > > > window = Tk() > wind

Re: Make sure the window title is visible in tkinter

2019-06-30 Thread Cousin Stanley
Cousin Stanley wrote >> You might try setting a given window geometry >> to accomodate the long title >> >> win_w = 400 >> win_h = 300 >> >> ofs_h = 40 >> ofs_v = 30 >> >> window.geometry( "%dx%d+%d+%d" % (

Re: Enumerate - int object not subscriptable

2019-08-20 Thread Cousin Stanley
Sayth Renshaw wrote: > I want to do basic math with a list. > > a = [1, 2, 3, 4, 5, 6, 7, 8] > > for idx, num in enumerate(a): > print(idx, num) > > This works, but say I want to print the item value > at the next index as well as the current. > > for idx, num in enumerate(a): > > print(n

Re: question about making an App for Android

2019-10-15 Thread Cousin Stanley
Chris Angelico wrote: > Or maybe it's really simple, because there's an HTTP API >that > gives you the information. > > There's an API for everything these days. > > A quick web search showed up this: > > https://sunrise-sunset.org/api > There is also a useful python package c

Re: question about making an App for Android

2019-10-15 Thread Cousin Stanley
Cousin Stanley wrote: > > d_sse = sse_sunset - sse_sunrise # seconds of daylight > I think it might be required to convert utc time to local time for the difference in sunrise and sunset times to make sense in local time -- Stanley C. Kitching Human Bein

Re: question about making an App for Android

2019-10-15 Thread Cousin Stanley
Cousin Stanley wrote: > There is also a useful python package > called sunset which I fouund a reference to > on stackoverflow Maybe I'll wake up some time today :-) The python package is called suntime not sunset # pip3 show suntime -- Stanley C. Kitchi

Re: upgrading python on raspbian

2019-10-16 Thread Cousin Stanley
Gene Heskett wrote: > Continueing this thread, I now have a missing function by name, "units", > that is preventing LinuxCNC from running. > > Where in the python 3 world do I find that function?, > Under debian buster there is a python 2 package called python-quantities that apparent

Re: How to get filesystem in python.

2020-01-17 Thread Cousin Stanley
Antoon Pardon wrote: > I would like to get the information given by the df command on linux/unix. > I found the os.statvfs call, but it misses one thing: The filesystem. > > Does anyone know how to get that information. > import os pipe_in = os.popen( 'df -h -T -x tmpfs -x devtmpfs' ) lis

Re: Floating point issue

2020-04-17 Thread Cousin Stanley
Aakash Jana wrote: > I am calculating couple of ratios and according to the problem > there must be a 6 decimal precision. > > But when I print the result I only get one 0. > > E.g:- 2 / 5 = 0.40 but I am only getting 0.4 You might try using a ' '.format string ratios = { '1/8'

Re: Button press event - event handling and picking: IndexError: list index out of range

2020-06-09 Thread Cousin Stanley
Caledonian26 wrote: > However, I keep getting the error: > > IndexError: list index out of range. > > Could anyone give me a helping hand > as to where I am going wrong? > I appended a single arbitrary value for limits since the limits list had not been previously initial

Re: How do I place a preset into the text box?

2020-08-28 Thread Cousin Stanley
Steve wrote: > The following program compiles but does not quite do what I would like it to > do. Line 19 is the preset information but I do not seem to be able to get it > into the form by code. My purpose is to let the user make changes without > having to re-enter the entire code. > You

Re: How do I get datetime to stop showing seconds?

2020-10-16 Thread Cousin Stanley
Steve wrote: > d2 = datetime.datetime.now() #Time Right now > > Show this: 2020-10-16 02:53 > and not this: 2020-10-16 02:53:48.585865 > > > == > Footnote: > If you double major in psychology and reverse psychology, to they cancel > e

Re: Seeking guidance to start a career in python programming

2020-11-05 Thread Cousin Stanley
ankur gupta wrote: > Good Morning to All, > My name is Ankur Gupta and I wish to seek guidance from you. > > I belong to a non-computer science background > but have always been attracted to this field. > > I had computer science in class 12th ( Where I learned C++ > and Python ) but I did

Re: [ANN] XPN 0.5.5 released

2005-10-14 Thread Cousin Stanley
> XPN (X Python Newsreader) is a multi-platform newsreader > with Unicode support. > > You can find it on: > > http://xpn.altervista.org/index-en.html > > http://sf.net/projects/xpn> > > Changes in this release: > Cousin Nemesis Are the new xpn 5.5 config & data files

Re: [ANN] XPN 0.5.5 released

2005-10-14 Thread Cousin Stanley
> I'm not 100% sure but I think that they could work. > > The only thing is changed is the outgoing articles format, > so if you have article in the oubox delete them > >> Can I install the newer xpn version >> and move the older data files into it >> without reconfiguring & reloading data

Re: [ANN] XPN 0.5.5 released

2005-10-14 Thread Cousin Stanley
>> Can I install the newer xpn version >> and move the older data files into it >> without reconfiguring & reloading data files ? Cousin Nemesis This worked OK with no problems and I'm posting this reply via xpn-0.5.5 I copied the following from the older xpn-0.5.0 version

Re: [ANN] XPN 0.5.5 released

2005-10-15 Thread Cousin Stanley
> I'd add also config.txt ;-) I did but failed to include it in the list I posted One small config problem that I haven't figured out how to deal with I use a dark background with white foreground text When posting a reply in the compose/edit window th

Re: [ANN] XPN 0.5.5 released

2005-10-16 Thread Cousin Stanley
>> Is there an incantation I can add to the config file >> that might render the cursor visible on a dark background ? > > It's a well known issue, I haven't found a way > to change the cursor color yet :-/ > > I also posted an help request on the pygtk list, > but I had no useful replies.

Re: strange problems with urllib2

2005-10-27 Thread Cousin Stanley
> When I run this code on windows it runs quickly > (about a second per image) but when I run it on linux > it runs very very slowly (10+ seconds per image). > jdonnell I'm running a 1999 vintage 250 MHz Compaq with Debian Gnu/Linux & Python 2.3.5 The following version

python-mysqldb__debian_to_freebsd

2005-11-16 Thread Cousin Stanley
Greetings I'm using a commercial web host running FreeBSD that fortunately has Python and MySQL, but no python-mysqldb module Before begging the host to install it I thought I would try the Debian version that I have on the outside chance that it might fly directly

Re: python-mysqldb__debian_to_freebsd

2005-11-17 Thread Cousin Stanley
> > For the interested, the OP (Stanley Kitching), wants to use a > python-mysqldb module on his web host running FreeBSD. They don't have > the that installed, so he tried getting the Debian binary distrubtion > of the library to work, and failed. He's wondering if this is at all > possible.

Re: Looking For Geodetic Python Software

2005-06-23 Thread Cousin Stanley
| | 1) Given the latitude/longitude of two locations, compute the distance |between them. | | "Distance" in this case would be either the straight-line |flying distance, or the actual over-ground distance that accounts |for the earth's curvature. # ---

Re: any Python equivalent of Math::Polynomial::Solve?

2005-03-01 Thread Cousin Stanley
Alex Thanks for posting your generalized numarray eigenvalue solution It's been almost 30 years since I've looked at any characteristic equation, eigenvalue, eignevector type of processing and at this point I don't recall many of the particulars Not being sure about the

Re: smtplib Segfaults Python under Debian

2005-03-01 Thread Cousin Stanley
| localhost:~alex#python | Python 2.3.3 (#2, Feb 24 2004, 09:29:20) | [GCC 3.3.3 (Debian)] on linux2 | Type "help", "copyright", "credits" or "license" | for more information. | | >>> import smtplib | | Segmentation fault (core dumped) | | This happens under python 2.2 and 2.3 and 2.4 | Alex .

Re: any Python equivalent of Math::Polynomial::Solve?

2005-03-02 Thread Cousin Stanley
| In case you are still interested pygsl wraps the GSL solver. | | from pygsl import poly | | pc = poly.poly_complex( 3 ) | | tmp, rs = pc.solve( ( 2 , 3 , 1 ) ) | | print rs | | | You get pygsl at http://sourceforge.net/projects/pygsl/ Pierre I am still interested and have downloa

Re: any Python equivalent of Math::Polynomial::Solve?

2005-03-06 Thread Cousin Stanley
| In case you are still interested pygsl wraps the GSL solver. | | | from pygsl import poly | | pc = poly.poly_complex( 3 ) | | tmp , rs = pc.solve( ( 2 , 3 , 1 ) ) | | print rs | | | You get pygsl at http://sourceforge.net/projects/pygsl/ Pierre Thanks again for the link to the Py

Re: any Python equivalent of Math::Polynomial::Solve?

2005-03-06 Thread Cousin Stanley
| | Did you perhaps use a list (type(p) == type([])) for p? | Alex Using the coefficients in an array instead of a list was the key in the solution to my problems Your other suggestions regarding floating p and the off-by-one error that I had with the polynomial degr

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Cousin Stanley
| On debian, it | | apt-get install wxPython2.5.3 | | So it clearly depends on you distribution. | | That this is unfortunate is of course true... | Diez The package for wxPython2.5.3 currently is available for Debian Sid/unstable but not for Sarge/testing -- Cousin Stanley

Re: Python-Help ( Mean,Median & Mode)

2004-12-05 Thread Cousin Stanley
' print 'or a period . to exit Input Mode \n' num_entries = len( list_input ) print 'Input List \n' for this_item in list_input : print '%s' % this_item print '\n# Entries %s \n' % num_entries -- Cousin Stanley Human Being Phoenix, Arizona -- http://mail.python.org/mailman/listinfo/python-list

gnuplot -reverse

2005-03-25 Thread Cousin Stanley
Experimenting with the gnuplot package under Debian Linux, I've found that the -reverse option when used to start gnuplot from the command-line will produce plots that are color-reversed and render with white text on a black background However, I'm too dense to see how to easily achieve the

Re: wxPython Install

2005-03-26 Thread Cousin Stanley
| | If I can't install an operating system then put wxPython on it | without jumping through hoops, my probelm will be wxPython. | James Under Debian GNU/Linux installing Python and wxpython using the apt package manager is accomplished via the command lines # apt-

Re: python 3.3 repr

2013-11-15 Thread Cousin Stanley
> > We don't say len({42: None}) to discover > that the dict requires 136 bytes, > why would you use len("heåvy") > to learn that it uses 23 bytes ? > #!/usr/bin/env python # -*- coding: utf-8 -*- """ illustrate the difference in length of python objects and the size of thei

Re: [newbie] struggling wth tkinter

2013-12-07 Thread Cousin Stanley
> > The only thing I see when running it is a little popup > with "Click mouse here to quit" which works as expected > but always shows the following error-message. This seems to be left over from an earlier post where you were binding a mouse event to a tk label Did you create a

Re: [newbie] struggling wth tkinter

2013-12-08 Thread Cousin Stanley
> > This is what I get: > > Traceback (most recent call last): > File "./feet2meters.py", line 2, in > from tkinter import * > File "/home/jean/tkinter.py", line 2, in > import Tkinter as tk > ImportError: No module named Tkinter > From your original post I only changed the she-bang

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Cousin Stanley
Rick Johnson wrote: Dovetails are nothing more than sadistic nostalgia -- they give old men a "chubby" and young men a nightmare. There is nothing more satisfying than cutting a set of dovetails by hand and having them glide together like silk, the first time you test-fit them, with no da

Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Cousin Stanley
>> On 30/12/2013 12:16, [email protected] wrote: >> >> >> thanks a bunch. the "%.6f" was the cure. >> can you please point me to the doc for formatting time? >> Thanks! >> > Would you please read and action this > https://wiki.python.org/moin/GoogleGroupsPython > to prevent

Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Cousin Stanley
>> You might consider either turning off an option >> in your news client for including message in reply >> and/or snipping all but a few lines for context >> to prevent us from seeing the double line spacing >> all over again :-) > Great idea, but one slight snag is > the poster then does

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-25 Thread Cousin Stanley
> Occasionally I have to make forays into Javascript, > can anyone recommend a place similar to this list > where Javascript questions can be asked ? Several years back I found the newsgroup comp.lang.javascript to be helpful However, I haven't used that group for som

Re: [ANN] dbf v0.96 is released

2014-10-28 Thread Cousin Stanley
> > dbf > === > > dbf (also known as python dbase) is a module > for reading/writing dBase III, FP, VFP, > and Clipper .dbf database files. > Available via PyPI at ? https://pypi.python.org/pypi/dbf/0.96.001 -- Stanley C. Kitching Human Being Phoenix, Arizona -- https://ma

Re: Dictionaries with variable default.

2014-11-04 Thread Cousin Stanley
> So How should I call this: > > class ...dict(dict): > def __init__(self, fun): > self.fun = fun > > def __missing__(self, key): > return self.fun(key) I don't know how you should, but I tried the following which seems to work class KeyPlusOne( dict ) : def __

Re: pack circles into a partial annulus

2014-11-20 Thread Cousin Stanley
> I need to pack circles into a partial annulus ie part of a larger circle > bounded by two radii and angles of say 18 & 90. You might take a look at Descartes Circle Theorem http://en.wikipedia.org/wiki/Descartes'_theorem Blub from google search In geometry, Descartes

Re: Glade/Python - positioning main window at startup

2014-12-30 Thread Cousin Stanley
> > Problem: Can anyone help me find settings (either in Glade or elsewhere) > which will start the application window with the application window center > aligned with the desktop center ? You might try the following entry in your .glade file center -- Stanley C. Kitch

Re: Beginner question - class definition error

2015-01-28 Thread Cousin Stanley
> from kivy.app import App > from kivy.uix.label import Label > > class MyApp(App): > def build(self): > return Label(text='Hello World') > > if __name__ == '__main__': > MyApp().run() > > > > I get this error when I run it: > > > Traceback (most recent call last): > File

Re: Cairo module

2015-02-04 Thread Cousin Stanley
> > Could matplotlib be used to show the image? You might consider using python-imaging to display the image after writing it from cairo import image surface.write_to_png ( "x_surface.png" ) img = Image.open( "x_surface.png" ) img.show( command = 'display' )

Re: Cairo module

2015-02-04 Thread Cousin Stanley
> You might consider using python-imaging > to display the image after writing it > from cairo > > import image import statement should be import Image note uppercase I -- Stanley C. Kitching Human Being Phoenix, Arizona -- https://mail.python.org/mailman/listinfo/py

Re: pyqtgraph window position

2015-02-13 Thread Cousin Stanley
> I can control the size of my pyqtgraph window below > with 'resize'. > > But how can I control the position on the screen ? > > import pyqtgraph as pg > > w = pg.GraphicsWindow() > w.resize(250,400) > > for i in range(4): > w.addPlot(0, i) > > def onClick(event): > but=event.button()

Re: pyqtgraph window position

2015-02-13 Thread Cousin Stanley
> I can control the size of my pyqtgraph window below with 'resize'. > > But how can I control the position on the screen? > Also, try w.setGeometry( x_pos , y_pos , width , height ) -- Stanley C. Kitching Human Being Phoenix, Arizona -- https://mail.python.org/mailman/listinf

Re: Top down Python

2014-02-12 Thread Cousin Stanley
> > 3) Create terminal window with size 64x20 > (which, IMO, is tiny) > Maybe 64 characters x 20 lines -- Stanley C. Kitching Human Being Phoenix, Arizona -- https://mail.python.org/mailman/listinfo/python-list

Re: Can someone suggest better resources for learning sqlite3? I wanted to use the Python library but I don't know sql.

2013-08-03 Thread Cousin Stanley
Aseem Bansal wrote: > > Can someone suggest me better resources > for learning sql/sqlite3 ? http://docs.python.org/3/library/sqlite3.html http://wiki.python.org/moin/DbApiCheatSheet http://www.w3schools.com/sql/default.asp http://www.sqlcourse.com/index.html http://sqlite.org

Re: [tkinter] trouble running imported modules in main program

2013-08-07 Thread Cousin Stanley
Terry Reedy wrote: > Code comments : > > double and triple spacing code > make it painful to read, Not for everyone :-) I prefer mostly double-spaced code in any language > especially in a 10 line box. Agree, but the 10 line box would not be used for routin

Re: The meaning of "doubt", was Re: Python Basic Doubt

2013-08-10 Thread Cousin Stanley
Peter Otten wrote: > > doubt > Oh bother, said Pooh, what's in a word ? http://en.wikipedia.org/wiki/Curry https://pypi.python.org/pypi/curry/ http://en.wikipedia.org/wiki/Currying -- Stanley C. Kitching Human Being Phoenix, Arizona -- http://mail.python.org/mailm

Re: Python Worst Practices

2015-02-28 Thread Cousin Stanley
> From : Tim Chase > > A quick google-and-tally for languages > and their corresponding number of keywords: > re-sorted 21 : Lua 31 : Python2.x 33 : Python3.x 33 : C 37 : Pike 40 : Perl 40 : Ruby 50 : Java 54 : Pascal

Re: Classic OOP in Python

2015-06-18 Thread Cousin Stanley
> > python -m doctest application.py > > And from there, I would build up extra doc tests > An extra doc test that fails #!/usr/bin/env python """ NewsGroup comp.lang.python Subject .. Classic OOP in Python Date . 2015-06-17 Post_By ..

Re: pygtk2 and colors

2015-07-07 Thread Cousin Stanley
> With python 2.7.5, pygtk 2.24, gtk 2.24: > The following snippet successfully sets the line_width > but not the foreground color, and I can't figure-out why. > > The color human-name and the result returned > by gtk.gdk.color_parse are correct. Clues? Thanks. > > self.gc.set_line_attributes

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-21 Thread Cousin Stanley
W. eWatson wrote: > My criterion for success is that it puts IDLE as a choice for editor > on the menu produced with a right-click on a py file. > > So far no response on this has solved the problem. > As an alternative you might consider adding a short-cut to IDLE to the Send To di

Re: Import Json web data source to xls or csv

2013-02-19 Thread Cousin Stanley
io wrote: > > How do i manage to read the data source > from http://bitcoincharts.com/t/markets.json > > I just need currency, symbol, bid, ask, volume > Following is a simple way load the json data and write the desired fields to a .csv file import json import urllib url

Re: Performance of int/long in Python 3

2013-03-25 Thread Cousin Stanley
Chris Angelico wrote: > The Python 3 merge of int and long has effectively penalized > small-number arithmetic by removing an optimization. > > The cost is clear. > The cost isn't quite as clear under Debian Wheezy here Stanley C. Kitching Debian Wheezy python inlin

Re: Performance of int/long in Python 3

2013-03-26 Thread Cousin Stanley
Chris Angelico wrote: > Interesting, so your 3.x sum() is optimizing something somewhere. > Strange. Are we both running the same Python ? > > I got those from apt-get > I also installed python here under Debian Wheezy via apt-get and our versions look to be the same -sk-

Re: Performance of int/long in Python 3

2013-03-26 Thread Cousin Stanley
Chris Angelico wrote: > Once again, Py3 is slower on small integers than Py2. Chris Angelico Ubuntu Karmic. Pentium(R) Dual-Core CPU E6500 @ 2.93GHz. python inline range_sum forloop forloop_offset 2.6.4 2.7050 2.6492 6.5877 16.5168 3.1.1 4.4453 4.3731 12

Re: can anyone help me in developing a simple webpage in jinja2

2013-04-07 Thread Cousin Stanley
Satabdi Mukherjee wrote: > i am a rookie in python and i am trying > to develop a simple webpage using jinja2. > > can anyone please help me how to do that You might try using your jinja template with named tuples # --- from jinja2 import Tem

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-10 Thread Cousin Stanley
someone wrote: > > I want to put this table into an appropriate container > such that afterwards I want to: > > 1) Put the data into a mySql-table > 2) Be able to easily plot column 1 vs. either of the other columns > using matplotlib etc... > Consider editing your data file into

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-11 Thread Cousin Stanley
someone wrote: > > I want to put this table into an appropriate container > such that afterwards I want to: > > 1) Put the data into a mySql-table > You might consider using sqlite3 as a database manager since it is "batteries included" with python The stand-alone sqlite

  1   2   >