Re: python package management confusion

2019-01-15 Thread dieter
dcs3spp via Python-list writes: > ... > So to manage the development of private packages, e.g. wheels, I would have > to use my own private repository (something like devpi or a an alternative > cloud pypi subscription service) to store each private dependency that I have > written. No, you do

Re: get the terminal's size

2019-01-15 Thread Karen Shaeffer
That will tell you the terminal size at the time Python was started. If the terminal size has changed while Python was running, those environment variables will be wrong. You need to use the TIOCGWINSZ ioctl call: http://www.delorie.com/djgpp/doc/libc/libc_495.html And to detect the si

Re: sampling from frequency distribution / histogram without replacement

2019-01-15 Thread duncan smith
On 15/01/2019 17:59, Ian Hobson wrote: > Hi, > > If I understand your problem you can do it in two passes through the > population. > The thing is that I start with the population histogram and I want to generate a sample histogram. The population itself is too large to deal with each population

Re: get the terminal's size

2019-01-15 Thread Cameron Simpson
On 15Jan2019 13:08, Alex Ternaute wrote: I tried : P = Popen(['stty', '-a'], stdout=subprocess.PIPE, universal_newlines=True) and it runs fine too, so the output seems not really related to that fd. But it is! stty(1) fetches the terminal settings from its standard input, so "fd" is used to s

Re: help with python difference between number

2019-01-15 Thread MRAB
On 2019-01-15 14:07, achyuta2...@gmail.com wrote: M <01/14/2019 08:07:01> Count:0 Total:50 Free: 20 A B M <01/14/2019 08:07:04> Count:1 Total:5 Free:10 A B M <01/14/2019 08:07:07> Count:2 Total:5 Free:3 A B I am trying to make a output like where it prints the free and then th

Re: sampling from frequency distribution / histogram without replacement

2019-01-15 Thread Ian Hobson
Hi, If I understand your problem you can do it in two passes through the population. First, however, lets work through taking a sample of 2 from 7 to demonstrate the method. Take the first element with a probability of 2/7. (Note 1). If you took it, you only want 1 more, so the probability

Re: sampling from frequency distribution / histogram without replacement

2019-01-15 Thread duncan smith
On 15/01/2019 02:41, Spencer Graves wrote: > > > On 2019-01-14 18:40, duncan smith wrote: >> On 14/01/2019 22:59, Gregory Ewing wrote: >>> duncan smith wrote: Hello,    Just checking to see if anyone has attacked this problem before for cases where the population size is unfeas

Re: Encounter issues to install Python

2019-01-15 Thread Anthony Flury via Python-list
What error are you getting ? 'Can not install the software' isn't enough information for me to assist in detail In the mean time - things to check : * Does your user have permission to install to the directory you are trying to install to ? * Does the disk have enough disk space to insta

Re: 3 random numbers

2019-01-15 Thread Alister via Python-list
On Tue, 15 Jan 2019 06:13:00 -0800, Gengyang Cai wrote: > I managed to solve the problem and also another problem with different 3 > random numbers. But it wasn't a very good question in the first place, i > admit > > Indeed it is a poorly write exercise & I suspect it has been misinterpret

Re: Python read text file columnwise

2019-01-15 Thread Neil Cerutti
On 2019-01-15, Juris __ wrote: > Hi! > > On 15/01/2019 17:04, Neil Cerutti wrote: >> On 2019-01-11, shibashib...@gmail.com wrote: >>> Hello I'm very new in python. I have a file in the format: 2018-05-31 16:00:0028.90 81.77 4.3 2018-05-31 20:32:002

Re: Python read text file columnwise

2019-01-15 Thread Juris __
Hi! On 15/01/2019 17:04, Neil Cerutti wrote: > On 2019-01-11, shibashib...@gmail.com wrote: >> Hello >>> >>> I'm very new in python. I have a file in the format: >>> >>> 2018-05-31 16:00:0028.90 81.77 4.3 >>> 2018-05-31 20:32:0028.17 84.89 4.1 >>> 2018-06-20 04:09:00

Re: Python read text file columnwise

2019-01-15 Thread Neil Cerutti
On 2019-01-11, shibashib...@gmail.com wrote: > Hello >> >> I'm very new in python. I have a file in the format: >> >> 2018-05-31 16:00:0028.90 81.77 4.3 >> 2018-05-31 20:32:0028.17 84.89 4.1 >> 2018-06-20 04:09:0027.36 88.01 4.8 >> 2018-06-20 04:15:00

Re: 3 random numbers

2019-01-15 Thread Gengyang Cai
I managed to solve the problem and also another problem with different 3 random numbers. But it wasn't a very good question in the first place, i admit On Tuesday, January 15, 2019 at 9:55:00 PM UTC+8, Rick Johnson wrote: > Gengyang Cai wrote: > > Can anyone understand it and explain it to

help with python difference between number

2019-01-15 Thread achyuta2017
M <01/14/2019 08:07:01> Count:0 Total:50 Free: 20 A B M <01/14/2019 08:07:04> Count:1 Total:5 Free:10 A B M <01/14/2019 08:07:07> Count:2 Total:5 Free:3 A B I am trying to make a output like where it prints the free and then the difference between the current free and previous

Re: [tkinter] question about correct use of validation

2019-01-15 Thread steve
On 15/01/2019 14:16, Rick Johnson wrote: steve wrote: Then it's just a matter of passing a keyword argument: myEntry = MyEntry(master, maxlen=20) What you have above is a tightly coiled, steaming dogpile that will litter your code base. Encapsulate that stench, would ya? sure, everyth

Re: get the terminal's size

2019-01-15 Thread Alex Ternaute
Hi Cameron, >>I tried : P = Popen(['stty', '-a'], stdout=subprocess.PIPE, >>universal_newlines=True) and it runs fine too, so the output seems not >>really related to that fd. > But it is! stty(1) fetches the terminal settings from its standard > input, so "fd" is used to supply this. In your Po

[tkinter] question about correct use of validation

2019-01-15 Thread steve
for determine the maximum number of characters in an entry I have read several interpretations for the solution of the problem, but I wanted to find an alternative way (for convenience of the code) I kindly ask for an opinion on the use of validation in this way. - problem: limit number

Re: get the terminal's size

2019-01-15 Thread Cameron Simpson
On 15Jan2019 10:26, Alex Ternaute wrote: My cs.tty module (on PyPI) has a ttysize function: https://pypi.org/project/cs.tty/ which just parses the output of the stty command. [...] Fine, indeed ! I've installed cs.ttyy. I just don't understand the reason why it takes "fd" as an argument.

Re: get the terminal's size

2019-01-15 Thread Alex Ternaute
Hi there : > On 2019-01-14, Bob van der Poel wrote: >> http://stackoverflow.com/questions/566746/how-to-get-console-window- width-in-python Simple and direct, I think I'll use this one. Thanks a lot. John Doe : > and have a look at this one too: > https://stackoverflow.com/questions/1396820/apt

Re: python package management confusion

2019-01-15 Thread dcs3spp via Python-list
On Tuesday, 15 January 2019 07:48:57 UTC, Chris Angelico wrote: > On Tue, Jan 15, 2019 at 6:18 PM dieter wrote: > > > > dcs3spp via Python-list writes: > > > I am a newbie completely confused with python package management. > > > > > > I have a setup.py file (listed below) and have setup pip and

Re: get the terminal's size

2019-01-15 Thread Alex Ternaute
Hi Cameron, > My cs.tty module (on PyPI) has a ttysize function: > https://pypi.org/project/cs.tty/ > which just parses the output of the stty command. > If you don't want the cs.tty module, the ttysize code is just this: > > WinSize = namedtuple('WinSize', 'rows columns') > > def tty