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

2022-03-31 Thread Cecil Westerhof via Python-list
"Peter J. Holzer" writes: > On 2022-03-28 15:35:07 +0200, Cecil Westerhof via Python-list wrote: >> "Loris Bennett" writes: >> > Ubuntu is presumably relying on the Debian security team as well as >> > other volunteers and at least one compan

Temporally disabling buffering

2022-03-31 Thread Cecil Westerhof via Python-list
unbuffered for the current run and buffered for other runs where the output goes to a pipe. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

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

2022-03-31 Thread Cecil Westerhof via Python-list
hof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: dict.get_deep()

2022-04-03 Thread Kirill Ratkin via Python-list
ething like this instead? data.get_deep("users", 0, "address", "street") and also, instead of this try: result = data["users"][0]["address"]["street"] except KeyError, IndexError: result = "second star" write this: data.get_deep("users", 0, "address", "street", default="second star") ? -- https://mail.python.org/mailman/listinfo/python-list

Re: dict.get_deep()

2022-04-03 Thread Kirill Ratkin via Python-list
and also, instead of this try: result = data["users"][0]["address"]["street"] except KeyError, IndexError: result = "second star" write this: data.get_deep("users", 0, "address", "street", default="second star") ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Sharing part of a function

2022-04-03 Thread Cecil Westerhof via Python-list
ib(3_000). -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: dict.get_deep()

