Re: Python script not letting go of files

2022-11-29 Thread Mike Dewhirst
Stefan Thank you. I should have said this has been working fine for years and years until Ubuntu 2022.04 on a new droplet running Apache/2.4.52 I will refactor it one day - especially if the script is implicated. But I think I have to learn how to use lsof first! Cheers Mike On 30/11/2022

Re: Python script not letting go of files

2022-11-29 Thread Weatherby,Gerard
"Weatherby,Gerard" writes: >Do any of you Python folks see any blunders in the above code along the >lines of not letting go of py files or static assets? Er, no, I just replied to the original poster. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python script not letting go of files

2022-11-29 Thread Weatherby,Gerard
: python-list@python.org Subject: Python script not letting go of files I have a script which fetches a production site directly from a Subversion repo using svn export It runs a bunch of commands by calling this little method ... def trycmd(cmd, log): retcode = -1 ret = f"Trying

Python script not letting go of files

2022-11-28 Thread Mike Dewhirst
I have a script which fetches a production site directly from a Subversion repo using svn export It runs a bunch of commands by calling this little method ... def trycmd(cmd, log):     retcode = -1     ret = f"Trying {cmd}"     try:     retcode = os.system(cmd)     ret = f"\n{cmd} -ok->

Re: Weird strace of #! python script

2022-03-14 Thread Barry
> On 14 Mar 2022, at 21:29, Dan Stromberg wrote: > > I expected to see an exec of /usr/bin/python2, but I don't. I just see an > exec of /tmp/t. I understand that the kernel handles the #! Line itself, which is why you do not see it in strace. Barry -- https://mail.python.org/mailman/l

Re: Weird strace of #! python script

2022-03-14 Thread Chris Angelico
On Tue, 15 Mar 2022 at 08:28, Dan Stromberg wrote: > > Hi folks. > > First off, I know, python2 is ancient history. Porting to 3.x is on my > list of things to do (though I'm afraid it's not yet at the top of the > list), and the same thing happens with python3. > > So anyway, I'm strace'ing a #!

Weird strace of #! python script

2022-03-14 Thread Dan Stromberg
Hi folks. First off, I know, python2 is ancient history. Porting to 3.x is on my list of things to do (though I'm afraid it's not yet at the top of the list), and the same thing happens with python3. So anyway, I'm strace'ing a #!/usr/bin/python2 script. I expected to see an exec of /usr/bin/py

Re: mac app from a python script?

2022-03-06 Thread Dan Stromberg
On Sun, Jan 23, 2022 at 9:59 AM Dan Stromberg wrote: > > Hi folks. > > I have a Python 3 script (built on top of gi.respository.Gtk) that runs on > Linux and macOS 11.5. It's at > https://stromberg.dnsalias.org/~strombrg/hcm/ if you're curious. > > It works the way I want on Linux, but on macOS

Re: mac app from a python script?

2022-01-26 Thread Dan Stromberg
On Wed, Jan 26, 2022 at 2:35 PM Barry wrote: > > > On 26 Jan 2022, at 05:17, Dan Stromberg wrote: > > > On Tue, Jan 25, 2022 at 6:41 PM Dan Stromberg wrote: > >> >> On Tue, Jan 25, 2022 at 2:23 PM Barry wrote: >> >>> >>> On 25 Jan 2022, at 02:56, Dan Stromberg wrote: >>> >>>  >>> >>> On Sun,

Re: mac app from a python script?

2022-01-26 Thread Barry
> On 26 Jan 2022, at 05:17, Dan Stromberg wrote: > >  > >> On Tue, Jan 25, 2022 at 6:41 PM Dan Stromberg wrote: >> >>> On Tue, Jan 25, 2022 at 2:23 PM Barry wrote: >>> > On 25 Jan 2022, at 02:56, Dan Stromberg wrote: >  > On Sun, Jan 23, 2022 at 1:37 PM Barry wr

Re: mac app from a python script?

2022-01-25 Thread Dan Stromberg
On Tue, Jan 25, 2022 at 6:41 PM Dan Stromberg wrote: > > On Tue, Jan 25, 2022 at 2:23 PM Barry wrote: > >> >> On 25 Jan 2022, at 02:56, Dan Stromberg wrote: >> >>  >> >> On Sun, Jan 23, 2022 at 1:37 PM Barry wrote: >> >>> >>> I do not have experience with great, but you might try pyinstaller.

Re: mac app from a python script?

