Re: Python on Windows with linux environment

2016-06-02 Thread Wildman via Python-list
On Thu, 02 Jun 2016 04:22:45 -0700, Muhammad Ali wrote: > Hi, > > I use windows regularly, however, I use linux for only my research work at > supercomputer. In my research field (materials science) most of the scripts > are being written in python with linux based system. Could I installed

Re: while Loops

2016-06-21 Thread Wildman via Python-list
On Tue, 21 Jun 2016 20:50:24 -0700, Elizabeth Weiss wrote: > i=1 > while i<=5: >print(i) >i=i+1 > > The result is: > 1 > 2 > 3 > 4 > 5 > > Why is one of the results 5 since i=i+1? Should the maximum result be 4 since > 4 +1=5? > > Thanks for your help! The operator '<=' means less

[Newbie] Tkinter Question

2016-02-23 Thread Wildman via Python-list
I am familiar with OO programming but I am new to Python and Tkinter. I am working on a gui program that creates a couple of temporary files. As part of the Exit button command they are deleted. If the program is shut down using the window close button [X], the exit button code is not executed

Request Help With Displaying XBM Image

2016-02-26 Thread Wildman via Python-list
As part of a program I am working on I want to display a 48x48 XBM image on the main window. I have done a lot of searching for code snippets and I found what appears to be the correct way to do it using a Label. So far I have not been able to get it to work. I have tried different variations

Re: The Real-Time Use of Python in Data Science World!

2016-02-26 Thread Wildman via Python-list
On Fri, 26 Feb 2016 11:35:58 -0800, Anita Goyal wrote: > This course (...) What!? No peas? I like peas with spam. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: [Newbie] Tkinter Question

2016-02-24 Thread Wildman via Python-list
On Tue, 23 Feb 2016 16:19:43 -0600, Wildman wrote: > Thanks to Christian and Chris. You both gave me much to think about and to experiment with. That adds to my on-going learning experience. This is the first thing I tried: The Exit button has this: command=self.quit Then I have this:

Request More Help With XBM Image

2016-02-29 Thread Wildman via Python-list
I want to take an image file, convert it to XBM format and display it. Thanks to Mr. Otten I can open and display the XBM image without any problems. The script first calls an external program for the image conversion then I can open and display it. Of course, I am left with the XBM file that

Re: Request Help With Displaying XBM Image

2016-02-26 Thread Wildman via Python-list
On Fri, 26 Feb 2016 22:49:58 +0100, Peter Otten wrote: > Wildman via Python-list wrote: > It's not you, the program as you wrote it should and would show the image, > were it not for an odd quirk in how images are handled in tkinter: > > You have to keep an explicit referen

Re: Request More Help With XBM Image

2016-03-01 Thread Wildman via Python-list
On Tue, 01 Mar 2016 20:30:59 +0100, Christian Gollwitzer wrote: > Am 29.02.16 um 22:51 schrieb Wildman: >> I want to take an image file, convert it to XBM format and >> display it. Thanks to Mr. Otten I can open and display the >> XBM image without any problems. The script first calls an >>

Re: Request More Help With XBM Image

2016-03-01 Thread Wildman via Python-list
On Tue, 01 Mar 2016 19:26:55 +0100, Peter Otten wrote: > An exception is raised because you pass the command as a single argument I did not realize that how the command was passed would make such a difference. I guess I am stuck in my old VB habits for creating variables. You don't have to

Re: Request More Help With XBM Image

2016-03-01 Thread Wildman via Python-list
On Tue, 01 Mar 2016 12:56:03 -0600, Wildman wrote: > On Tue, 01 Mar 2016 19:26:55 +0100, Peter Otten wrote: > >> An exception is raised because you pass the command as a single argument > > > > I did not realize that how the command was passed would > make such a difference. I guess I am

Re: Different sources of file

2016-03-15 Thread Wildman via Python-list
On Mon, 14 Mar 2016 20:56:44 +, Val Krem wrote: > #!/usr/bin/python On some Linux systems python is installed in /usr/local/bin. I would suggest using the hash-bang below. It will insure python will run no matter where it was installed. #!/usr/bin/env python -- GNU/Linux user #557453

Re: Different sources of file

2016-03-14 Thread Wildman via Python-list
On Mon, 14 Mar 2016 20:56:44 +, Val Krem wrote: > #!/usr/bin/python On some Linux systems python is installed in /usr/local/bin. I would suggest the hash-bang below then python will run no matter where it was installed... #!/usr/bin/env python As a python newbie myself, I can't really give

Re: pygtk button right/middle click