2022-04-03 Thread Avi Gross via Python-list
y implemented in modules. -Original Message- From: Marco Sulla To: Peter J. Holzer Cc: python-list@python.org Sent: Sun, Apr 3, 2022 5:17 pm Subject: Re: dict.get_deep() On Sun, 3 Apr 2022 at 21:46, Peter J. Holzer wrote: > > > > data.get_deep("users", 0, "add

Re: dict.get_deep()

2022-04-04 Thread Kirill Ratkin via Python-list
solutions on pypi (https://pypi.org/project/dpath/, https://pypi.org/project/path-dict/). But maybe (and maybe I miss again) we talk about language embedded solution like operator ? or ??. For example deep dict extraction could look like: street = data["users"]?[0]?["address&quo

Re: dict.get_deep()

2022-04-04 Thread Avi Gross via Python-list
ns offered. -Original Message- From: Kirill Ratkin via Python-list To: python-list@python.org Sent: Mon, Apr 4, 2022 3:40 am Subject: Re: dict.get_deep() Hello, Yes, I misunderstood as well because started to think about pattern matching which is good but this is not subject the question

Re: Sharing part of a function

2022-04-07 Thread Cecil Westerhof via Python-list
cursive': return rec(n) raise ValueError(f'Got a wrong function implementation type: {type}') -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Making a Python program into an executable file

2022-04-11 Thread Brian Wagstaff via Python-list
Python and click the Add Python to Path option. I tried to do this, but was given the option to Upgrade Python, and once I did this the Add Python to Path option seemed not to be available. Can you advise me what to do? Best wishes, Brian -- https://mail.python.org/mailman/listinfo/python-list

Functionality like local static in C

2022-04-14 Thread Cecil Westerhof via Python-list
the variable does not have the default value, but the value it had when the function returned. Does python has something like that? -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-14 Thread Jon Ribbens via Python-list
'day' it means '86400 seconds'. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-14 Thread Jon Ribbens via Python-list
On 2022-04-14, MRAB wrote: > On 2022-04-14 16:22, Jon Ribbens via Python-list wrote: >> On 2022-04-14, Paul Bryan wrote: >>> I think because minutes and hours can easily be composed by multiplying >>> seconds. days is separate because you cannot compose days from se

Re: Functionality like local static in C

2022-04-15 Thread Cecil Westerhof via Python-list
https://mail.python.org/mailman/listinfo/python-list

Re: code confusion

2022-04-15 Thread Avi Gross via Python-list
nd. Some python modules allow you tosee the ranks of various entries and you can simply choose  the one of second rank.  But if this is HW, you are being asked to do things the old-fashioned way! LOL! -Original Message----- From: Dennis Lee Bieber To: python-list@python.org Sent: Fri, Apr 15,

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-16 Thread Jon Ribbens via Python-list
On 2022-04-16, Peter J. Holzer wrote: > On 2022-04-14 15:22:29 -, Jon Ribbens via Python-list wrote: >> On 2022-04-14, Paul Bryan wrote: >> > I think because minutes and hours can easily be composed by multiplying >> > seconds. days is separate because you canno

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-16 Thread Jon Ribbens via Python-list
uld always keep and use your datetimes as UTC, only ever using timezones for the purposes of display. Usually this is because it keeps things simpler for the programmer, and hence they are less likely to introduce bugs into their programs. It appears that with Python it's not so much a guideline as an absolute concrete rule, and not because programmers will introduce bugs, but because you need to avoid bugs in the standard library! -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-16 Thread Jon Ribbens via Python-list
On 2022-04-16, Peter J. Holzer wrote: > On 2022-04-16 13:47:32 -, Jon Ribbens via Python-list wrote: >> That's impossible unless you redefine 'timedelta' from being, as it is >> now, a fixed-length period of time, to instead being the difference >> bet

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-16 Thread Jon Ribbens via Python-list
On 2022-04-16, Peter J. Holzer wrote: > On 2022-04-16 14:22:04 -, Jon Ribbens via Python-list wrote: >> On 2022-04-16, Jon Ribbens wrote: >> > On 2022-04-16, Peter J. Holzer wrote: >> >> Python missed the switch to DST here, the timezone is wrong. >> >

Re: How do I make a video animation with transparent background?

2016-08-09 Thread Dale Marvin via Python-list
e processing you are asking for and in a Python language syntax. Dale -- https://mail.python.org/mailman/listinfo/python-list

Re: I am new to python. I have a few questions coming from an armature!

2016-08-17 Thread Larry Hudson via Python-list
tonk style piano, Ira Ironstrings (don't know real name) played banjo.] -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3: Launch multiple commands(subprocesses) in parallel (but upto 4 any time at same time) AND store each of their outputs into a variable

2016-08-23 Thread Dale Marvin via Python-list
/mail.python.org/mailman/listinfo/python-list

Re: Multimeter USB output

2016-08-29 Thread Larry Hudson via Python-list
completely self-taught, hobby programmer. Been around since the MITS Altair. How many remember that beast?? (And yes -- as you already corrected yourself -- that's CP/M not CM/M.) -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Multimeter USB output

2016-08-30 Thread Larry Hudson via Python-list
On 08/30/2016 04:01 AM, D'Arcy J.M. Cain wrote: On Mon, 29 Aug 2016 21:21:05 -0700 Larry Hudson via Python-list wrote: I remember it well. It's what I used to initially learn C. I'm a completely self-taught, hobby programmer. Been around since the MITS Altair. How many reme

Re: [OT] Altair

2016-08-30 Thread Larry Hudson via Python-list
On 08/30/2016 11:51 AM, Joe wrote: Am 30.08.2016 um 17:52 schrieb D'Arcy J.M. Cain: On Tue, 30 Aug 2016 15:56:07 +0200 Joe wrote: Am 30.08.2016 um 13:01 schrieb D'Arcy J.M. Cain: On Mon, 29 Aug 2016 21:21:05 -0700 Larry Hudson via Python-list wrote: I remember it well. It's

Re: Multimeter USB output

2016-08-30 Thread Larry Hudson via Python-list
ly used at the time. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-04 Thread Larry Hudson via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: How to split value where is comma ?

2016-09-08 Thread Larry Hudson via Python-list
wlist = a.split(",") for x in newlist: print(x) Even easier... for x in a.split(','): print(x) -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Dale Marvin via Python-list
e same false history that I was taught at college. There's much evidence that medieval scholars did not believe the earth was flat. <https://en.wikipedia.org/wiki/Myth_of_the_flat_Earth> Dale -- https://mail.python.org/mailman/listinfo/python-list

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Dale Marvin via Python-list
istory Professors, one in particular seemed to make it his life's purpose to say bad things about religion/bible etc. I should have known better than to get into such an off-topic quagmire. Dale -- https://mail.python.org/mailman/listinfo/python-list

Re: Data Types

2016-09-22 Thread Larry Hudson via Python-list
lex) that is zero is falsey. Any empty collection (list, string, dictionary...) is falsey. EVERYTHING else is truthy. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: strings and ints consistency - isinstance

2016-09-22 Thread Larry Hudson via Python-list
milar. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

RE: [E] ANN: asciimatics v1.7.0

2016-09-26 Thread Scherer, Bill via Python-list
File "", line 1, in File "/tmp/pip-build-3_afj4p1/pypiwin32/setup.py", line 121 print "Building pywin32", pywin32_version ^ SyntaxError: Missing parentheses in call to 'print' -Original Message-

Re: Nested for loops and print statements

2016-09-26 Thread Larry Hudson via Python-list
?) Go back and REWRITE your code with CONSISTENT indenting. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Nested for loops and print statements

2016-09-27 Thread Larry Hudson via Python-list
d incorrectly/inconsistently in newsgroup postings. But if you read the Traceback error message, it is telling you that you have a mix of tabs and spaces _in your original_. READ the error messages, they are important! -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Nested for loops and print statements

2016-09-28 Thread Larry Hudson via Python-list
-=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

ANN: distlib 0.2.4 released on PyPI

2016-09-30 Thread Vinay Sajip via Python-list
https://mail.python.org/mailman/listinfo/python-list

I can't run python on my computer

2016-10-05 Thread Camille Benoit via Python-list
7;t start a subprocess or personal firewall software is blocking the connection."  Can you please help me with this. It'd be a huge help. Thank you very much. -- https://mail.python.org/mailman/listinfo/python-list

Re: Function to take the minimum of 3 numbers

2016-10-09 Thread Larry Hudson via Python-list
-- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with coding a function in Python

2016-10-31 Thread Larry Hudson via Python-list
ives [1,2,3] etc... -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

What is currently the recommended way to work with a distutils-based setup.py that requires compilation?

2016-11-06 Thread Ivan Pozdeev via Python-list
the command line each time, now can they? I also asked this at http://stackoverflow.com/q/40174932/648265 a couple of days ago (to no avail). -- Regards, Ivan -- https://mail.python.org/mailman/listinfo/python-list

Re: Confused with installing per-user in Windows

2016-11-06 Thread Ivan Pozdeev via Python-list
prefer single sdist installer whenever possible. Thanks for reading. --d -- Regards, Ivan -- https://mail.python.org/mailman/listinfo/python-list

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread Gisle Vanem via Python-list
--gv -- https://mail.python.org/mailman/listinfo/python-list

Re: A question about sprite rendering in game development

2016-11-16 Thread Larry Hudson via Python-list
ot;Buy It" is for a hard-copy version. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

modify screen pop up

2016-11-17 Thread John Zayatz via Python-list
when running pycharm the modify setup window keep coming on the screen. I have uninstalled and reinstalled python and pycharm multiple times. Do you have a solution? Thank You" -- https://mail.python.org/mailman/listinfo/python-list

key and ..

2016-11-17 Thread Val Krem via Python-list
939 759939 0 0 2345 154571 345 154571 0 0 3251 350711 251 350711 0 0 file4 key c1 p1 6 46 756 file5 key p1 p2 7 256 4562 Thank you in advance -- https://mail.python.org/mailman/listinfo/python-list

Re: need help to get my python image to move around using tkinter

2016-11-18 Thread Thomas Grops via Python-list
thankyou so much, that is the exact help I required to put me in the right direction :D -- https://mail.python.org/mailman/listinfo/python-list

Re: Can somebody tell me what's wrong wrong with my code? I don't understand

2016-11-23 Thread Larry Hudson via Python-list
assumes the option number is part of the strings for opt in options: print(opt) print()# If you really want the double-spacing, personally I don't think it's needed Here's a bit more advanced version of the for loop, this one assumnes the option numbers are not in the strings in the list... for num, opt in enumerate(options, 1): print('({}) {}'.format(num, opt))# OR print('(%d) %s' % (num, opt)) print()# Again, double-spacing is optional A similar approach could be used for your classNum section. Just some suggestions to read/study/adapt... or ignore. Whatever you feel like. ;-) -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: How to you convert list of tuples to string

2016-11-23 Thread Larry Hudson via Python-list
d" % item # Format it in the way you like. print msg Greetings, Or using the new string formatting syntax: msg = '{},{},{}:{}'.format(*item) The *item in the format() unpacks the tuple. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Random number help

2016-11-23 Thread Thomas Grops via Python-list
an integer too so not a list unless there is a way to convert list to int Many Thanks Tom -- https://mail.python.org/mailman/listinfo/python-list

Re: Random number help

2016-11-23 Thread Thomas Grops via Python-list
On Wednesday, 23 November 2016 19:30:04 UTC, Thomas Nyberg wrote: > On 11/23/2016 02:17 PM, Thomas Grops via Python-list wrote: > > I need a way of generating a random number but there is a catch: > > > > I don't want to include certain numbers, is this possible? &g

Re: Random number help

2016-11-23 Thread Thomas Grops via Python-list
On Wednesday, 23 November 2016 19:30:21 UTC, Chris Kaynor wrote: > On Wed, Nov 23, 2016 at 11:17 AM, Thomas Grops via Python-list > wrote: > > I need a way of generating a random number but there is a catch: > > > > I don't want to include cert

Re: Random number help

2016-11-23 Thread Thomas Grops via Python-list
Thankyou for all your help I have managed to pick a way that works from your suggestions :D -- https://mail.python.org/mailman/listinfo/python-list

Re: How to you convert list of tuples to string

2016-11-23 Thread Larry Hudson via Python-list
obably should have said "newer" or "other".:-) -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Random number help

2016-11-23 Thread Larry Hudson via Python-list
- Here's the results I got for 3 runs... 4 4 4 8 10 6 8 2 4 8 8 4 2 4 6 8 2 4 8 8 10 6 6 4 4 4 8 2 8 4 Of course, the not-wanted list can be a single int, or even empty. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Help with two issues, buttons and second class object

2016-11-24 Thread Thomas Grops via Python-list
nk(950,650,950+40,650+40) #testing features '''tank1.attack() tank1.attack() tank1.checkLife() tank1.medic() tank1.checkLife() tank1.move()''' tank1.move() canvas.pack(padx=10,pady=10) #Complete the GUI main.mainloop() -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with two issues, buttons and second class object

2016-11-24 Thread Thomas Grops via Python-list
attack and medic. I will upload the code when I am done with it or get stuck again to see what your feedback is :D -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with two issues, buttons and second class object

2016-11-24 Thread Larry Hudson via Python-list
On 11/24/2016 06:53 AM, Peter Otten wrote: Thomas Grops via Python-list wrote: [snip...] Instead of repeating your code with copy-and-past make a helper function like the randx() posted by Larry Hudson. By the way, randint(min, max) may return max so there are 9 possible outcomes while you

Re: Help with two issues, buttons and second class object

2016-11-25 Thread Thomas Grops via Python-list
Peter, in your code what does that self.root = root mean in the __init__ function of the class -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with two issues, buttons and second class object

2016-11-25 Thread Thomas Grops via Python-list
Also I am struggling to understand: def move_tank(self, dx, dy): self.x += dx self.y += dy self.canvas.move(self.id, dx, dy) Where does the dx and dy values get input? -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-05 Thread Larry Hudson via Python-list
definitely subject to "senior moments" and not too reliable, but IIRC it was Windows prior to 9x (Win 3 and earlier) that were 16 bit and ran on top of DOS. Win95 was the first 32 bit version and was independent from DOS. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-05 Thread Larry Hudson via Python-list
but... they are ONE person's opinions and are no more than opinions and they ain't gonna change nothin', no how, no way, not ever. [Sorry, I'm in a bad mood today and just had to let off a little steam...] -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-06 Thread Larry Hudson via Python-list
t bother responding to this post. I won't continue it. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Last call for the Call For Proposals of PythonFOSDEM 2017