2022-01-25 Thread Dan Stromberg
On Tue, Jan 25, 2022 at 2:23 PM Barry wrote: > > On 25 Jan 2022, at 02:56, Dan Stromberg wrote: > >  > > On Sun, Jan 23, 2022 at 1:37 PM Barry wrote: > >> >> I do not have experience with great, but you might try pyinstaller. >> I use it to make a PyQt Mac app successfully. >> >> It’s command

Re: mac app from a python script?

2022-01-25 Thread Barry
> On 25 Jan 2022, at 02:56, Dan Stromberg wrote: > >  > >> On Sun, Jan 23, 2022 at 1:37 PM Barry wrote: >> >> I do not have experience with great, but you might try pyinstaller. >> I use it to make a PyQt Mac app successfully. >> >> It’s command line plus setup script. > > I wound up doin

Re: mac app from a python script?

2022-01-24 Thread Dan Stromberg
On Sun, Jan 23, 2022 at 1:37 PM Barry wrote: > > I do not have experience with great, but you might try pyinstaller. > I use it to make a PyQt Mac app successfully. > > It’s command line plus setup script. > I wound up doing: 1) pyinstaller, as normal, but this created a broken all-encompassing

Re: mac app from a python script?

2022-01-24 Thread Cameron Simpson
On 24Jan2022 17:48, Barry Scott wrote: >> On 24 Jan 2022, at 02:31, Cameron Simpson wrote: >> On 23Jan2022 21:37, Barry Scott wrote: >>> I do not have experience with great, but you might try pyinstaller. >>> I use it to make a PyQt Mac app successfully. >> >> And I have used py2app/py2applet t

Re: mac app from a python script?

2022-01-24 Thread Barry
> On 24 Jan 2022, at 02:31, Cameron Simpson wrote: > > On 23Jan2022 21:37, Barry Scott wrote: >> I do not have experience with great, but you might try pyinstaller. >> I use it to make a PyQt Mac app successfully. > > And I have used py2app/py2applet to create a PyQt Mac app. Current Py2app

Re: mac app from a python script?

2022-01-24 Thread Mats Wichmann
ith that. > > I've experimented with a few different options for this (months ago), > mostly py2app, but it doesn't appear to like gi.repository.Gtk much. > > What's the most straightforward way of installing a Python script under > /Applications on macOS? I'd

Re: mac app from a python script?

2022-01-23 Thread Cameron Simpson
On 23Jan2022 21:37, Barry Scott wrote: >I do not have experience with great, but you might try pyinstaller. >I use it to make a PyQt Mac app successfully. And I have used py2app/py2applet to create a PyQt Mac app. AIUI, they both do the same basic task: bundle a Python interpreter and all the i

Re: mac app from a python script?

2022-01-23 Thread Barry
script under /Applications with >> appropriate metadata - but if it's easier to do a single executable, .dmg >> or .pkg, I'd be fine with that. >> >> I've experimented with a few different options for this (months ago), >> mostly py2app, but it doesn

Re: mac app from a python script?

2022-01-23 Thread Barry
kg, I'd be fine with that. > > I've experimented with a few different options for this (months ago), > mostly py2app, but it doesn't appear to like gi.repository.Gtk much. > > What's the most straightforward way of installing a Python script under > /Applications

mac app from a python script?

2022-01-23 Thread Dan Stromberg
ear to like gi.repository.Gtk much. What's the most straightforward way of installing a Python script under /Applications on macOS? I'd -love- to find a way of doing something analogous to Linux' desktop-file-install - that is, something that isn't click-happy, but GUI's a

Re: Python script seems to stop running when handling very large dataset

2021-10-30 Thread Shaozhong SHI
On Saturday, 30 October 2021, Dieter Maurer wrote: > Shaozhong SHI wrote at 2021-10-29 23:42 +0100: > >Python script works well, but seems to stop running at a certain point > when > >handling very large dataset. > > > >Can anyone shed light on this? > > Som

Re: Python script seems to stop running when handling very large dataset

2021-10-30 Thread Dieter Maurer
Shaozhong SHI wrote at 2021-10-29 23:42 +0100: >Python script works well, but seems to stop running at a certain point when >handling very large dataset. > >Can anyone shed light on this? Some algorithms have non linear runtime. For example, it is quite easy to write code with quadr

Re: Python script seems to stop running when handling very large dataset