2016-03-30 Thread Wildman via Python-list
On Wed, 30 Mar 2016 19:23:35 +, Grant Edwards wrote: > On 2016-03-30, Grant Edwards wrote: >> On 2016-03-30, Wildman wrote: >> Is the gtk button widget really incapable of handling left or middle mouse buttons or shift/ctrl/alt

Re: pygtk button right/middle click

2016-03-30 Thread Wildman via Python-list
On Wed, 30 Mar 2016 15:36:12 +, Grant Edwards wrote: > I'm trying to figure out how to get a pygtk button respond to > somehting other than just a simple "left click". With a standard > 3-button mouse, X11 provides at least 9 different "click" types, but > the pygtk button only seems to

Re: [newbie] tkFileDialog does not show title

2016-03-28 Thread Wildman via Python-list
On Mon, 28 Mar 2016 14:10:28 -0700, jenswaelkens wrote: > I'm using the tkFileDialog-module in Python 2.7, it works fine except for one > thing: when I add a title, the title isn't shown. > > e.g. I have this line of code: > inputfilename=tkFileDialog.askopenfilename(defaultextension=".dat", >

Re: Python, Linux, default search places.

2016-04-07 Thread Wildman via Python-list
On Thu, 07 Apr 2016 13:02:46 +0200, Frantisek.Fridrich wrote: > Hello. > > I run a third party program that can use a system installation of Python. > I have to modify environment variables: > PYTHONPATH, > PATH, > LD_LIBRARY_PATH. > > All these environment variables are empty at the

Re: hourly weather forecast data

2016-04-12 Thread Wildman via Python-list
On Tue, 12 Apr 2016 23:36:26 -0400, kamaraju kusumanchi wrote: > Is there a way to get hourly weather forecast data (temperature, > chance of precipitation) from the command line in Debian Linux? > > Basically, I am trying to write a python program that will send myself > an email if it is going

Re: Copy To Clipboard Highlighted Text From Text Widget

2016-03-21 Thread Wildman via Python-list
On Tue, 22 Mar 2016 02:01:53 +, MRAB wrote: > On 2016-03-22 01:47, Chris Angelico wrote: >> On Tue, Mar 22, 2016 at 12:24 PM, Wildman via Python-list >> <python-list@python.org> wrote: >>> I have a gui that has text widget and I want to be able to >

Copy To Clipboard Highlighted Text From Text Widget

2016-03-21 Thread Wildman via Python-list
I have a gui that has text widget and I want to be able to copy to the clipboard the text that is highlighted or the text widget's entire contents if no text is highlighted. This line of code works for the highlighted text: text2copy = self.text.get(tk.SEL_FIRST, tk.SEL_LAST) However, this

Re: Copy To Clipboard Highlighted Text From Text Widget

2016-03-21 Thread Wildman via Python-list
On Tue, 22 Mar 2016 12:47:11 +1100, Chris Angelico wrote: > On Tue, Mar 22, 2016 at 12:24 PM, Wildman via Python-list > <python-list@python.org> wrote: >> I have a gui that has text widget and I want to be able to >> copy to the clipboard the text that is highlighted

Re: Key Binding Problem

2016-03-23 Thread Wildman via Python-list
On Wed, 23 Mar 2016 20:34:08 -0400, Dennis Lee Bieber wrote: > On Wed, 23 Mar 2016 10:58:09 -0500, Wildman via Python-list > <python-list@python.org> declaimed the following: > >>On Wed, 23 Mar 2016 02:47:47 -0400, Terry Reedy wrote: >> >>> def load_image

Problem With Embedded Icon and Python 3.4

2016-03-24 Thread Wildman via Python-list
I have a program that I have been trying to rewrite so it will run on Python 2.7 and 3.4. It has been a pain to say the least. Thank $DIETY for aliases. Anyway, I got it all working except for one thing. The program has an embedded icon. It is displayed in the window's titlebar. The icon is a

Re: Key Binding Problem

2016-03-24 Thread Wildman via Python-list
On Thu, 24 Mar 2016 21:43:26 -0400, Dennis Lee Bieber wrote: > On Thu, 24 Mar 2016 11:19:52 -0500, Wildman via Python-list > <python-list@python.org> declaimed the following: > >> >>I believe I understand. Thanks. If you can't tell, I'm new to >>Python so

Re: Key Binding Problem

2016-03-24 Thread Wildman via Python-list
On Thu, 24 Mar 2016 08:06:28 -0400, Dennis Lee Bieber wrote: > On Wed, 23 Mar 2016 21:17:57 -0500, Wildman via Python-list > <python-list@python.org> declaimed the following: > >> >>I was referring to procedures called by a button click as >>opposed to a

Re: Problem With Embedded Icon and Python 3.4

2016-03-25 Thread Wildman via Python-list
On Fri, 25 Mar 2016 01:30:17 -0400, Terry Reedy wrote: > On 3/25/2016 1:10 AM, Wildman via Python-list wrote: >> I have a program that I have been trying to rewrite so it will >> run on Python 2.7 and 3.4. It has been a pain to say the least. >> Thank $DIETY for aliases.

Re: Problem With Embedded Icon and Python 3.4

2016-03-25 Thread Wildman via Python-list
On Fri, 25 Mar 2016 00:34:13 -0500, Zachary Ware wrote: > On Fri, Mar 25, 2016 at 12:10 AM, Wildman via Python-list > <python-list@python.org> wrote: >> I have a program that I have been trying to rewrite so it will >> run on Python 2.7 and 3.4. It has been a pain to

Re: Problem With Embedded Icon and Python 3.4

2016-03-25 Thread Wildman via Python-list
On Sat, 26 Mar 2016 01:42:37 +, Mark Lawrence wrote: > On 25/03/2016 05:10, Wildman via Python-list wrote: >> I have a program that I have been trying to rewrite so it will >> run on Python 2.7 and 3.4. > > This http://pythonhosted.org/six/ might come in handy in fut

Re: Help with python script for NMR

2016-03-27 Thread Wildman via Python-list
On Sun, 27 Mar 2016 08:13:49 -0700, mohamadmaaz5 wrote: >> > Hello there, >> > I found a python script The formatting of the script is all wrong. There are many spaces that should not be there and no indentations. It could take a long time to figure it out. It could be just a copy/paste

Re: Help with python script for NMR

2016-03-27 Thread Wildman via Python-list
On Sun, 27 Mar 2016 09:15:39 -0700, mohamadmaaz5 wrote: > On Sunday, March 27, 2016 at 6:07:43 PM UTC+2, Wildman wrote: >> On Sun, 27 Mar 2016 08:13:49 -0700, mohamadmaaz5 wrote: >> >> >> > Hello there, >> >> > I found a python script >> >> The formatting of the script is all wrong. There are

Re: Help with python script for NMR

2016-03-27 Thread Wildman via Python-list
On Sun, 27 Mar 2016 09:40:57 -0700, mohamadmaaz5 wrote: > On Sunday, March 27, 2016 at 6:27:59 PM UTC+2, Wildman wrote: >> On Sun, 27 Mar 2016 09:15:39 -0700, mohamadmaaz5 wrote: >> >> > On Sunday, March 27, 2016 at 6:07:43 PM UTC+2, Wildman wrote: >> >> On Sun, 27 Mar 2016 08:13:49 -0700,

Re: Key Binding Problem

2016-03-22 Thread Wildman via Python-list
On Wed, 23 Mar 2016 03:02:51 +, MRAB wrote: > On 2016-03-23 02:46, Wildman via Python-list wrote: >> My question is how do I coax bind into executing the >> button procedures? Or is there a way to generate the >> button click event from the binding? >> > It wo

Key Binding Problem

2016-03-22 Thread Wildman via Python-list
Platform: Linux Python: v.2.7.9 Tkinter: v.8.6.2 My program has some buttons for file operations, load_image, save_image, and quit. I would like to bind a key that will execute the procedures for each of the buttons. The binding for the quit button was easy... root.bind("", quit) root.bind("",

Re: Key Binding Problem

2016-03-22 Thread Wildman via Python-list
On Tue, 22 Mar 2016 23:52:57 -0400, Terry Reedy wrote: > On 3/22/2016 10:46 PM, Wildman via Python-list wrote: >> Platform: Linux >> Python: v.2.7.9 >> Tkinter: v.8.6.2 >> >> My program has some buttons for file operations, load_image, >> save_image

Re: Key Binding Problem

2016-03-23 Thread Wildman via Python-list
On Wed, 23 Mar 2016 02:47:47 -0400, Terry Reedy wrote: > On 3/23/2016 12:28 AM, Wildman via Python-list wrote: >> On Wed, 23 Mar 2016 03:02:51 +, MRAB wrote: >> >>> On 2016-03-23 02:46, Wildman via Python-list wrote: >>>> My question is how do I coax

Re: Key Binding Problem

2016-03-23 Thread Wildman via Python-list
On Wed, 23 Mar 2016 02:47:47 -0400, Terry Reedy wrote: > def load_image(self, _): > # load image file > > You must pass the bound method, as you did, and not the function itself > (which has two parameters). I meant to ask a followup question in my previous post but it slipped my

Re: Tkinter --> Why multiple windows

2016-03-24 Thread Wildman via Python-list
On Thu, 24 Mar 2016 13:24:16 -0700, kevind0718 wrote: > Hello: > > newbie Tkinter question > > If I run the code below two windows appear. > One empty and one with the text box and button. > > Why? please > > KD > > > > from Tkinter import * > > class MyDialog: > def __init__(self,

Another Key Binding Question

2016-03-26 Thread Wildman via Python-list
I use some key bindings in my program. They are declared like this: root.bind("" + "q", quit) root.bind("" + "q", quit) root.bind("" + "Q", quit) root.bind("" + "Q", quit) The above binds both Alt keys with upper and lower case 'q'. Is there a way to combine the

Re: Another Key Binding Question

2016-03-26 Thread Wildman via Python-list
On Sat, 26 Mar 2016 17:47:02 +, MRAB wrote: > On 2016-03-26 17:10, Wildman via Python-list wrote: >> I use some key bindings in my program. They are declared >> like this: >> >> root.bind("" + "q", quit) >> root.bind

Re: Adding Icon To Tkinter Window - Followup

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 19:36:19 +0100, Christian Gollwitzer wrote: > Am 05.03.16 um 19:10 schrieb Wildman: >> On Sat, 05 Mar 2016 10:47:09 -0600, Wildman wrote: >> >>> Anybody have the correct method of adding an icon to a >>> window? I have found several code examples on the web >>> but they all

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
I apologize to the group for my lack of information in my original post. I will do better in the future. I very much want to remain in good standing in this group because of all the knowledgeable people here. Thanks again to everyone that replied and helped me solve my problem. -- GNU/Linux

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 21:55:40 +0200, Serhiy Storchaka wrote: > On 05.03.16 18:47, Wildman via Python-list wrote: >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Th

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 16:38:08 -0500, Terry Reedy wrote: > On 3/5/2016 11:47 AM, Wildman via Python-list wrote: >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks.

Re: Adding Icon To Tkinter Window - Followup

2016-03-06 Thread Wildman via Python-list
On Sun, 06 Mar 2016 10:16:55 +0100, Christian Gollwitzer wrote: > Am 06.03.16 um 06:53 schrieb Wildman: >> On Sat, 05 Mar 2016 19:36:19 +0100, Christian Gollwitzer wrote: >>> import Tkinter >>> from Tkinter import Tk >>> root = Tk() >>> img = Tkinter.Image("photo", file="appicon.gif") >>>

tkFileDialog Question

2016-03-02 Thread Wildman via Python-list
Is there a way to prevent the dialog from displaying hidden directories? My research has not found anything relating to hidden files or directories. -- GNU/Linux user #557453 "Philosophy is common sense with big words." -James Madison -- https://mail.python.org/mailman/listinfo/python-list

Re: Request More Help With XBM Image

2016-03-01 Thread Wildman via Python-list
On Tue, 01 Mar 2016 09:56:56 +0100, Peter Otten wrote: > Wildman via Python-list wrote: > >> I want to take an image file, convert it to XBM format and >> display it. Thanks to Mr. Otten I can open and display the >> XBM image without any problems. The script first call

Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: creating zipfile with symlinks

2016-03-04 Thread Wildman via Python-list
On Fri, 04 Mar 2016 13:31:52 -0700, Ian Kelly wrote: > On Fri, Mar 4, 2016 at 11:50 AM, crankypuss wrote: >> I don't know about that, but you've certainly shown that what I was told >> about this group being helpful and non-combative is bullshit. > > Look in a mirror

Re: Adding Icon To Tkinter Window - Followup

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 10:47:09 -0600, Wildman wrote: > Anybody have the correct method of adding an icon to a > window? I have found several code examples on the web > but they all result in an error. Thanks. I found this and it works in Linux but only with black and white xbm images (I would

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 18:08:15 +, Grant Edwards wrote: > On 2016-03-05, Wildman wrote: > >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. > > You'll have to be

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 18:38:57 +, Mark Lawrence wrote: > On 05/03/2016 16:47, Wildman via Python-list wrote: >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. >

Re: Request Help With Function

2016-04-04 Thread Wildman via Python-list
On Mon, 04 Apr 2016 13:54:56 -0600, Ian Kelly wrote: > On Mon, Apr 4, 2016 at 1:42 PM, Wildman via Python-list > <python-list@python.org> wrote: >> commandlist = commandlist.split(",") > > commandlist is a list. > >>

Re: Request Help With Function

2016-04-04 Thread Wildman via Python-list
On Mon, 04 Apr 2016 21:02:53 +0100, MRAB wrote: > On 2016-04-04 20:42, Wildman via Python-list wrote: >> launch_help() >> > .Popen will accept either a string or a list of strings. > > You're giving it a list that contains a string and a list. Yep, that was my

Re: Help with python code

2016-03-29 Thread Wildman via Python-list
On Tue, 29 Mar 2016 21:19:05 +, Rob Gaddi wrote: >> menu = input("Enter the type of pizza that you want to order from 1-5 \n") >> while menu>5 or menu <=0: >> menu = input ("Enter the right number ") >> pizza_cost = pizzatype[menu] As it has already been pointed out, a Python list starts

Re: Problem With Embedded Icon and Python 3.4

2016-03-28 Thread Wildman via Python-list
On Mon, 28 Mar 2016 10:36:44 +0100, Mark Lawrence wrote: > On 26/03/2016 02:37, Wildman via Python-list wrote: >> On Sat, 26 Mar 2016 01:42:37 +, Mark Lawrence wrote: >> >>> On 25/03/2016 05:10, Wildman via Python-list wrote: >>>> I have a program t

Re: tkinter Entry validation modes

2016-04-02 Thread Wildman via Python-list
On Sat, 02 Apr 2016 16:11:19 +0100, Mark Lawrence wrote: > A typical call to create an Entry field would be:- > > e = Entry(master, validate='all', ...) > > Once this call has been made is it possible to change the validation > mode at runtime? Background, I'm knocking up an app so I can play

Request Help With Function

2016-04-04 Thread Wildman via Python-list
I am working on a Linux gui program where I want to be able to click a Help button and open a man page using a viewer. I wrote a search function that can be called several times, if needed, with different arguments. I wrote a test program that tries to open the Bash man page in a terminal and

Re: Importerror: cannot import name httpshandler linux

2016-04-27 Thread Wildman via Python-list
On Wed, 27 Apr 2016 10:13:45 -0700, bharadwajsrivatsa wrote: > I tried installing Python 2.7.11 on HP-UX which already has all > the build and run time dependencies installed on it such as > openssl, libffi, etc. But after installing python , I tried > installing some open source packages using

Re: Extract the middle N chars of a string

2016-05-18 Thread Wildman via Python-list
On Thu, 19 May 2016 01:47:33 +1000, Steven D'Aprano wrote: > Is this the simplest way to get the middle N characters? This will return a sub-string of any length starting at any point. This is the way the old VB mid$ function worked. def mid(string, start, length): # start begins at 0

Re: Wanted Python programmer to join team

2016-05-16 Thread Wildman via Python-list
On Mon, 16 May 2016 12:46:13 -0700, netcrime4 wrote: > My team is getting more projects that it can handle so we are looking for > Python programers to join. You will be given tasks to complete full or part > of the project. > > Majority of projects consist of data mining(scraping) so

Re: Moderation and slight change of (de facto) policy

2016-04-17 Thread Wildman via Python-list
On Sun, 17 Apr 2016 17:57:51 +0100, Tim Golden wrote: > There's been a bit of chatter lately about the moderation on the Python > List (and, indirectly, comp.lang.python). The list moderators have > suspended a couple of posters for a while and we've been discussing a > little our policy

Re: python3 - No module named 'html5lib'

2016-04-14 Thread Wildman via Python-list
On Thu, 14 Apr 2016 02:31:59 -0700, Sergio Spina wrote: > I'm running a python3 program that requires html5lib but I receive the error > No module named 'html5lib'. > > Here are two session of terminal: > > sam@pc ~ $ python > Python 2.7.9 (default, Mar 1 2015, 12:57:24) > [GCC

Re: META Culture of this place [was Re: for / while else doesn't make sense]

2016-05-24 Thread Wildman via Python-list
On Tue, 24 May 2016 10:44:56 -0700, Ned Batchelder wrote: > On Tuesday, May 24, 2016 at 12:44:04 PM UTC-4, Steven D'Aprano wrote: >> On Tue, 24 May 2016 12:19 pm, Ned Batchelder wrote: >> >> > Ugh, can we please stop with the "well, actually" pedantic tangents? >> >> With respect, no. >> >>

Re: making executables smaller

2016-07-26 Thread Wildman via Python-list
On Tue, 26 Jul 2016 12:22:16 -0500, Carter Temm wrote: > Hi, > I’m writing a couple different projects at the moment, and when I > compile it into a single executable using pyinstaller, it becomes > extremely large. I’m guessing this is because of the modules used. > Because I’m not that skilled

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Wildman via Python-list
On Sun, 17 Jul 2016 05:01:21 -0700, ldompeling wrote: > I installed python 3.4 and set my python path to PYTONPATH:/usr/bin/python3.4 > > When I try to import pyaudio then I get this error: > Python 3.4.2 (default, Oct 19 2014, 13:31:11) > [GCC 4.9.1] on linux > Type "help", "copyright",

Re: Touch screen development in Python

2016-07-11 Thread Wildman via Python-list
On Mon, 11 Jul 2016 19:21:56 +0200, Jahn wrote: > Hi , > Does anyone use Python for developping applications that work with a touch > screen? > http://www.technolabsz.com/2011/08/how-to-make-touch-screen-user-interface.html -- GNU/Linux user #557453 The cow died so I don't need your

Re: value of pi and 22/7

2016-06-20 Thread Wildman via Python-list
On Mon, 20 Jun 2016 01:01:21 -0700, Lawrence D’Oliveiro wrote: > On Monday, June 20, 2016 at 7:32:54 PM UTC+12, Marko Rauhamaa wrote: > >> Width/height ratio of the pyramid of Cheops was so close to π/2 that UFO >> enthusiasts were convinced alien technology was used in the construction >> of

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Wildman via Python-list
On Wed, 01 Feb 2017 21:29:00 +, Chris Green wrote: > Wildman wrote: >> On Wed, 01 Feb 2017 19:15:13 +, Chris Green wrote: >> >> > Wildman wrote: >> >> On Wed, 01 Feb 2017 17:12:26 +, Chris Green wrote: >> >> >> >> > I'm often hitting this

Re: best way to ensure './' is at beginning of sys.path?

2017-02-03 Thread Wildman via Python-list
On Fri, 03 Feb 2017 11:06:00 -0500, Neal Becker wrote: > I want to make sure any modules I build in the current directory overide any > others. To do this, I'd like sys.path to always have './' at the beginning. > > What's the best way to ensure this is always true whenever I run python3? In

Re: best way to ensure './' is at beginning of sys.path?

2017-02-03 Thread Wildman via Python-list
On Fri, 03 Feb 2017 13:19:30 -0700, Michael Torrie wrote: > On 02/03/2017 12:07 PM, Wildman via Python-list wrote: >> Sorry, I forgot something important. If you use >> /etc/rc.local, the execute bit must be set. > > I don't think this is what Neal Becker was asking about.

Re: best way to ensure './' is at beginning of sys.path?

2017-02-03 Thread Wildman via Python-list
On Fri, 03 Feb 2017 12:58:15 -0600, Wildman wrote: > On Fri, 03 Feb 2017 11:06:00 -0500, Neal Becker wrote: > >> I want to make sure any modules I build in the current directory overide any >> others. To do this, I'd like sys.path to always have './' at the beginning. >> >> What's the best

Re: best way to ensure './' is at beginning of sys.path?

2017-02-03 Thread Wildman via Python-list
On Sat, 04 Feb 2017 09:25:42 +1100, Cameron Simpson wrote: > On 03Feb2017 14:55, Wildman <best_...@yahoo.com> wrote: >>On Fri, 03 Feb 2017 13:19:30 -0700, Michael Torrie wrote: >> >>> On 02/03/2017 12:07 PM, Wildman via Python-list wrote: >>>> Sorry,

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Wildman via Python-list
On Wed, 01 Feb 2017 17:12:26 +, Chris Green wrote: > I'm often hitting this problem, how does one find out what package to > install to provide what a give import needs? > > Currently I'm modifying some code which has 'import gtk', I want to > migrate from Python 2 to Python 3 if I can but

Re: best way to ensure './' is at beginning of sys.path?

2017-02-05 Thread Wildman via Python-list
On Sat, 04 Feb 2017 19:12:55 +, Grant Edwards wrote: > On 2017-02-04, Wildman via Python-list <python-list@python.org> wrote: >>> >>> The next time you are in the /tmp directory looking for something, can >>> you guess what happens when you mistype "l

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Wildman via Python-list
On Sat, 04 Feb 2017 11:27:01 +0200, Jussi Piitulainen wrote: > Wildman writes: > > [snip] > >> If anyone is interested the correct way is to add this to >> /etc/profile (at the bottom): >> >> PATH=$PATH:./ >> export PATH > > Out of interest, can you think of a corresponding way that a mere

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Wildman via Python-list
On Sat, 04 Feb 2017 18:25:03 +, Grant Edwards wrote: > On 2017-02-04, Wildman via Python-list <python-list@python.org> wrote: > >> No, I do not know. You might try your question in a linux specific >> group. Personally I don't understand the danger in havin

Re: best way to ensure './' is at beginning of sys.path?

2017-02-05 Thread Wildman via Python-list
On Mon, 06 Feb 2017 09:07:34 +1100, Steve D'Aprano wrote: > On Sun, 5 Feb 2017 07:01 pm, Wildman wrote: > >> Sure, you >> could trick someone into running a program that could >> mess with $HOME but that is all.  For anyone, like me, >> that makes regular backups, that is not a big problem. >>

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Wildman via Python-list
On Wed, 01 Feb 2017 19:15:13 +, Chris Green wrote: > Wildman wrote: >> On Wed, 01 Feb 2017 17:12:26 +, Chris Green wrote: >> >> > I'm often hitting this problem, how does one find out what package to >> > install to provide what a give import needs? >> > >> >

Re: How coding in Python is bad for you

2017-01-23 Thread Wildman via Python-list
On Mon, 23 Jan 2017 20:39:26 +, Jon Ribbens wrote: > On 2017-01-23, alister wrote: >> On Tue, 24 Jan 2017 07:19:42 +1100, Chris Angelico wrote: >>> I believe that's "bad for you" in the sense that chocolate is bad for >>> you. >>> >>> It isn't. >> >> chocolate is

Re: Is shutil.get_terminal_size useless?

2017-01-29 Thread Wildman via Python-list
On Sat, 28 Jan 2017 19:03:42 +1100, Steve D'Aprano wrote: > shutil.get_terminal_size returns the wrong values when you pipe your output > to another process, even it you do so in a terminal. Consider this script: > > > import os > import shutil > print('shutil:',

Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread Wildman via Python-list
On Sat, 18 Feb 2017 09:38:32 -0800, TTaglo wrote: > i = 1 > f = open ('rosalind_ini5(1).txt') > for line in f.readlines(): > if i % 2 == 0: > print line > i += 1 > > > How do i get output without breaks between the lines? > > Result: > > Other things just make you swear and

Request Help With ttk.Notebook Tabs

2017-02-21 Thread Wildman via Python-list
Python 3.4.2 Linux platform I am working on a program that has tabs created with ttk.Notebook. The code for creating the tabs is working but there is one thing I have not been able to figure out. As is, the tabs are located up against the lower edge of the caption bar. I would like to have

Re: Request Help With ttk.Notebook Tabs

2017-02-21 Thread Wildman via Python-list
On Tue, 21 Feb 2017 12:02:50 -0600, Wildman wrote: > Python 3.4.2 > Linux platform > > > I am working on a program that has tabs created with ttk.Notebook. > The code for creating the tabs is working but there is one thing I > have not been able to figure out. As is, the tabs are located up >

Re: Request Help With ttk.Notebook Tabs

2017-02-21 Thread Wildman via Python-list
On Tue, 21 Feb 2017 18:22:31 +, MRAB wrote: > On 2017-02-21 18:02, Wildman via Python-list wrote: >> Python 3.4.2 >> Linux platform >> >> >> I am working on a program that has tabs created with ttk.Notebook. >> The code for creating the tabs is w

Re: subprocess problem

2017-02-09 Thread Wildman via Python-list
On Fri, 10 Feb 2017 09:53:32 +1100, Cameron Simpson wrote: > On 09Feb2017 11:59, Wildman wrote: >>Here is a method I frequently use to replace the which >>command. (air code) >> >>import os >>pathlist = os.environ["PATH"].split(":") >> >>def which(target) >>for p in

Re: Problems with scripts

2017-02-13 Thread Wildman via Python-list
On Mon, 13 Feb 2017 08:30:32 -0800, lauren.sophia1998 wrote: > Hello! I have 2 python assignments that I just can't figure out. The first > one returns the same thing no matter what I input and the second won't accept > "done" to stop the program and return answers. Please help! > > 1) >

Re: Problems with scripts

2017-02-13 Thread Wildman via Python-list
On Mon, 13 Feb 2017 10:08:11 -0800, Lauren Fugate wrote: > So I tried both of these and they didn't change anything, the python shell > printed the same things... The first assignment is overly complicated. The extra input functions are useless. There is no loopback to check the input. Also,

Re: subprocess problem

2017-02-09 Thread Wildman via Python-list
On Thu, 09 Feb 2017 11:16:18 -0600, Andreas Paeffgen wrote: > I guess which does not return an error code. If it does not find > anything, the return is just blank. If it finds something, the path is > returned. > > So the change of code did not help, because there is just no error message. >

Re: Does This Scare You?

2016-08-19 Thread Wildman via Python-list
On Sat, 20 Aug 2016 10:57:37 +1000, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 9:42 AM, Lawrence D’Oliveiro > wrote: >> Python 3.5.2+ (default, Aug 5 2016, 08:07:14) >> [GCC 6.1.1 20160724] on linux >> Type "help", "copyright", "credits" or "license" for

Re: Does This Scare You?

2016-08-19 Thread Wildman via Python-list
On Sat, 20 Aug 2016 11:20:44 +1000, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 11:11 AM, Wildman via Python-list > <python-list@python.org> wrote: >> Since I am fairly new to Python, I realize there is much that I >> still don't know but I don't understand how Wind

Re: saving octet-stream png file

2016-08-22 Thread Wildman via Python-list
On Mon, 22 Aug 2016 13:21:43 -0400, Larry Martell wrote: > On Fri, Aug 19, 2016 at 4:51 PM, Lawrence D’Oliveiro > wrote: >> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: >>> >>> An 'octet' is a byte of 8 bits. >> >> Is there any other size of byte?

Re: Does This Scare You?

2016-08-22 Thread Wildman via Python-list
On Mon, 22 Aug 2016 17:27:13 +, Jon Ribbens wrote: > On 2016-08-22, Chris Angelico wrote: >> I tried things like "con.txt" and it simply failed (no such file or >> directory), without printing anything to the console. > > I'm not sure how you got that to fail, but writing

Problem With Tkinter Font

2017-02-25 Thread Wildman via Python-list
Python 3.4.2 Tkinter 8.6 Linux I want to set the font in a GUI program I am working on. Here is the pertinent code I am using... from tkinter import font myfont = font.Font(family='Helvetica', size=10, weight='bold') Here is the error I get... Traceback (most recent call last): File

Re: Problem With Tkinter Font

2017-02-26 Thread Wildman via Python-list
On Sun, 26 Feb 2017 09:17:00 +0100, Peter Otten wrote: > Wildman via Python-list wrote: > >> Python 3.4.2 >> Tkinter 8.6 >> Linux >> >> I want to set the font in a GUI program I am working on. >> Here is the pertinent code I am using... >> >&

Re: Installing python

2016-09-05 Thread Wildman via Python-list
On Mon, 05 Sep 2016 20:01:08 +, alister wrote: > On Mon, 05 Sep 2016 12:46:58 -0700, emaraiza98 wrote: > >> I installed pycharm for a computer science class I'm taking, and also >> downloaded python 3.5.2. However, my computer for some reason won't use >> 3.5.2 and my professor told me I

Re: Python 3 curiosity.

2016-09-06 Thread Wildman via Python-list
On Tue, 06 Sep 2016 02:51:39 -0700, wxjmfauth wrote: > It's curious to see all these apps, that were > more of less working correctly up to Python 3.2 > (included) and are now no more working at all. > > Probably something wrong somewhere...

Re: Python 3 curiosity.

2016-09-06 Thread Wildman via Python-list
On Wed, 07 Sep 2016 02:27:40 +1000, Chris Angelico wrote: > On Wed, Sep 7, 2016 at 2:13 AM, Wildman via Python-list > <python-list@python.org> wrote: >> On Tue, 06 Sep 2016 02:51:39 -0700, wxjmfauth wrote: >> >>> It's curious to see all these apps, that were >

Re: Why does the insert after list function fail?

2016-09-22 Thread Wildman via Python-list
On Thu, 22 Sep 2016 12:29:12 -0700, 380162267qq wrote: > A=["1","2","3"] > print(list(map(float,A)).insert(0,1)) > > I want to insert 1 at the head of the list but this gives me a surprise I am not certain about what you are doing so I might be way off here. The following will insert 1 at the

Re: How to reduce the DRY violation in this code

2016-09-27 Thread Wildman via Python-list
On Tue, 27 Sep 2016 10:30:05 -0700, Paul Rubin wrote: > Chris Angelico writes: >> Can you elaborate on what "GoF builder" means? Presumably it's a >> special case of the builder pattern, > > I think it just means the usual builder pattern, from the Design > Patterns book by

Re: Scripting Help please

2016-10-12 Thread Wildman via Python-list
On Wed, 12 Oct 2016 20:48:31 +, alister wrote: > On Wed, 12 Oct 2016 13:37:23 -0700, LongHairLuke wrote: > >> Hi l am on my way to make a bot for the game Piano Tiles 2. >> But the code l have written so far saids invalid syntax at 2nd line. >> Here is my code: >> >> >> >> while True: >>

  1   2   3   >