Re: Detect naming typos (AttributeError) in function names

2023-11-06 Thread George Fischhof via Python-list
ecause of typo), and if you compile the code: https://docs.python.org/3/library/py_compile.html it will generate syntax error if non-existent function is called. linters can perhaps warn you (never had typos, because I use PyCharm) need to check the linters' doc BR, George -- https://mail.python.org/mailman/listinfo/python-list

String to Float, without introducing errors

2022-12-18 Thread Paul St George
fully aware of what goes on under the bonnet.  >> On 17 Dec 2022, at 16:54:05 EST 2022, Thomas Passin wrote: On 12/17/2022 3:45 PM, Paul St George wrote: > Thanks to all! > It was the rounding rounding error that I needed to avoid (as Peter J. Holzer > suggested). The

String to Float, without introducing errors

2022-12-18 Thread Paul St George
fully aware of what goes on under the bonnet. Here is a picture: https://paulstgeorge.com/newton/cyclography.html Thanks, Paul >> On 17 Dec 2022, at 16:54:05 EST 2022, Thomas Passin wrote: On 12/17/2022 3:45 PM, Paul St George wrote: > Thanks to all! > It was the rounding roundin

Re: String to Float, without introducing errors

2022-12-17 Thread Paul St George
+ (7 * 0.1) + (2 * 0.01) + (7 * 0.001) Now I do not need to! > On 17 Dec 2022, at 13:11, Alan Gauld wrote: > > On 17/12/2022 11:51, Paul St George wrote: >> I have a large/long array of numbers in an external file. The numbers look >> like this: >> >> -6455

String to Float, without introducing errors

2022-12-17 Thread Paul St George
I have a large/long array of numbers in an external file. The numbers look like this: -64550.727 -64511.489 -64393.637 -64196.763 -63920.2 -63563.037 -63124.156 -62602.254 -61995.895 -61303.548 -60523.651 -59654.66 ... When I bring the numbers into my code, they are Strings. To use the numbers i

Re: Download Python 3.10.6 for windows

2022-08-31 Thread George Rwaga
my old code based on such sources as Python for Finance by Yves Hilpisch, a book by the same title by Yuxing Yan, Python for Data Analysis by Wes McKinney, etc. Again, thanks. George -- On Tue, Aug 30, 2022 at 4:06 PM Eryk Sun wrote: > On 8/30/22, George Rwaga wrote: > > > >

Download Python 3.10.6 for windows

2022-08-30 Thread George Rwaga
asked to verify access to this directly. I went to properties, made what I thought were the relevant changes. But I keep getting asked to verify access. My R and RStudio are installed in C:\program files. How should I proceed? George -- -- https://mail.python.org/mailman/listinfo/python-list

Re: exec() an locals() puzzle

2022-07-21 Thread george trojan
> accessible/visible from f's code. > > So, a few observations (by no means this is how the vm works): > > 1) each function has a set of variables defined by the code (let's call > this "code-defined locals" or "cdef-locals"). > 2) each function a

exec() an locals() puzzle

2022-07-20 Thread george trojan
[1], in () 7 print(y) 8 # y = eval('y') 9 #print('ok:', eval('y'))---> 10 f() Input In [1], in f() 4 exec('y = i; print(y); print(locals())') 5 print(locals())> 6 y = eval('y') 7 print(y) File :1, in NameError: name 'y' is not defined1. Another thing: within the first exec(), the print order seems reversed. What is going on? BTW, I am using python 3.8.13. George -- https://mail.python.org/mailman/listinfo/python-list

Re: Popular Python Package 'ctx' Hijacked to Steal AWS Keys

2022-05-25 Thread George Fischhof
package appears, and becomes downloadable. Compiled parts should be allowed only in source, and security checkers would check those too, and compile from source and publish package only after these checks executed and did not found any harmful thing. BR, George -- https://mail.python.org/mailman/listinfo/python-list

Testing an app protected by Okta authorization code with PKCE flow

2022-04-29 Thread George Fischhof
Okta. We are using Okta's .net backend stuff and Angular widget BR, George -- https://mail.python.org/mailman/listinfo/python-list

Re: for convenience