2021-10-29 Thread Grant Edwards
On 2021-10-29, Shaozhong SHI wrote: > Python script works well, but seems to stop running at a certain point when > handling very large dataset. > > Can anyone shed light on this? No. Nobody can help you with the amount of information you have provided. -- Grant -- https://mai

Re: Python script seems to stop running when handling very large dataset

2021-10-29 Thread Paul Bryan
) to see how much memory is consumed? On Fri, 2021-10-29 at 23:42 +0100, Shaozhong SHI wrote: > Python script works well, but seems to stop running at a certain > point when > handling very large dataset. > > Can anyone shed light on this? > > Regards, David -- https://ma

Re: Python script seems to stop running when handling very large dataset

2021-10-29 Thread Dan Stromberg
On Fri, Oct 29, 2021 at 4:04 PM dn via Python-list wrote: > On 30/10/2021 11.42, Shaozhong SHI wrote: > > Python script works well, but seems to stop running at a certain point > when > > handling very large dataset. > > > > Can anyone shed light on this? > >

Re: Python script seems to stop running when handling very large dataset

2021-10-29 Thread dn via Python-list
On 30/10/2021 11.42, Shaozhong SHI wrote: > Python script works well, but seems to stop running at a certain point when > handling very large dataset. > > Can anyone shed light on this? Storage space? Taking time to load/format/process data-set? -- Regards, =dn -- https://mai

Python script seems to stop running when handling very large dataset

2021-10-29 Thread Shaozhong SHI
Python script works well, but seems to stop running at a certain point when handling very large dataset. Can anyone shed light on this? Regards, David -- https://mail.python.org/mailman/listinfo/python-list

Re: Python script accessing own source code

2021-05-13 Thread Chris Angelico
On Thu, May 13, 2021 at 5:27 PM Robin Becker wrote: > > On 12/05/2021 20:17, Mirko via Python-list wrote: > > Am 12.05.2021 um 20:41 schrieb Robin Becker: > >> ... > >>> > >... > >> since GvR has been shown to have time traveling abilities such a > >> script could paradoxically appear

Re: Python script accessing own source code

2021-05-13 Thread Robin Becker
On 12/05/2021 20:17, Mirko via Python-list wrote: Am 12.05.2021 um 20:41 schrieb Robin Becker: ... ... since GvR has been shown to have time traveling abilities such a script could paradoxically appear acausally. -- yrs-not-too-seriously Robin Becker Not sure, if that's what y

Re: Python script accessing own source code

2021-05-12 Thread Mirko via Python-list
Am 12.05.2021 um 20:41 schrieb Robin Becker: > ... >> >> with open(__file__) as myself: >> print(myself.read(), end='') > > very nice, but accessing code that's already seems quite easy. I > think the real problem is to get a python scrip

Re: Python script accessing own source code

2021-05-12 Thread Robin Becker
... with open(__file__) as myself:     print(myself.read(), end='') very nice, but accessing code that's already seems quite easy. I think the real problem is to get a python script name that creates and writes itself. So I would ask if any one has the solution to t

Re: Python script accessing own source code

2021-05-12 Thread Stestagg
On 2021-05-12 15:48, Michael F. Stemper wrote: > > On 12/05/2021 08.26, Dino wrote: > > > >> Hi, here's my (probably unusual) problem. Can a Python (3.7+) script > >> access its own source code? > > > > Here is a fairly simple python program that reads itself: > > > > =

Re: Python script accessing own source code

2021-05-12 Thread MRAB
On 2021-05-12 15:48, Michael F. Stemper wrote: On 12/05/2021 08.26, Dino wrote: Hi, here's my (probably unusual) problem. Can a Python (3.7+) script access its own source code? Here is a fairly simple python program that reads itself: #!/usr/b

Re: Python script accessing own source code