2016-12-16 Thread Stephane Wirtel via Python-list
l - http://wirtel.be - @matrixise -- https://mail.python.org/mailman/listinfo/python-list

data frame

2016-12-23 Thread Val Krem via Python-list
ck (most recent call last): File "tt.py", line 16, in a['test']=a['w1'] + a['h1'] File "pandas/src/hashtable_class_helper.pxi", line 740, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13107) KeyError: 'w1' Can someone help me what the problem is? Thank you in advance -- https://mail.python.org/mailman/listinfo/python-list

Re: data frame

2016-12-23 Thread Val Krem via Python-list
ntel/intelpython35/lib/python3.5/site-packages/pandas/indexes/base.py", line 1393, in __getitem__ return getitem(key) IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices On Friday, December 23, 2016 3:09 PM, P

Re: data frame

2016-12-24 Thread Val Krem via Python-list
Thank you Peter and Christ. It is was a white space and the fix fixed it. Many thanks. On Friday, December 23, 2016 5:26 PM, Peter Otten <__pete...@web.de> wrote: Val Krem via Python-list wrote: > Here is the first few lines of the data > > > s1.csv > size,w1,h1 >

data

2016-12-29 Thread Val Krem via Python-list
rue) and got ID,10's,20's all 1,4,3,7 2,4,4,8 but I want get the class count as well like as follows ID,class,10's,20's,all 1,3,4,3,7 2,4,4,4,8 how do I do it in python? thank you in advance -- https://mail.python.org/mailman/listinfo/python-list