2022-03-24 Thread Paul St George
is super interesting. You have my permission, and please feel free to contact me offline if you want to ask anything. Yes, I had noticed the tandem with @Chris. I think I needed both! I already have a folder on my Mac called ‘Cameron’. Perhaps I now need an additional folder. Then I can ask my question about whether Python grows to be more like its programmers, or do programmers learn to think Pythonically? — Paul St George -- https://mail.python.org/mailman/listinfo/python-list

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 17.47, Avi Gross wrote: > So, I ask Paul what other language than python he has used before, just out > of curiosity. The other language I have used (and often) is Processing. Before that, and a long time ago, Lingo. — Paul -- https://mail.python.org/mailman/listinfo/pyth

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 18.02, Cameron Simpson wrote: > On 21Mar2022 22:12, Paul St George wrote: > >When I am writing code, I often do things like this: > > > >context = bpy.context # convenience > > > >then whenever I need bpy.context, I only need to write cont

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 18.04, dn wrote: > On 22/03/2022 10.17, Chris Angelico wrote: > > On Tue, 22 Mar 2022 at 08:13, Paul St George > <https://mail.python.org/mailman/listinfo/python-list>> wrote: > >> > >> > >> When I am writing code, I often do t

Re: for convenience

2022-03-21 Thread Paul St George
; the `context` attribute in the `bpy` module. > > On Mon, 2022-03-21 at 22:12 +0100, Paul St George wrote: >> >> When I am writing code, I often do things like this: >> >> context = bpy.context # convenience >> >> then whenever I need bpy.context, I only

for convenience

2022-03-21 Thread Paul St George
George -- https://mail.python.org/mailman/listinfo/python-list

Re: Making command-line args available to deeply-nested functions

2021-08-31 Thread George Fischhof
George Fischhof ezt írta (időpont: 2021. aug. 29., V, 21:27): > > > Loris Bennett ezt írta (időpont: 2021. aug. > 26., Cs, 16:02): > >> George Fischhof writes: >> >> [snip (79 lines)] >> >> >> > Hi, >> >> > >> >>

Re: Making command-line args available to deeply-nested functions

2021-08-29 Thread George Fischhof
Loris Bennett ezt írta (időpont: 2021. aug. 26., Cs, 16:02): > George Fischhof writes: > > [snip (79 lines)] > > >> > Hi, > >> > > >> > Also you can give a try to click and / or typer packages. > >> > Putting args into environment va

Re: Making command-line args available to deeply-nested functions

2021-08-23 Thread George Fischhof
Loris Bennett ezt írta (időpont: 2021. aug. 23., H 19:26): > George Fischhof writes: > > > Loris Bennett ezt írta (időpont: 2021. aug. > > 20., P 17:54): > > > >> Julio Di Egidio writes: > >> > >> > On Friday, 20 August 2

Re: Making command-line args available to deeply-nested functions

2021-08-21 Thread George Fischhof
omplexity of testing. > > Cheers, > > Loris > > -- > This signature is currently under construction. > -- > https://mail.python.org/mailman/listinfo/python-list > > > > Hi, Also you can give a try to click and / or typer packages. Putting args into environment variables can be a solution too All of these depends on several things: personal preferences, colleagues / firm standards, the program, readability, variable accessibility (IDE support, auto completition) (env vars not supported by IDEs as they are not part of code) BR, George -- https://mail.python.org/mailman/listinfo/python-list

Re: Definition of "property"

2021-06-02 Thread George Fischhof
Hi, I think in OOP point of view one can write that property is the python implementation of the OOP concepts: Encapsulation and Information hiding Some explanation for beginners on these paradigms: https://stackify.com/oop-concept-for-beginners-what-is-encapsulation/ BR, George -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-authors] Query

2021-01-11 Thread George Fischhof
ciated, or accepted, but there is. As I know this is the only one somewhat standardised exam now. Of course there are several institutes holding Python course and exam BR, George -- https://mail.python.org/mailman/listinfo/python-list

Re: Managing plug-ins

2020-05-27 Thread George Fischhof
one, is to put files to a given place and import them in runtime, I created a pluggable info monitor which does this: in every cycles imports the given files as plugins. https://pypi.org/project/pluggable-info-monitor/ BR, George -- https://mail.python.org/mailman/listinfo/python-list

Re: What do you use for slides?

2019-11-16 Thread George Fischhof
//www.pythonmembers.club | https://github.com/Abdur-rahmaanJ > > Mauritius > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > -- > https://mail.python.org/mailman/listinfo/python-list Hi I use Google drive's slides, plus https://revealjs.com/ br, George -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie question about Python syntax

2019-08-26 Thread Paul St George
On 25/08/2019 02:39, Cameron Simpson wrote: On 24Aug2019 21:52, Paul St George wrote: [snip]> Aside from "map" being a poor name (it is also a builtin Python function), it seems that one creates one of these to control how some rendering process is done. The class refer

Re: Newbie question about Python syntax