2021-05-12 Thread Michael F. Stemper
On 12/05/2021 08.26, Dino wrote: Hi, here's my (probably unusual) problem. Can a Python (3.7+) script access its own source code? Here is a fairly simple python program that reads itself: #!/usr/bin/python import sys with open( sys.argv[0], "

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-29 Thread Peter J. Holzer
On 2020-05-29 14:28:59 +0900, Inada Naoki wrote: > pymalloc manages only small blocks of memory. > Large (more than 512 byte) memory blocks are managed by malloc/free. > > glibc malloc doesn't return much freed memory to OS. That depends on what "much" means. Glibc does return blocks to the OS w

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread Inada Naoki
; https://mail.python.org/mailman/listinfo/python-list > > or, via email, send a message with subject or body 'help' to > > python-list-requ...@python.org > > > > You can reach the person managing the list at > > python-list-ow...@python.org > &

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread Dieter Maurer
rmli...@riseup.net wrote at 2020-5-28 18:56 -0700: >We just ran into this problem when running our aiootp package's memory >hard password hashing function (https://github.com/rmlibre/aiootp/). The >memory was not being cleared after the function finished running but the >script was still live. I h

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread Chris Angelico
On Fri, May 29, 2020 at 12:08 PM wrote: > > > We just ran into this problem when running our aiootp package's memory > hard password hashing function (https://github.com/rmlibre/aiootp/). Have you considered implementing that module in something else? Try Cythonizing it and see if suddenly your m

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread rmlibre
gt; than "Re: Contents of Python-list digest..." > > Today's Topics: > > 1. Re: Custom logging function (zljubi...@gmail.com) >2. Ram memory not freed after executing python script on ubuntu > system (Rahul Gupta) >3. Re: Ram memory not freed

Re: Ram memory not freed after executing python script on ubuntu system

2020-05-28 Thread Peter J. Holzer
On 2020-05-27 22:49:53 -0700, Rahul Gupta wrote: > I am having a Ubuntu system which has 125 Gb of RAM. I executed few > python scripts on that system. Those scripts uses numpy arrays and > pandas. Now execution was over but still 50 gb of RAM and 2 Gb cache > and 8.4 Gb of swap is occupied. At thi

Re: Ram memory not freed after executing python script on ubuntu system

2020-05-28 Thread Sam
On 5/28/20 12:49 AM, Rahul Gupta wrote: I am having a Ubuntu system which has 125 Gb of RAM. I executed few python scripts on that system. Those scripts uses numpy arrays and pandas. Now execution was over but still 50 gb of RAM and 2 Gb cache and 8.4 Gb of swap is occupied. At this moment no

Re: Ram memory not freed after executing python script on ubuntu system

2020-05-28 Thread Chris Angelico
On Thu, May 28, 2020 at 6:26 PM Rahul Gupta wrote: > > On Thursday, May 28, 2020 at 11:20:05 AM UTC+5:30, Rahul Gupta wrote: > > I am having a Ubuntu system which has 125 Gb of RAM. I executed few python > > scripts on that system. Those scripts uses numpy arrays and pandas. Now > > execution wa

Re: Ram memory not freed after executing python script on ubuntu system

2020-05-28 Thread Rahul Gupta
On Thursday, May 28, 2020 at 11:20:05 AM UTC+5:30, Rahul Gupta wrote: > I am having a Ubuntu system which has 125 Gb of RAM. I executed few python > scripts on that system. Those scripts uses numpy arrays and pandas. Now > execution was over but still 50 gb of RAM and 2 Gb cache and 8.4 Gb of swa

Re: Ram memory not freed after executing python script on ubuntu system

2020-05-27 Thread Chris Angelico
On Thu, May 28, 2020 at 3:51 PM Rahul Gupta wrote: > > > I am having a Ubuntu system which has 125 Gb of RAM. I executed few python > scripts on that system. Those scripts uses numpy arrays and pandas. Now > execution was over but still 50 gb of RAM and 2 Gb cache and 8.4 Gb of swap > is occupi

Ram memory not freed after executing python script on ubuntu system

2020-05-27 Thread Rahul Gupta
I am having a Ubuntu system which has 125 Gb of RAM. I executed few python scripts on that system. Those scripts uses numpy arrays and pandas. Now execution was over but still 50 gb of RAM and 2 Gb cache and 8.4 Gb of swap is occupied. At this moment nothing is running on the system. I have go

Re: python script to give a list of prime no.

2020-04-05 Thread Dan Sommers
On Sun, 05 Apr 2020 19:46:00 +0200 Pieter van Oostrum wrote: > Sathvik Babu Veligatla writes: > > > hi, > > I am new to python, and i am trying to output the prime numbers > > beginning from 3 and i cannot get the required output. It stops > > after giving the output "7" and that's it. > > COD

Re: python script to give a list of prime no.

2020-04-05 Thread Pieter van Oostrum
Sathvik Babu Veligatla writes: > hi, > I am new to python, and i am trying to output the prime numbers beginning > from 3 and i cannot get the required output. > It stops after giving the output "7" and that's it. > > CODE: > a = 3 > l = [] > while True: > for i in range(2,a): > if a

Re: python script to give a list of prime no.