RE: Clickable hyperlinks

2017-01-03 Thread Dan Strohl via Python-list
gt; url = url_class("mysite.com/coolpage.html") >> print(url) "http://mysite.com/coolpage.html";) >> print(url.plain) "mysite.com/coolpage.html" >> print(url.html('My Site")) 'http://mysite.com/coolpage.html";>My Site

RE: Re: Clickable hyperlinks

2017-01-03 Thread Dan Strohl via Python-list
----- From: Python-list [mailto:python-list-bounces+d.strohl=f5@python.org] On Behalf Of Deborah Swanson Sent: Tuesday, January 03, 2017 1:35 PM To: 'Devin Jeanpierre' Cc: 'comp.lang.python' Subject: RE: Re: Clickable hyperlinks Devin Jeanpierre wrote, on January

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Larry Hudson via Python-list
DO have Python installed, don't you? -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

RE: Clickable hyperlinks

2017-01-05 Thread Dan Strohl via Python-list
gt; url = url_class("mysite.com/coolpage.html") >> print(url) "http://mysite.com/coolpage.html";) >> print(url.plain) "mysite.com/coolpage.html" >> print(url.html('My Site")) 'http://mysite.com/coolpage.html";>My Site' (or wha

RE: Re: Clickable hyperlinks

2017-01-05 Thread Dan Strohl via Python-list
----- From: Python-list [mailto:python-list-bounces+d.strohl=f5@python.org] On Behalf Of Deborah Swanson Sent: Tuesday, January 03, 2017 1:35 PM To: 'Devin Jeanpierre' Cc: 'comp.lang.python' Subject: RE: Re: Clickable hyperlinks Devin Jeanpierre wrote, on January 03, 2017 12:5

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Larry Hudson via Python-list
et used to them). :-) And these tracebacks are what WE need to see to help you. You DO have Python installed, don't you? -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

crosstab output

2017-01-06 Thread Val Krem via Python-list
A21 4 I want to create a variable by adding 2/(3+2) for the first row(A1) and 4/(1+4) for the second row (A2) Final data frame would be A1 3 2 0.4 A2 1 4 0.8 Thank you in advance -- https://mail.python.org/mailman/listinfo/python-list

Re: The hardest problem in computer science...

2017-01-06 Thread Larry Hudson via Python-list
oxed text""" if just not in '<^>': # Check for valid justification code just = '<' if isinstance(txt, str):# Check for string input txt = txt.split('\n') # Convert to list while txt[-1].rstrip() == '': # Delete trailing blank lines txt = txt[:-1] if just == '<': # Left just, only strip on right txt = [line.rstrip() for line in txt] else: # Otherwise strip both ends txt = [line.strip() for line in txt] txt = [line.expandtabs(tsize) for line in txt] # Cnvt tabs to spaces maxlen = max([len(line) for line in txt]) + 4 # Find longest line # Create the boxed text out = [] out.append(self.bxstr('BXtl ' + 'hz ' * maxlen + 'tr')) if tall: out.append(self.bxstr(['BXvt', ' ' * maxlen, 'BXvt'])) for line in txt: out.append(self.bxstr(['BXvt', ' {:{}{}} '. format(line, just, maxlen-4), 'BXvt'])) if tall: out.append(self.bxstr(['BXvt', ' ' * maxlen, 'BXvt'])) out.append(self.bxstr('BXbl ' + 'hz ' * maxlen + 'br')) return '\n'.join(out) #== if __name__ == '__main__': def grid(bc): """Print a box""" print(bc.bxstr(['BXtl hz hz hz TM hz Hz hZ tr'])) print(bc.bxstr(['BXvt', ' ', 'BXvt', ' ', 'BXvt'])) print(bc.bxstr('BX ml hz hz hz mm hz hz hz mr')) print(bc.bxstr(['BX vt', ' ', 'BXvt', ' ', 'BXvt'])) print(bc.bxstr('BXbl hz hz hz bm hz hz hz br')) bc = BoxChr() # Check all chars in all styles for style in bc._styles: bc.style = style grid(bc) # Verify error test try: bc.style = 'xx' except ValueError: print('Invaled style') # Test boxtext() method jab = """'Twas brillig, and the slithy toves \tDid gyre and gimbol in the wabe. All mimsy were the borogoves, \tAnd the momraths outgrabe. """ bc.style='ds' print(bc.boxtext(jab)) print(bc.boxtext(jab, tsize=8)) print(bc.boxtext(jab, just='^')) print(bc.boxtext(jab, just='>')) print(bc.boxtext(jab, tall=False)) -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Python Events in 2017, Need your help.

2017-01-09 Thread Stephane Wirtel via Python-list
https://www.python-fosdem.org -- Stéphane Wirtel - http://wirtel.be - @matrixise -- https://mail.python.org/mailman/listinfo/python-list

Re: Can not run the Python software

2017-01-13 Thread hba...@aol.com via Python-list
I have been added to the mailing list per your instructions. Please, have someone address the problem belowThanks Sent from my Sprint Phone. -- Original message--From: Date: Thu, Jan 5, 2017 10:13 PMTo: python-list@python.org;Subject:Can not run the Python software Hi

Re: Python

2017-01-25 Thread Stephane Wirtel via Python-list
he help needed. > This email is confidential and may be subject to privilege. If you are not > the intended recipient, please do not copy or disclose its content but > contact the sender immediately upon receipt. > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

ANN: A new version (0.4.0) of python-gnupg has been released.

2017-01-29 Thread Vinay Sajip via Python-list
gned)) >>> print "Verified" if verified else "Not verified" 'Verified' As always, your feedback is most welcome (especially bug reports [3], patches and suggestions for improvement, or any other points via the mailing list/discussion group [4]). Enjoy! Cheers Vinay Sajip Red Dove Consultants Ltd. [1] https://bitbucket.org/vinay.sajip/python-gnupg [2] https://pypi.python.org/pypi/python-gnupg/0.4.0 [3] https://bitbucket.org/vinay.sajip/python-gnupg/issues [4] https://groups.google.com/forum/#!forum/python-gnupg -- https://mail.python.org/mailman/listinfo/python-list