2019-08-24 Thread Paul St George
On 24/08/2019 01:23, Cameron Simpson wrote: On 23Aug2019 13:49, Paul St George wrote: Context: I am using Python to interrogate the value of some thing in Blender (just as someone else might want to use Python to look at an email in a Mail program or an image in Photoshop). Assumptions: So

Re: Newbie question about Python syntax

2019-08-23 Thread Paul St George
On 22/08/2019 23:21, Kyle Stanley wrote: [snip] The tutorial that Terry was referring to was the one on docs.python.org, here's a couple of links for the sections he was referring to: Full section on classes: https://docs.python.org/3/tutorial/classes.html Section on instantiating objects from

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 20:02, Terry Reedy wrote: On 8/22/2019 3:34 AM, Paul St George wrote: I have the Python API for the Map Value Node here: <https://docs.blender.org/api/current/bpy.types.CompositorNodeMapValue.html>. All well and good. Now I just want to write a simple line of code su

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 11:49, Cameron Simpson wrote: On 22Aug2019 09:34, Paul St George wrote: I have the Python API for the Map Value Node here: <https://docs.blender.org/api/current/bpy.types.CompositorNodeMapValue.html>. All well and good. Now I just want to write a simple line of code su

Newbie question about Python syntax

2019-08-22 Thread Paul St George
I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy ... >>>print(bpy.types.CompositorNodeMapValue.max[0]) If this works, I will d

Re: absolute path to a file

2019-08-20 Thread Paul St George
On 21/08/2019 04:09, Grant Edwards wrote: On 2019-08-21, Richard Damon wrote: I think gmane feed the newsgroup comp.lang.python which feeds python-list@python.org. No, gmane is a gateway to python-list@python.org. -- Grant I use https://mail.python.org/pipermail/python-list/ to confirm tha

Re: absolute path to a file

2019-08-20 Thread Paul St George
On 20/08/2019 11:43, Cameron Simpson wrote: Please remember to CC the list. Instead of 'Post a followup to this newsgroup' or 'To: python-list@python.org'? On 19Aug2019 22:06, Paul St George wrote: On 19/08/2019 14:16, Cameron Simpson wrote: [...] There's a

Re: absolute path to a file

2019-08-19 Thread Paul St George
On 19/08/2019 14:16, Cameron Simpson wrote: On 19Aug2019 08:52, Paul St George wrote: On 19/08/2019 01:31, Cameron Simpson wrote: On 18Aug2019 17:29, Paul St George wrote: On 18/08/2019 02:03, Cameron Simpson wrote: 1: Is image01.tif a real existing file when you ran this code? Yes. image01

Re: absolute path to a file

2019-08-18 Thread Paul St George
On 19/08/2019 01:31, Cameron Simpson wrote: Paul, I can see we must train you in the interleaved response style :-) On 18Aug2019 17:29, Paul St George wrote: On 18/08/2019 02:03, Cameron Simpson wrote: 1: Is image01.tif a real existing file when you ran this code? Yes. image01.tif is real

Re: absolute path to a file

2019-08-18 Thread Paul St George
On 18/08/2019 02:03, Cameron Simpson wrote: On 17Aug2019 11:51, Paul St George wrote: print('Track D  from Track B:',os.path.realpath(n.image.filepath)) ---Track D  from Track B: /image01.tif print('Track E  from Track B:',os.path.realpath(n.image.filepath[1:])) ---T

Re: absolute path to a file

2019-08-17 Thread Paul St George
On 17/08/2019 15:37, Peter Otten wrote: Paul St George wrote: Can someone please tell me how to get the absolute path to a file? I have tried os.path.abspath. In the code below I have a problem in the final line (15). # |import bpy|| Is this blender? If so the "//" prefix sta

Re: absolute path to a file

2019-08-17 Thread Paul St George
On 17/08/2019 16:32, Dennis Lee Bieber wrote: On Sat, 17 Aug 2019 11:51:47 +0200, Paul St George declaimed the following: print('Track E from Track B:',os.path.realpath(n.image.filepath[1:])) ---Track E from Track B: /image01.tif Just for giggles, what happens if y

Re: absolute path to a file

2019-08-17 Thread Paul St George
On 17/08/2019 15:37, Peter Otten wrote: Paul St George wrote: Can someone please tell me how to get the absolute path to a file? I have tried os.path.abspath. In the code below I have a problem in the final line (15). # |import bpy|| Is this blender? If so the "//" prefix sta

Re: absolute path to a file

2019-08-17 Thread Paul St George
On 17/08/2019 01:07, Gregory Ewing wrote: On Sat, Aug 17, 2019 at 2:27 AM Paul St George wrote: BUT does not work with | print('test2:',os.path.realpath(n.image.filepath))| This returns only |/image01.tif| What does n.image.filepath look like on its own? If it starts with a lea

Re: absolute path to a file

2019-08-16 Thread Paul St George
On 16/08/2019 18:37, Chris Angelico wrote: On Sat, Aug 17, 2019 at 2:27 AM Paul St George wrote: BUT does not work with | print('test2:',os.path.realpath(n.image.filepath))| This returns only |/image01.tif| Notes: Chris, I only mention the extra leading slash on my Mac in c

Re: Re: absolute path to a file

2019-08-16 Thread Paul St George
lso accepts a Pathlike object. Thanks for this. I changed my code to use your suggestion which seems to be better for the situation where I used resolve() before. -- Paul St George http://www.paulstgeorge.com http://www.devices-of-wonder.com +44(0)7595 37 1302 -- https://mail.python.org/mailman/listinfo/python-list

absolute path to a file

2019-08-15 Thread Paul St George
ses image02.tif saved at //../images/image02.tif which is at //images/image02.tif But I want an absolute path such as: ---Plane uses image01.tif saved at /Users/Lion/Desktop/test8/image01.tif ---Plane uses image02.tif saved at /Users/Lion/Desktop/images/image02.tif If it is relevant, my files are on a M

Re: How to plot a data including date and time?

2019-08-14 Thread George Fischhof
f['Diast EWM'] = df['Diastolic'].ewm(span=200).mean() > > > > plt.ioff() > > > > df.plot(x='Date') > > > > print(df.tail(60)) #a debug line I left in to watch the EWMs sink to more > > healthy levels > > > > plt.ylabel('mm Hg') > > > > plt.suptitle("Home BP record") > > > > plt.show() > > > > That should give you a start > > -- > To de-mung my e-mail address:- fsnospam$elliott$$ PGP Fingerprint: 1A96 > 3CF7 > 637F 896B C810 E199 7E5C A9E4 8E59 E248 > > -- > https://mail.python.org/mailman/listinfo/python-list Hi, Pygal is a very good and easy to use charting library BR, George > -- https://mail.python.org/mailman/listinfo/python-list

Re: Re: String slices