2020-04-05 Thread Sathvik Babu Veligatla
On Sunday, April 5, 2020 at 8:03:19 PM UTC+5:30, inhahe wrote: > On Sun, Apr 5, 2020 at 8:26 AM Sathvik Babu Veligatla < > sathvikveliga...@gmail.com> wrote: > > > hi, > > I am new to python, and i am trying to output the prime numbers beginning > > from 3 and i cannot get the required output. > >

Re: python script to give a list of prime no.

2020-04-05 Thread Sathvik Babu Veligatla
On Sunday, April 5, 2020 at 8:03:19 PM UTC+5:30, inhahe wrote: > On Sun, Apr 5, 2020 at 8:26 AM Sathvik Babu Veligatla < > sathvikveliga...@gmail.com> wrote: > > > hi, > > I am new to python, and i am trying to output the prime numbers beginning > > from 3 and i cannot get the required output. > >

Fwd: python script to give a list of prime no.

2020-04-05 Thread inhahe
On Sun, Apr 5, 2020 at 8:26 AM Sathvik Babu Veligatla < sathvikveliga...@gmail.com> wrote: > hi, > I am new to python, and i am trying to output the prime numbers beginning > from 3 and i cannot get the required output. > It stops after giving the output "7" and that's it. > > CODE: > a = 3 > l =

Re: python script to give a list of prime no.

2020-04-05 Thread Peter J. Holzer
On 2020-04-05 05:22:45 -0700, Sathvik Babu Veligatla wrote: > I am new to python, and i am trying to output the prime numbers > beginning from 3 and i cannot get the required output. It stops after > giving the output "7" and that's it. A technique I learned when I started programming (back in the

Re: python script to give a list of prime no.

2020-04-05 Thread Barry Scott
> On 5 Apr 2020, at 14:08, Sathvik Babu Veligatla > wrote: > > On Sunday, April 5, 2020 at 6:09:04 PM UTC+5:30, Chris Angelico wrote: >> On Sun, Apr 5, 2020 at 10:26 PM Sathvik Babu Veligatla >> wrote: >>> >>> hi, >>> I am new to python, and i am trying to output the prime numbers beginning

Re: python script to give a list of prime no.

2020-04-05 Thread Sathvik Babu Veligatla
On Sunday, April 5, 2020 at 6:09:04 PM UTC+5:30, Chris Angelico wrote: > On Sun, Apr 5, 2020 at 10:26 PM Sathvik Babu Veligatla > wrote: > > > > hi, > > I am new to python, and i am trying to output the prime numbers beginning > > from 3 and i cannot get the required output. > > It stops after gi

Re: python script to give a list of prime no.