Call for Volunteers at PythonFOSDEM 2017

2017-02-01 Thread Stephane Wirtel via Python-list
@matrixise -- https://mail.python.org/mailman/listinfo/python-list

Re: Python gotcha of the day

2018-03-14 Thread Brian Oney via Python-list
second one as > >"" '"' "" "" > >which left me rather puzzled as to why the first wasn't being >interpreted as > >"" ' "' " " "" > >but of course that's not what's going on at all. The second one is > >'''"''' "" > >As to WHY - in both your examples, the literal can be interpreted as a >triple-quoted string, so it is (rather than some combination of >single-quoted strings). And, in both cases, the SHORTEST possible >reading as a triple-quoted string is used. > >There, now I can go back to work. > >- Thomas > >-- >https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Writing a C extension - borrowed references

2018-03-20 Thread Tom Evans via Python-list
l#borrowed-references -- https://mail.python.org/mailman/listinfo/python-list

Re: Writing a C extension - borrowed references

2018-03-20 Thread Tom Evans via Python-list
a few functions. Cheers Tom -- https://mail.python.org/mailman/listinfo/python-list

[OT] Re: Style Q: Instance variables defined outside of __init__

2018-03-20 Thread Tom Evans via Python-list
WD and automatic transmission are more expensive options than FWD and manual transmissions, and most cars are FWD and manual. At least most cars I can afford.. Cheers Tom -- https://mail.python.org/mailman/listinfo/python-list

Re: Writing a C extension - borrowed references

2018-03-20 Thread Tom Evans via Python-list
easily. Cheers Tom -- https://mail.python.org/mailman/listinfo/python-list

condition.acquire vs lock.acquire

2018-03-27 Thread jayshankar nair via Python-list
   while count[ipID]> 1:   cond.wait()    if ipID == 0:   time.sleep(10)    count[ipID] = count[ipID] + 1    cond.release() // can i replace with lock.release Thanks,Jayshankar -- https://mail.python.org/mailman/listinfo/python-list

ANN: A new version (0.4.2) of python-gnupg has been released.

2018-03-28 Thread Vinay Sajip via Python-list
k is most welcome (especially bug reports [3], patches and suggestions for improvement, or any other points via the mailing list/discussion group [4]).  Please refer to the documentation [5] for more information.  Enjoy!  Cheers  Vinay Sajip Red Dove Consultants Ltd.  [1] https://bitbucket.org/vinay.sajip/python-gnupg [2] https://pypi.python.org/pypi/python-gnupg/0.4.2 [3] https://bitbucket.org/vinay.sajip/python-gnupg/issues [4] https://groups.google.com/forum/#!forum/python-gnupg [5] https://gnupg.readthedocs.io/en/latest/  -- https://mail.python.org/mailman/listinfo/python-list

Re: julian 0.14 library

2018-04-04 Thread Dale Marvin via Python-list
; SyntaxError: invalid syntax >>>> >>> >>> Looks like that package requires Python 3, but was uploaded to PyPI >>> without any version tags. You could try running it in Python 3.x, but >>> there's no way to know which ".x" versions are

ANN: distlib 0.2.7 released on PyPI

2018-04-16 Thread Vinay Sajip via Python-list
ilman/listinfo/python-list

Generating list of rsquared_adj regression values for variating i with loop

2018-04-18 Thread Alexander Hempfing via Python-list
ew list, which contains the rsquared_adj values for i=1, i=2,... i=1000. y stays "static" the whole time. Can someone please help me here? -- https://mail.python.org/mailman/listinfo/python-list

Weird side effect of default parameter

2018-05-03 Thread Robert Latest via Python-list
def __init__(self, x, a=dict()): self.x = x self.a = a self.a[x] = x c = Foo(1) d = Foo(2) print(c.__dict__) print(d.__dict__) robert -- https://mail.python.org/mailman/listinfo/python-list

Re: Weird side effect of default parameter

2018-05-07 Thread Robert Latest via Python-list
/mail.python.org/mailman/listinfo/python-list

Re: stock quotes off the web, py style

2018-05-16 Thread Chris Lindsay via Python-list
142.92 > marketCap 131948764304 > open143.5 > openTime1526391000646 > peRatio 10.34 > previousClose 144.3 > primaryExchange New York Stock Exchange > sector Technology > s

Re: stock quotes off the web, py style

2018-05-16 Thread Brian Oney via Python-list
"https://api.iextrading.com/1.0/stock/IBM/quote"; >).read() >ibm = json.loads(ibm.decode("utf-8")) > >if you are using Python 3. > > >-- >https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

RE: Request for comments: use-cases for delayed evaluation

2018-05-17 Thread Dan Strohl via Python-list
None, return '', otherwise join""" for arg in args: tmp_arg = $(arg) If tmp_arg is None: return " return sep.join(args) -- https://mail.python.org/mailman/listinfo/python-list

RE: why does list's .remove() does not return an object?

2018-05-17 Thread Dan Strohl via Python-list
the objects as well for lookups, or a number of other techniques, but it would be easier to simply get it back during the remove(). Dan Strohl -- https://mail.python.org/mailman/listinfo/python-list

Re: "Data blocks" syntax specification draft

2018-05-21 Thread Chris Lindsay via Python-list
ince us that using mandatory TABs is a good idea? > > > -- > Steve > > -- > https://mail.python.org/mailman/listinfo/python-list > -- Chris Open Cosmos Any opinions given above are my own. -- https://mail.python.org/mailman/listinfo/python-list

RE: "Data blocks" syntax specification draft

2018-05-21 Thread Dan Strohl via Python-list
thout having a totally different parser engine just for that, and there are lots of corner cases that would break this approach and would need a different approach, requiring a long list of caveats, and at least personally, I just don't see the value there. The few places where it seems like it would be a benefit are pretty small, and the places where it makes things more complex seem common. Dan Strohl -- https://mail.python.org/mailman/listinfo/python-list

<    27   28   29   30   31   32   33   34   35   36   >