2019-08-10 Thread Paul St George
On 10/08/2019 17:35, Dennis Lee Bieber wrote: On Sat, 10 Aug 2019 11:45:43 +0200, "Peter J. Holzer" declaimed the following: There are of course many variants to all three methods. And then one can get downright nasty... X = 3.14 Y = 2.78 Z = 6.226E23 print("".join(["Plane rotation

Re: Re: String slices

2019-08-09 Thread Paul St George
On 09/08/2019 16:29, Rhodri James wrote: On 09/08/2019 15:13, Paul St George wrote: In the code (below) I want a new line like this: Plane rotation X: 0.0 Plane rotation Y: 0.0 Plane rotation Z: 0.0 But not like this: Plane rotation X: 0.0 Plane rotation Y: 0.0 Plane rotation Z: 0.0 Is it

Re: Re: Python in Blender. Writing information to a file.

2019-08-09 Thread Paul St George
On 09/08/2019 15:59, Rhodri James wrote: On 09/08/2019 14:54, Paul St George wrote: On 09/08/2019 04:09, Cameron Simpson wrote: On 08Aug2019 22:42, Paul St George wrote: On 08/08/2019 10:18, Peter Otten wrote: The print() function has a keyword-only file argument. So: with open(..., &q

String slices

2019-08-09 Thread Paul St George
In the code (below) I want a new line like this: Plane rotation X: 0.0 Plane rotation Y: 0.0 Plane rotation Z: 0.0 But not like this: Plane rotation X: 0.0 Plane rotation Y: 0.0 Plane rotation Z: 0.0 Is it possible? (I am using Python 3.5 within Blender.) # import os outstream = open(os.path

Re: Python in Blender. Writing information to a file.

2019-08-09 Thread Paul St George
On 09/08/2019 04:09, Cameron Simpson wrote: On 08Aug2019 22:42, Paul St George wrote: On 08/08/2019 10:18, Peter Otten wrote: The print() function has a keyword-only file argument. So: with open(..., "w") as outstream:     print("Focal length:", bpy.context.object.data.l

Re: Re: Python in Blender. Writing information to a file.

2019-08-08 Thread Paul St George
On 08/08/2019 10:18, Peter Otten wrote: Paul St George wrote: I am using Python 3.5 within Blender. I want to collect values of the current settings and then write all the results to a file. I can see the settings and the values in the Python console by doing this for each of the settings

Python in Blender. Writing information to a file.

2019-08-08 Thread Paul St George
I am using Python 3.5 within Blender. I want to collect values of the current settings and then write all the results to a file. I can see the settings and the values in the Python console by doing this for each of the settings | | |print(“Focal length:”,bpy.context.object.data.lens)| ---Foc

Re: mocking for get method in requests

2019-03-16 Thread George Fischhof
> > It does give the value of ‘out’ as ‘Hello’ in sample.py file. > I know I am missing something, which is where I need some help :) > > Thanks. > > -- > > > > UG, CSE, > RVCE, Bengaluru. > -- > https://mail.python.org/mailman/listinfo/python-list H

Re: Multiprocessing performance question

2019-02-20 Thread george trojan
I don't know whether this is a toy example, having grid of this size is not uncommon. True, it would make more sense to do distribute more work on each box, if there was any. One has to find a proper balance, as with many other things in life. I simply responded to a question by the OP. G

Re: Multiprocessing performance question

2019-02-20 Thread george trojan
rovided only for convenience, it is implemented with a for loop. IMO vectorization would have to be done on C level. Greetings from Anchorage George -- https://mail.python.org/mailman/listinfo/python-list

Re: Python for System Verilog testbench

2018-09-13 Thread George Fischhof
Bobby ezt írta (időpont: 2018. szept. 14., P 0:16): > > I have a very simple System Verilog (SV) adder as my DUT (device under > test). I would like to generate a test bench for this DUT based on the > 'requirements'. I wrote its (DUT) functions in simple text as > 'requirements' while followin

Re: how to get a value from CSV specific cell (A7) thanks

2018-09-01 Thread George Fischhof
HI, CSV has no cells, but you can use csv module from standard lib https://docs.python.org/3/library/csv.html and you can get 7th data from the first row (as A means the first row) __george__ ezt írta (időpont: 2018. szept. 1., Szo, 20:24): > how to get a value from CSV specific cell (A7) than

Accessing the Python list

2018-06-26 Thread Paul St George
From: Paul St George Understanding and having an interest in Python does not imply knowledge of Usenet, mailing lists, NNTP, gateways, gmane, bottom-posting, vanilla-flopping, /et al/. But, knowledge of these seems to be needed (or is at least useful) in order to fully benefit from the Python

Accessing the Python list

2018-06-25 Thread Paul St George
Understanding and having an interest in Python does not imply knowledge of Usenet, mailing lists, NNTP, gateways, gmane, bottom-posting, vanilla-flopping, /et al/. But, knowledge of these seems to be needed (or is at least useful) in order to fully benefit from the Python list. Would it be a

Re: Feeding the trolls

2018-06-22 Thread Paul St George
On 21/06/2018 10:05, Anssi Saari wrote: D'Arcy Cain writes: One of these days I will have to figure out how to block replies to the trolls as well. Benefit of reading the mailing list via nntp (i.e. gmane): can easily score down follow-ups to annoying people in addition to their posts. Well,

Re: translating foreign data

2018-06-21 Thread George Fischhof
numbers, not three And if you are able to identify the encoding codepage, then you should follow what the codepage says Another help can be if know the possible value range of the numbers (maybe it should be asked ...) George -- https://mail.python.org/mailman/listinfo/python-list

Re: command line utility for cups

2018-06-20 Thread George Fischhof
endAction(option_strings=['-o'], dest='o', nargs=None, const=None, > default=None, type= at 0x7feef70a8510>, choices=None, > help=None, metavar=None) > >>> parser.parse_args(["-o", "a=b", "-o", "c=d"]) > Namespace(o=[['a', 'b'], ['c', 'd']]) > > > -- > https://mail.python.org/mailman/listinfo/python-list Hi, You can also try click library from pypi, that is a very good command line stuff. George > > -- https://mail.python.org/mailman/listinfo/python-list

Re: Python list vs google group

2018-06-16 Thread Paul St George
On 15/06/2018 17:33, T Berger wrote: On Friday, June 15, 2018 at 12:14:30 PM UTC-4, Mark Lawrence wrote: On 15/06/18 16:47, T Berger wrote: On Friday, June 15, 2018 at 11:31:47 AM UTC-4, Alister wrote: it certainly seems to be the source of most SPAM as such some users of this list/newsgroup

Re: Re: FULLSCREEN and DOUBLEBUF

2018-06-12 Thread Paul St George
Dennis Lee Bieber wrote: Both may be dependent upon the actual hardware graphics board and the drivers for said board. On 11/06/2018 01:47, Gregory Ewing wrote: My guess is that if your surface is not fullscreen or is not a hardware surface, then you're always drawing into an ofscreen bu

Re: Re: Re: FULLSCREEN and DOUBLEBUF

2018-06-10 Thread Paul St George
Paul St George wrote: So... print pygame.display.get_surface() gives and print screen.get_flags() gives -2147483648 To recap: this thread started with a question. How do I know whether DOUBLEBUF has been set with: screen = pygame.display.set_mode((720,480), pygame.DOUBLEBUF

Re: Re: FULLSCREEN and DOUBLEBUF

2018-06-10 Thread Paul St George
To recap: this thread started with a question. How do I know whether DOUBLEBUF has been set with:     screen = pygame.display.set_mode((720,480), pygame.DOUBLEBUF | pygame.FULLSCREEN) On 09/06/2018 22:04, Mark Lawrence wrote: On 09/06/18 20:31, Paul St George wrote: print

Re: Re: FULLSCREEN and DOUBLEBUF

2018-06-09 Thread Paul St George
On 08/06/18 09:00, Paul St George wrote: Excellent. Now I know what to do in this instance and I understand the principle. I hesitantly tried this: screen = pygame.display.set_mode((720,480), pygame.FULLSCREEN | pygame.DOUBLEBUF) Hesitantly because I expected the *bitwise or

Re: Re: FULLSCREEN and DOUBLEBUF

2018-06-08 Thread Paul St George
or DOUBLEBUF. No errors were reported, but how would I check that DOUBLEBUF had been set? Is there a general rule, such as replace 'set_something' with 'get_something'? Paul St George On 07/06/2018 19:56, Chris Angelico wrote: On Fri, Jun 8, 2018 at 3:12 AM, Paul St Geo

FULLSCREEN and DOUBLEBUF

2018-06-07 Thread Paul St George
, I can use screen = pygame.display.set_mode((screen_width,screen_height),pygame.DOUBLEBUF) to set DOUBLEBUF But how do I set both FULLSCREEN and DOUBLEBUF? And, how can I test or check that DOUBLEBUF is set? -- Paul St George http://www.paulstgeorge.com http://www.devices-of-wonder.com -- https

Re: Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-31 Thread Paul St George
That's what I wanted! But, I didn't know the question because I didn't know the answer. On 30/05/2018 23:09, Karsten Hilbert wrote: On Wed, May 30, 2018 at 11:01:17PM +0200, Peter J. Holzer wrote: On 2018-05-30 22:08:45 +0200, Paul St George wrote: Ha! No, my question wa

Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-30 Thread Paul St George
he name of my favourite viewer (for example: ‘ImageMagick’). On 30/05/2018 02:31, Steven D'Aprano wrote: On Tue, 29 May 2018 20:02:22 +0200, Paul St George wrote: Is there, somewhere, a list of viewers and their names (for the purposes of this script)? Do you mean a list of programs cap

Re: Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-30 Thread Paul St George
tml#frequently-used-arguments>. Is this equivalent? p = subprocess.Popen('display',  + imagepath) so p = subprocess.Popen('display',  'test.png') On 30/05/2018 03:04, Ian Kelly wrote: On Sat, May 26, 2018 at 9:17 AM, Paul St George wrote: Thank you. You

[ANN] pluggable-info-monitor 0.2.1 released!

2018-05-29 Thread George Fischhof
quotes - it can be used as a dashboard for system administrators - etc There are example plugins to help developing your own plugins. Please note: The full feature set requires Python 3.4 and later. Have fun using pluggable-info-monitor George -- https://mail.python.org/mailman/listinfo

Re: Re: Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-29 Thread Paul St George
Is there, somewhere, a list of viewers and their names (for the purposes of this script)? I am assuming that if I want to ImageMagick (for example), there would be some shorter name - such as 'magick' - and it would be lower case . On 29/05/2018 08:58, Peter Otten wrote: Paul

Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-29 Thread Paul St George
I tried this anyway. The error was:     non-keyword arg after keyword arg On 27/05/2018 21:51, Dennis Lee Bieber wrote: On Sun, 27 May 2018 19:59:41 +0200, Paul St George declaimed the following: So, on Unix I would use Image.show(title=None, nameofdisplayutilty), or Image.show(title

Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-29 Thread Paul St George
Thank you. For the advice, and for the new word 'monkeypatch'. On 27/05/2018 23:58, Cameron Simpson wrote: On 27May2018 20:15, Paul St George wrote: This is very helpful indeed, thank you. Awe-inspiring. It occurred to me that I could edit the PIL/ImageShow.py, replacing ‘xv

Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-29 Thread Paul St George
Should the PIL code be corrected? On 28/05/2018 06:34, Christian Gollwitzer wrote: Am 27.05.18 um 23:58 schrieb Cameron Simpson: On 27May2018 20:15, Paul St George wrote: This is very helpful indeed, thank you. Awe-inspiring. It occurred to me that I could edit the PIL/ImageShow.py

Re: Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-27 Thread Paul St George
George wrote: Thank you. You are very right. The show() method is intended for debugging purposes and is useful for that, but what method should I be using and is PIL the best imaging library for my purposes? I do not want to manipulate images, I only want to show images (full screen) on an

Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-27 Thread Paul St George
George declaimed the following: And, out of curiosity, as I will probably use a different method - how do I find out what commands can be used as parameters for show()? I read the docs at <https://pillow.readthedocs.io/en/5.1.x/reference/Image.html#PIL.Image.Image.show>, but I am none the

Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-26 Thread Paul St George
tml#PIL.Image.Image.show>, but I am none the wiser. On 26/05/2018 01:02, boB Stepp wrote: On Fri, May 25, 2018 at 6:04 AM, Paul St George wrote: I am using the Python Imaging Library (PIL), Python 2 and Raspberry Pi 3 B+ My code is simply: from PIL import Image im = Image.open(‘somep

The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-25 Thread Paul St George
I am using the Python Imaging Library (PIL), Python 2 and Raspberry Pi 3 B+ My code is simply:     from PIL import Image     im = Image.open(‘somepic.jpg’)     im.show() # display image But the show() method looks for the default viewer (probably xv). How do I change this (in the code, or in

Re: unittest.Testsuite and execution order

2018-04-30 Thread George Fischhof
r TestSuite is a replaceable class. I'm not sure what the mechanics are for test randomization, but it is most definitely a thing. ChrisA -- https://mail.python.org/mailman/listinfo/python-list Hi, If you want to use more asserts in a test case, you should use pytest-assume plugin. George -- https://mail.python.org/mailman/listinfo/python-list

Re: Flask test generator code review?

2018-04-30 Thread George Fischhof
emplate in templates: > yield the_test, self, template > > > if __name__ == '__main__': > nose.run(defaultTest=__name__, argv=[sys.argv[0], '__main__', > '--verbosity=2']) > -- > https://mail.python.org/mailman/listinfo/python-list > Hi, maybe you should check PyTest https://docs.pytest.org/en/latest/ and Flas testing turorial: http://flask.pocoo.org/docs/1.0/testing/ BR, George -- https://mail.python.org/mailman/listinfo/python-list

Re: How to add values from test steps in pytest excel report

2018-04-30 Thread George Fischhof
ps://docs.pytest.org/en/latest/logging.html BR, George -- https://mail.python.org/mailman/listinfo/python-list

Re: GPG signatures invisible in new PyPI (was: Re: new Python Package Index is now in beta at pypi.org)

2018-03-31 Thread Dominik George
Hi Sumana, > I've been trying to reach out to the Debian Python community via IRC, > personal connections, tickets, and mailing lists to ensure a smooth > transition; I see now that a post I tried to get onto the debian-python > list a few weeks ago did not get posted there, so I've re-sent it. I'

GPG signatures invisible in new PyPI (was: Re: new Python Package Index is now in beta at pypi.org)

2018-03-31 Thread Dominik George
rce downlaod?), and how do I find out whether an upload is signed? I am asking mainly as a Debian developer relying on upstream signatures. -nik -- PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296 Dominik George · Hundeshagenstr. 26 · 53225 Bonn Phone: +49 228 92934581 · ht

Fwd: Text Strip() now working constantly.

2018-01-27 Thread George Shen
= 'some_text.data' string_next = string_abc.strip('data') string_final = string_next.strip('.') Please see the JPG. Sorry if this has been filed before, if I have filed this incorrectly could you please provide me a better avenue for future reference. Regards, -George J Shen -- https://mail.python.org/mailman/listinfo/python-list

pythonw.exe error

2017-10-30 Thread George Kalamaras via Python-list
When I am running IDLE return to me Missing python36.dll error Στάλθηκε από την Αλληλογραφία για Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3.6 tkinter bug

2017-01-31 Thread George Trojan - NOAA Federal
On 2017-01-31 18:02, MRAB wrote: On 2017-01-31 22:34, Christian Gollwitzer wrote: > >* Am 31.01.17 um 20:18 schrieb George Trojan - NOAA Federal: > *>>* Selection of button 'A' also selects button 'C'. Same goes for 'B' and > 'D'. >

Python3.6 tkinter bug?

2017-01-31 Thread George Trojan - NOAA Federal
oticed that widget names have changed, which likely leads to the cause: > /usr/local/Python-3.5.1/bin/python3 foo.py .140182648425776.140182647743208 .140182648425776.140182647841848 .140182648424152.140182648282080 .140182648424152.140182648282136 > /usr/local/Python-3.6.0/bin/python3 foo.py .!frame.

Re: Splitting text into lines

2016-12-13 Thread George Trojan - NOAA Federal
ot;odd-newlines.txt", "r", newline="").read().replace("\r", * > "").splitlines() > ['alpha', 'beta', 'gamma', 'delta'] Thanks Peter. That's what I needed. George -- https://mail.python.org/mailman/listinfo/python-list

Re: Splitting text into lines

2016-12-13 Thread George Trojan - NOAA Federal
ical bulletins. I do not want to eliminate "real" empty lines. I was hoping there is a way to prevent read() from making hidden changes to the file content. George -- https://mail.python.org/mailman/listinfo/python-list

Splitting text into lines

2016-12-13 Thread George Trojan - NOAA Federal
5KT P6SM BKN050 WS015/18040KT=', ''] but it looks cumbersome. I Python2.x I stripped '\r' before passing the string to split(): >>> open('FTAK31_PANC_131140.1481629265635').read().replace('\r', '') 'FTAK31 PANC 131140\nTAFABE\nTAF\nPABE 131140Z 1312/1412 07010KT P6SM SCT035 OVC060\n FM132100 10012G20KT P6SM BKN100 WS015/18035KT\n FM141000 09015G25KT P6SM BKN050 WS015/18040KT=\n' but Python 3.x replaces '\r\r\n' by '\n\n' on read(). Ideally I'd like to have code that handles both '\r\r\n' and '\n' as the split character. George -- https://mail.python.org/mailman/listinfo/python-list

TypeError: unorderable types: function() < int()

2016-05-10 Thread George Molsom
I have created a program in class 'make a game that tests how good people are at guessing when 10 seconds has elapsed.' The following are the code I currently have and the error produced when I attempt to run it. I have tried everything I can think of to resolve the issue, and I have also run t

Re: functools puzzle

2016-04-06 Thread George Trojan - NOAA Federal
tions created by functools.partial, such that the documentation can be viewed not only by reading the code. Of course, as the last resort, I could create my own implementation (i.e. copy the pure Python code). George On Wed, Apr 6, 2016 at 6:39 PM, Michael Selik wrote: > > > On Apr 6, 20

functools puzzle

2016-04-06 Thread George Trojan - NOAA Federal
s partial(builtins.object) | partial(func, *args, **keywords) - new function with partial application | of the given arguments and keywords. ... The module functools has partial() defined as above, then overrides the definition by importing partial from _functools. That would explain the above behaviour. My question is why? George -- https://mail.python.org/mailman/listinfo/python-list

How to make sphinx to recognize functools.partial?

2016-04-03 Thread George Trojan
ipe is rendered correctly in html, but the link is not created. I did put a print statement in sphinx/util/inspect.py, it appears that spipe definition is not recognized. I am running sphinx 1.3.5, according to CHANGELOG functools.partial support was added in 1.2.1. George -- https://mail.python.org/mailman/listinfo/python-list

A tool to add diagrams to sphinx docs

2016-04-01 Thread George Trojan - NOAA Federal
. George -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.1 test issue

2015-12-18 Thread George Trojan
On 12/16/2015 8:07 PM, Terry Reedy wrote: On 12/16/2015 1:22 PM, George Trojan wrote: I installed Python 3.1 on RHEL 7.2. According to the output below, you installed 3.5.1. Much better than the years old 3.1. This was not my only mistake. I ran the test on Fedora 19, not RHEL 7.2. The

Python 3.1 test issue

2015-12-16 Thread George Trojan
uot;: null, "failfast": false, "output_on_failure": false, "use_resources": ["curses", "network", "decimal", "cpu", "subprocess", "urlfetch"], "pgo": false, "timeout": null}] gtrojan 22889 336 0 17:36 pts/11 00:00:00 grep --color=auto 15758 Is this a problem? George -- https://mail.python.org/mailman/listinfo/python-list

Re: tuples in conditional assignment (Ben Finney)

2015-11-24 Thread George Trojan
Ben Finney writes: Ben Finney Date: 11/24/2015 04:49 AM To: python-list@python.org George Trojan writes: The following code has bitten me recently: t=(0,1) x,y=t if t else 8, 9 print(x, y) (0, 1) 9 You can simplify this by taking assignment out of the picture:: >>>

  1   2   3   4   5   6   7   8   9   10   >