2020-04-05 Thread Sathvik Babu Veligatla
On Sunday, April 5, 2020 at 6:04:20 PM UTC+5:30, Orges Leka wrote: > You can try the following: > It is based on trial division and very slow, compared to the state of the > art: > > import math > def is_prime(n): > if int(math.sqrt(n))**2 == n: > return(False) > for i in range(2,i

Re: python script to give a list of prime no.

2020-04-05 Thread Chris Angelico
On Sun, Apr 5, 2020 at 10:35 PM Orges Leka wrote: > > You can try the following: > It is based on trial division and very slow, compared to the state of the > art: > I think it's more helpful to assist the OP in learning coding, rather than provide a completely different function to do a similar

Re: python script to give a list of prime no.

2020-04-05 Thread Chris Angelico
On Sun, Apr 5, 2020 at 10:26 PM Sathvik Babu Veligatla wrote: > > hi, > I am new to python, and i am trying to output the prime numbers beginning > from 3 and i cannot get the required output. > It stops after giving the output "7" and that's it. > > CODE: > a = 3 > l = [] > while True: > for

Re: python script to give a list of prime no.

2020-04-05 Thread Orges Leka
You can try the following: It is based on trial division and very slow, compared to the state of the art: import math def is_prime(n): if int(math.sqrt(n))**2 == n: return(False) for i in range(2,int(math.ceil(math.sqrt(n: if n%i==0: return(False) return

python script to give a list of prime no.

2020-04-05 Thread Sathvik Babu Veligatla
hi, I am new to python, and i am trying to output the prime numbers beginning from 3 and i cannot get the required output. It stops after giving the output "7" and that's it. CODE: a = 3 l = [] while True: for i in range(2,a): if a%i == 0: l.append(1) else:

Re: 【Regarding Performance of a Python Script....】

2020-03-01 Thread Cameron Simpson
On 28Feb2020 19:24, Kenzi wrote: I have a question regarding a simple code snippet in Python: from subprocess import check_output for i in range(1024): check_output(['/bin/bash', '-c', 'echo 42'], close_fds=True) *I wonder why running it in Python 3.7 is much faster than Python 2.7? * (Pyth

Re: 【Regarding Performance of a Python Script....】

2020-02-29 Thread Peter J. Holzer
On 2020-02-28 19:24:18 -0500, Kenzi wrote: > I have a question regarding a simple code snippet in Python: > > from subprocess import check_output > for i in range(1024): > check_output(['/bin/bash', '-c', 'echo 42'], close_fds=True) > > *I wonder why running it in Python 3.7 is much faster t

【Regarding Performance of a Python Script....】

2020-02-28 Thread Kenzi
Hello there, I have a question regarding a simple code snippet in Python: from subprocess import check_output for i in range(1024): check_output(['/bin/bash', '-c', 'echo 42'], close_fds=True) *I wonder why running it in Python 3.7 is much faster than Python 2.7? * (Python 3.7 is still fast

Re: insert data in python script

2020-02-18 Thread DL Neil via Python-list
On 19/02/20 4:52 AM, alberto wrote: Hi, I solve it with external file as follows import preos # pass name, Tc, Pc, omega methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011) methane.print_params() thanks to everyone It is difficult to learn a new programming language, even for

Re: insert data in python script

2020-02-18 Thread alberto
Il giorno martedì 18 febbraio 2020 11:01:11 UTC+1, David ha scritto: > On Tue, 18 Feb 2020 at 20:45, alberto wrote: > > Il giorno martedì 18 febbraio 2020 09:34:51 UTC+1, DL Neil ha scritto: > > > > > my code preos in one file preos.py > > > > my commands are > > > > > > > > alberto@HENDRIX ~/PRE

Re: insert data in python script

2020-02-18 Thread Michael Torrie
On 2/18/20 2:41 AM, alberto wrote: > Il giorno martedì 18 febbraio 2020 09:34:51 UTC+1, DL Neil ha scritto: >> The first instruction (immediately above) imports the module preos.py. >> That works (no error message!). >> >> The second instruction refers to a Python class called Molecule. That >> f

Re: insert data in python script

2020-02-18 Thread David
On Tue, 18 Feb 2020 at 20:45, alberto wrote: > Il giorno martedì 18 febbraio 2020 09:34:51 UTC+1, DL Neil ha scritto: > > > my code preos in one file preos.py > > > my commands are > > > > > > alberto@HENDRIX ~/PREOS $ python3.5 > > > Python 3.5.2 (default, Oct 8 2019, 13:06:37) > > > [GCC 5.4.0

Re: insert data in python script

2020-02-18 Thread alberto
Il giorno martedì 18 febbraio 2020 09:34:51 UTC+1, DL Neil ha scritto: > ... > > >> import preos > >> # pass name, Tc, Pc, omega > >> methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011) > >> methane.print_params() > > ... > > > my code preos in one file preos.py > > my commands ar

Re: insert data in python script

2020-02-18 Thread DL Neil via Python-list
... import preos # pass name, Tc, Pc, omega methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011) methane.print_params() ... my code preos in one file preos.py my commands are alberto@HENDRIX ~/PREOS $ python3.5 Python 3.5.2 (default, Oct 8 2019, 13:06:37) [GCC 5.4.0 20160609]

Re: insert data in python script

2020-02-17 Thread alberto
Il giorno lunedì 17 febbraio 2020 17:48:07 UTC+1, alberto ha scritto: > Hi, > I would use this script to evaluate fugacity coefficient with PENG-ROBINSON > equation, but I don't understand the correct mode to insert data > > import numpy as np > import matplotlib.pyplot as plt > from scipy.optim

Re: insert data in python script

2020-02-17 Thread DL Neil via Python-list
Please help us to help you! 1 is all of this code in a single file or spread across (at least) two modules? What are their names? What is the directory structure? 2 copy-paste the actual error message received. It works for me! 1 not knowing your circumstances, I put all the code in one file 2

insert data in python script

2020-02-17 Thread alberto
Hi, I would use this script to evaluate fugacity coefficient with PENG-ROBINSON equation, but I don't understand the correct mode to insert data import numpy as np import matplotlib.pyplot as plt from scipy.optimize import newton R = 8.314e-5 # universal gas constant, m3-bar/K-mol class Molecu

Execute python script from VB6 to display Outlook Window

2019-12-22 Thread wojtek . dominicana
is a different between calling script via Shell() function and run it directly from command line. I tried of course solution as follows: Set obj = CreateObject("WScript.Shell") obj.Run sPythonFile but its the same situation. I createt bat file and I execute this bat file which has insi

Re: how can i run python script in spamassassin

2019-10-03 Thread Skip Montanaro
aca wrote: > > Hello, I'm sorry to bother you, I just reviewed this post, the Python > beginner, the Linux beginner, needs to run spamassassin, and now I'm trying > to do something very similar with a Python script is for a project, maybe > you can help me thanks. > > I

Re: how can i run python script in spamassassin

2019-10-03 Thread Michael Torrie
On 10/3/19 1:10 PM, Doris Marca Guaraca wrote: > > Hello, I'm sorry to bother you, I just reviewed this post, the Python > beginner, the Linux beginner, needs to run spamassassin, and now I'm trying > to do something very similar with a Python script is for a project, ma

how can i run python script in spamassassin

2019-10-03 Thread Doris Marca Guaraca
Hello, I'm sorry to bother you, I just reviewed this post, the Python beginner, the Linux beginner, needs to run spamassassin, and now I'm trying to do something very similar with a Python script is for a project, maybe you can help me thanks. I appreciate it a lot. Regards Doris

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
On Friday, June 14, 2019 at 1:42:17 PM UTC-5, Rob Gaddi wrote: > Condolences. TI is a world-leader in giving every eval board its own > complicated, proprietary digital interface, then not documenting it > because "You can just use the provided software" that hasn't been > updated since 2001 an

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Rob Gaddi
On 6/14/19 11:14 AM, Christian Seberino wrote: Out of curiosity, what hardware? Texas Instruments ADS1675REF card Condolences. TI is a world-leader in giving every eval board its own complicated, proprietary digital interface, then not documenting it because "You can just use the provid

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
> Out of curiosity, what hardware? Texas Instruments ADS1675REF card -- https://mail.python.org/mailman/listinfo/python-list

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Rob Gaddi
On 6/14/19 8:49 AM, Christian Seberino wrote: Thanks for all the help. I'll definitely try to bypass the GUI first if possible. This is on Windows 7 so maybe AutoIt will do the trick if can't avoid the GUI. Thanks again everyone. Out of curiosity, what hardware? -- Rob Gaddi, Highland Te

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
Thanks for all the help. I'll definitely try to bypass the GUI first if possible. This is on Windows 7 so maybe AutoIt will do the trick if can't avoid the GUI. Thanks again everyone. -- https://mail.python.org/mailman/listinfo/python-list

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Chris Hills
On 6/14/2019 12:49 AM, Christian Seberino wrote: I have a third party GUI that manages some hardware. I want to control the hardware from a Python script. This seems to mean I need to somehow have Python code that imitates a human doing the necessary actions on the GUI (selecting menu

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Thomas Jollans
On 14/06/2019 01.49, Christian Seberino wrote: > I have a third party GUI that manages some hardware. > > I want to control the hardware from a Python script. Forget about the GUI, see if you can control your device without it. See how well the device is documented. Maybe there's

Re: How control a GUI for an unrelated application from a Python script?

2019-06-13 Thread Julio Oña
ontrol the hardware from a Python script. > > > > This seems to mean I need to somehow have Python code > > that imitates a human doing the necessary > > actions on the GUI (selecting menu options, pressing buttons, etc.) > > > > Is this possible > > M

Re: How control a GUI for an unrelated application from a Python script?

2019-06-13 Thread Michael Torrie
On 06/13/2019 05:49 PM, Christian Seberino wrote: > I have a third party GUI that manages some hardware. > > I want to control the hardware from a Python script. > > This seems to mean I need to somehow have Python code > that imitates a human doing the necessary >

Re: How control a GUI for an unrelated application from a Python script?

2019-06-13 Thread Chris Angelico
On Fri, Jun 14, 2019 at 9:51 AM Christian Seberino wrote: > > I have a third party GUI that manages some hardware. > > I want to control the hardware from a Python script. > > This seems to mean I need to somehow have Python code > that imitates a human doing the necessary

How control a GUI for an unrelated application from a Python script?

2019-06-13 Thread Christian Seberino
I have a third party GUI that manages some hardware. I want to control the hardware from a Python script. This seems to mean I need to somehow have Python code that imitates a human doing the necessary actions on the GUI (selecting menu options, pressing buttons, etc.) Is this possible

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread Peter J. Holzer
On 2019-03-19 14:22:10 -, Grant Edwards wrote: > On 2019-03-18, Malcolm Greene wrote: > > Wondering if there's a way to have my Python scripts ignore these > > Ctrl+S signals or if this behavior is outside of my Python script's > > control. > > This has nothing to do with Python does it? > >

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread eryk sun
ed and the pause was due to accidentally selecting text. A Python script can disable this mode via GetConsoleMode / SetConsoleMode [1], called via PyWin32 or ctypes. The original mode should be restored using an atexit function. With quick-edit mode disabled, selecting text requires enabling mark mode

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread Malcolm Greene
> This has nothing to do with Python does it? Isn't Python is just writing to > stdout and those write calls are blocking due because the terminal emulator > has stopped reading the other end of the > pipe/pty/queue/buffer/whatever-it's-called-in-windows? You're right. But I wasn't sure. I know

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread Grant Edwards
On 2019-03-18, Malcolm Greene wrote: > Wondering if there's a way to have my Python scripts ignore these > Ctrl+S signals or if this behavior is outside of my Python script's > control. This has nothing to do with Python does it? Isn't Python is just writing to stdout and those write calls are

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread eryk sun
On 3/18/19, Dennis Lee Bieber wrote: > On Mon, 18 Mar 2019 14:38:40 -0400, "Malcolm Greene" > declaimed the following: > >> >>Wondering if there's a way to have my Python scripts ignore these Ctrl+S >> signals or if this behavior is outside of my Python script's control. If >> there's a way to di

Re: Block Ctrl+S while running Python script at Windows console? (solved)

2019-03-18 Thread Malcolm Greene
Eryk, > Another common culprit is quick-edit mode, in which case a stray mouse click > can select text, even just a single character. The console pauses while text > is selected. MYSTERY SOLVED !! THANK YOU !! Apparently, while mouse clicking between windows, I was inadvertently selecting a c

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-18 Thread eryk sun
On 3/18/19, eryk sun wrote: > > Ctrl+S functions as pause in line-edit mode if extended text selection > is enabled in the console defaults or properties dialog Correction, it pauses if extended text selection is *disabled*. -- https://mail.python.org/mailman/listinfo/python-list

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-18 Thread eryk sun
On 3/18/19, Malcolm Greene wrote: > > I'm running some Python 3.6 scripts at the Windows 10/Windows Server 2016 > console. In my every day workflow, I seem to be accidentally sending Ctrl+S > keystrokes to some of console sessions, pausing my running scripts until I > send another corresponding Ct

Block Ctrl+S while running Python script at Windows console?

2019-03-18 Thread Malcolm Greene
I'm running some Python 3.6 scripts at the Windows 10/Windows Server 2016 console. In my every day workflow, I seem to be accidentally sending Ctrl+S keystrokes to some of console sessions, pausing my running scripts until I send another corresponding Ctrl+S to un-pause the affected scripts. My

matplotlib.plot.show always blocks the execution of python script

2018-11-01 Thread lampahome
I want to plot a graph and *still run following code without closing the graph automatically like Matlab does*. I try plt.show(block=False) , it failed and appear in a small moment then close itself. I also try plt.draw() or interactive mode , it failed, too. plt.draw() will block until I close i

Re: Python script

2017-12-07 Thread breamoreboy
On Thursday, December 7, 2017 at 2:06:46 PM UTC, prvn...@gmail.com wrote: > Hi All, > I am new to python need help to write a script in python > my requirement is :- > write a python script to print sentence from a txt file to another txt file > > Regards, > Pra

Re: Python script

2017-12-07 Thread Joel Goldstick
On Thu, Dec 7, 2017 at 9:06 AM, wrote: > Hi All, > I am new to python need help to write a script in python > my requirement is :- > write a python script to print sentence from a txt file to another txt file > > Regards, > Praveen > -- > https://mail.python.org/m

Re: Python script

2017-12-07 Thread Christian Gollwitzer
Am 07.12.17 um 15:06 schrieb prvn.m...@gmail.com: Hi All, I am new to python need help to write a script in python my requirement is :- write a python script to print sentence from a txt file to another txt file txt = open("another.txt", "w") print("sentence f

Python script

2017-12-07 Thread prvn . mora
Hi All, I am new to python need help to write a script in python my requirement is :- write a python script to print sentence from a txt file to another txt file Regards, Praveen -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >