Re: When will os.remove fail?

2017-03-12 Thread Larry Martell
On Sun, Mar 12, 2017 at 1:48 PM, Steve D'Aprano wrote: > On Linux, if I call os.remove on a file which I own but don't have write > permission on, the file is still deleted: > > > py> f = open('/tmp/no-write', 'w') > py> os.path.exists('/tmp/no-write') > True > py> os.chmod('/tmp/no-write', 0) #

Re: Program Error Help - Python 3.1

2017-03-31 Thread Larry Martell
On Fri, Mar 31, 2017 at 4:16 PM <2019.cavanau...@fpsedu.org> wrote: > while answer8 != ("1") or answer8 != ("2"): This statement is always true. Think about it. > > -- https://mail.python.org/mailman/listinfo/python-list

Re: Two variable dictionary comprehension

2017-04-03 Thread Larry Martell
On Mon, Apr 3, 2017 at 8:24 PM Dennis Lee Bieber wrote: > On Mon, 3 Apr 2017 11:48:38 -0700, "Deborah Swanson" > declaimed the following: > > >But, if Larry Page and Sergey Brin could tinker around in their dorm > >rooms (or wherever they lived then) and they made the first Google (the > >first

external process not terminating

2017-04-12 Thread Larry Martell
I have an app (using 2.7) that processes requests. When a request of type "A" is received I need to start an external process. When a request of type "B" is received I need to check and see if that external process has completed or not and then do some stuff depending on if it has or not. The iss

Re: external process not terminating

2017-04-12 Thread Larry Martell
On Wed, Apr 12, 2017 at 10:51 AM, Dennis Lee Bieber wrote: > On Wed, 12 Apr 2017 09:51:12 -0400, Larry Martell > declaimed the following: > > >> >>Anyone know how I can get the external process to terminate when done? >> > > It has... You just have

Re: Goto Considered Harmful [was Re: Python and the need for speed]

2017-04-13 Thread Larry Martell
On Thu, Apr 13, 2017 at 2:09 PM, Rustom Mody wrote: > Or consider(!) Alan Kay's statement: "Arrogance in computer science is > measured > in nanodijktras" Completely unrelated but it reminded me about this bon mot about Niklaus Wirth: Europeans tend to pronounce his name properly, as Nih-klaus

getting memory usage of varaibles

2017-05-02 Thread Larry Martell
I have a script that consumes more and more memory as it runs. It has no globals and the large data structures go out of scope often so should be garbage collected. I've looked at the most likely suspects with sys.getsizeof and they are not growing in size. I did this: sum([sys.getsizeof(o) for o

Re: getting memory usage of varaibles

2017-05-02 Thread Larry Martell
On Tue, May 2, 2017 at 5:57 PM, Dan Stromberg wrote: > On Tue, May 2, 2017 at 12:53 PM, Larry Martell > wrote: >> I have a script that consumes more and more memory as it runs. It has >> no globals and the large data structures go out of scope often so >> should be

Re: getting memory usage of varaibles

2017-05-02 Thread Larry Martell
On Tue, May 2, 2017 at 7:01 PM, Erik wrote: > On 02/05/17 23:28, Larry Martell wrote: >>>> >>>> Anyone have any thoughts on how I can monitor the variables' memory >>>> usage as the script runs? >>> >>> >>> This is application

Re: getting memory usage of varaibles

2017-05-03 Thread Larry Martell
On Wed, May 3, 2017 at 12:57 AM, Chris Angelico wrote: > On Wed, May 3, 2017 at 5:53 AM, Larry Martell wrote: >> And I can see it getting larger and larger. But I want to see what it >> is that is causing this. My thought was to put all the objects in a >> dict with their s

Re: getting memory usage of varaibles

2017-05-03 Thread Larry Martell
On Wed, May 3, 2017 at 8:29 AM, Ned Batchelder wrote: > On Tuesday, May 2, 2017 at 11:49:37 PM UTC-4, larry@gmail.com wrote: >> On Tue, May 2, 2017 at 7:01 PM, Erik wrote: >> > On 02/05/17 23:28, Larry Martell wrote: >> >>>> >> >>>> Anyon

Re: getting memory usage of varaibles

2017-05-03 Thread Larry Martell
On Wed, May 3, 2017 at 8:29 AM, Chris Angelico wrote: > On Wed, May 3, 2017 at 10:12 PM, Larry Martell > wrote: >> On Wed, May 3, 2017 at 12:57 AM, Chris Angelico wrote: >>> On Wed, May 3, 2017 at 5:53 AM, Larry Martell >>> wrote: >>>> And I can se

Re: getting memory usage of varaibles

2017-05-03 Thread Larry Martell
On Wed, May 3, 2017 at 6:15 PM, Terry Reedy wrote: > On 5/3/2017 8:40 AM, Larry Martell wrote: >> >> On Wed, May 3, 2017 at 8:29 AM, Chris Angelico wrote: >>> >>> On Wed, May 3, 2017 at 10:12 PM, Larry Martell >>> wrote: >>>> >>&g

Re: How to install Python package from source on Windows

2017-05-20 Thread Larry Martell
On Sat, May 20, 2017 at 5:56 PM, bartc wrote: > I would say there are two types of people: those who care about the answer, > and those who don't. I say there are 10 types of people in this world. Those who understand binary and those who don’t. -- https://mail.python.org/mailman/listinfo/python

Re: Top Python Interview Questions

2017-05-26 Thread Larry Martell
On Fri, May 26, 2017 at 1:03 AM, Aarusha wrote: > PYTHON INTERVIEW QUESTIONS > > Mindmajix has compiled Python Interview questions which would benefit the > learners to attend the Python interviews. > > Q. How is Python executed? > > Python files are compiled to bytecode. which is then executed b

Re: converting Julian date to normal date

2017-06-05 Thread Larry Martell
On Mon, Jun 5, 2017 at 6:11 PM, sum abiut wrote: > i am using python,and django as my web framework. I use sqlalchemy to > connect to MSSQL data that is running Epicor database. Epicor is using > julian > > * date. How to you convert julian date to normal date* You cross posted this to the djan

Python program ends with 154 snakes dead; should it continue?

2017-06-06 Thread Larry Martell
I saw this headline and my first thought was what kind of program was this??? http://www.mypalmbeachpost.com/weather/new-python-program-ends-with-154-snakes-dead-should-continue/UtI3GeaBflGHEZzlfoHYgN/ We now return you to your regularly scheduled programming. -- https://mail.python.org/mailman/

Re: New to Python - Career question

2017-06-06 Thread Larry Martell
On Tue, Jun 6, 2017 at 5:39 PM, wrote: > New to Python and have been at it for about a month now. I'm doing well and > like it very much. Considering a career change down the road and have been > wondering... What are the job prospects for a middle age entry level > programmer. Just trying to

Re: New to Python - Career question

2017-06-06 Thread Larry Martell
On Tue, Jun 6, 2017 at 6:37 PM, Marko Rauhamaa wrote: > pta...@gmail.com: > >> New to Python and have been at it for about a month now. I'm doing >> well and like it very much. Considering a career change down the road >> and have been wondering... What are the job prospects for a middle age >> en

Re: New to Python - Career question

2017-06-14 Thread Larry Martell
On Sat, Jun 10, 2017 at 3:51 AM, Paul Rubin wrote: > Larry Martell writes: >> I can tell they think I am old and they dismiss me right away. > > http://oldgeekjobs.com ? Cool! Thanks! Sharing with all my old nerdy friends. -- https://mail.python.org/mailman/listinfo/python-list

sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
I am trying to use sqlite $ python2.7 Python 2.7.10 (default, Feb 22 2016, 12:13:36) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import _sqlite3 Traceback (most recent call last): File "", line 1, in ImportError: N

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 8:56 AM, Mark Summerfield via Python-list wrote: > On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com wrote: >> I am trying to use sqlite >> >> $ python2.7 >> Python 2.7.10 (default, Feb 22 2016, 12:13:36) >> [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 9:55 AM, Peter Otten <__pete...@web.de> wrote: > Larry Martell wrote: > >> On Thu, Jun 15, 2017 at 8:56 AM, Mark Summerfield via Python-list >> wrote: >>> On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com >>

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote: > Larry Martell wrote: > >>> On linux the system sqlite3 is used. >> >> I tried building and installing sqlite from source and that did not >> solve the problem. > > You misund

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 12:20 PM, Kushal Kumaran wrote: > Larry Martell writes: > >> On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote: >>> Larry Martell wrote: >>> >>>>> On linux the system sqlite3 is used. >>>&

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 1:44 PM, Kushal Kumaran wrote: > Your python was built without sqlite3 support. If your yum repo > provider is unable to rebuild with sqlite3, you can do so yourself. > Make sure the sqlite-devel package is installed so your python build > will use it. Decided to do this

Re: Developers Who Use Spaces Make More Money!

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 6:35 PM, Christopher Reimer wrote: >> On Jun 15, 2017, at 3:24 PM, jlada...@itu.edu wrote: >> >> This is hilarious, I have to share: >> >> https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/ >> >> Thanks to Guido for making us all richer! > > On

Re: What's with all of the Case Solution and Test Bank nonsense posts?

2017-07-10 Thread Larry Martell
On Sun, Jul 9, 2017 at 10:37 PM, wrote: > On Sunday, July 9, 2017 at 8:53:18 PM UTC-5, Steve D'Aprano wrote: >> On Mon, 10 Jul 2017 11:41 am, voteswithf...@gmail.com wrote: >> >> > On Sunday, July 9, 2017 at 7:59:45 PM UTC-5, timetowalk wrote: >> >> >> I will need to read about filtering messages

rpy2

2017-07-19 Thread Larry Martell
Anyone here any experience with the rpy2 package? I am having trouble getting it to install, and I have posted to the rpy mailing list, put a question on SO, and even emailed the author, but I have received no replies. Before I post details I wanted to see if anyone here can possibly help me. -- h

Re: rpy2

2017-07-19 Thread Larry Martell
p-build-eFwk3n/rpy2/ Also tried building from source and that failed with: gcc -pthread -shared build/temp.linux-x86_64-2.7/./rpy/rinterface/_rinterface.o -L/usr/local/lib64/R/lib -Lbuild/temp.linux-x86_64-2.7 -Wl,-R/usr/local/lib64/R/lib -lRblas -lgfortran -lm -lreadline -lpcre -llzma -lbz2 -lz -lrt

Re: rpy2

2017-07-19 Thread Larry Martell
On Wed, Jul 19, 2017 at 6:28 PM, Dennis Lee Bieber wrote: > On Wed, 19 Jul 2017 11:15:03 -0400, Larry Martell > declaimed the following: > >> >>/usr/bin/ld: cannot find -lr_utils >> >>But I could not find how to get libr_utils. >> > > Have you

Validating regexp

2017-08-08 Thread Larry Martell
Anyone have any code or know of any packages for validating a regexp? I have an app that allows users to enter regexps for db searching. When a user enters an invalid one (e.g. 'A|B|' is one I just saw) it causes downstream issues. I'd like to flag it at entry time. -- https://mail.python.org/mai

Re: Validating regexp

2017-08-08 Thread Larry Martell
On Tue, Aug 8, 2017 at 12:51 PM, Chris Angelico wrote: > On Wed, Aug 9, 2017 at 2:37 AM, Larry Martell wrote: >> Anyone have any code or know of any packages for validating a regexp? >> >> I have an app that allows users to enter regexps for db searching. >> When a

Re: Validating regexp

2017-08-08 Thread Larry Martell
On Tue, Aug 8, 2017 at 12:57 PM, Larry Martell wrote: > On Tue, Aug 8, 2017 at 12:51 PM, Chris Angelico wrote: >> On Wed, Aug 9, 2017 at 2:37 AM, Larry Martell >> wrote: >>> Anyone have any code or know of any packages for validating a regexp? >>> >>>

Re: Planning a Python Course for Beginners

2017-08-09 Thread Larry Martell
On Wed, Aug 9, 2017 at 8:00 AM, Marko Rauhamaa wrote: > Yeah, when there's a will, there's a way. My Dad used to say "Where there's a will, there's relatives." -- https://mail.python.org/mailman/listinfo/python-list

Re: Validating regexp

2017-08-09 Thread Larry Martell
On Wed, Aug 9, 2017 at 6:13 AM, Peter Heitzer wrote: > Larry Martell wrote: >>On Tue, Aug 8, 2017 at 12:51 PM, Chris Angelico wrote: >>> On Wed, Aug 9, 2017 at 2:37 AM, Larry Martell >>> wrote: >>>> Anyone have any code or know of any packages for valid

Re: Validating regexp

2017-08-10 Thread Larry Martell
On Wed, Aug 9, 2017 at 8:33 PM, Cameron Simpson wrote: > On 09Aug2017 10:46, Jon Ribbens wrote: >> >> On 2017-08-09, Cameron Simpson wrote: >>> >>> On 08Aug2017 17:31, Jon Ribbens wrote: ... but bear in mind, there have been ways of doing denial-of-service attacks with valid-but-

Re: Validating regexp

2017-08-10 Thread Larry Martell
On Thu, Aug 10, 2017 at 11:42 AM, alister via Python-list wrote: > On Thu, 10 Aug 2017 09:38:49 -0400, Larry Martell wrote: > >> On Wed, Aug 9, 2017 at 8:33 PM, Cameron Simpson wrote: >>> On 09Aug2017 10:46, Jon Ribbens wrote: >>>> >>>> On 2017-

cpython version

2017-08-12 Thread Larry Martell
For the first time in my 30+ year career I am, unfortunately, working on Windows. A package I need, rpy2, comes in various flavors for different cpython versions: rpy2‑2.7.8‑cp27‑none‑win32.whl rpy2‑2.7.8‑cp27‑none‑win_amd64.whl rpy2‑2.7.8‑cp34‑none‑win32.whl rpy2‑2.7.8‑cp34‑none‑win_amd64.whl rp

Re: cpython version

2017-08-12 Thread Larry Martell
On Sat, Aug 12, 2017 at 8:22 AM, Larry Martell wrote: > For the first time in my 30+ year career I am, unfortunately, working > on Windows. A package I need, rpy2, comes in various flavors for > different cpython versions: > > rpy2‑2.7.8‑cp27‑none‑win32.whl > rpy2‑2.7.8‑cp27‑

Re: cpython version

2017-08-12 Thread Larry Martell
On Sat, Aug 12, 2017 at 10:09 AM, Chris Angelico wrote: > On Sat, Aug 12, 2017 at 10:24 PM, Larry Martell > wrote: >> On Sat, Aug 12, 2017 at 8:22 AM, Larry Martell >> wrote: >>> For the first time in my 30+ year career I am, unfortunately, working >>>

Re: wrote a commodore-64 emulator using just Python

2017-08-13 Thread Larry Martell
On Sun, Aug 13, 2017 at 9:50 AM, Irmen de Jong wrote: > Hi, > > As another experiment with using just tkinter for graphics, this time I > created a > Commodore-64 emulator. You can find it here https://github.com/irmen/pyc64 > You only need the pillow library to be able to run this. I guess most

Re: wrote a commodore-64 emulator using just Python

2017-08-13 Thread Larry Martell
On Sun, Aug 13, 2017 at 9:50 AM, Irmen de Jong wrote: > Hi, > > As another experiment with using just tkinter for graphics, this time I > created a > Commodore-64 emulator. You can find it here https://github.com/irmen/pyc64 > You only need the pillow library to be able to run this. I guess most

Re: cpython version

2017-08-14 Thread Larry Martell
On Sun, Aug 13, 2017 at 10:59 PM, Gilmeh Serda wrote: > On Sat, 12 Aug 2017 10:24:06 -0400, Larry Martell wrote: > >> now I have prospective client that refuses to run linux, even in a VM. >> So I am tying to get my app running on Windows Server 2016, piece by >> painf

Re: Reading the documentation

2017-08-24 Thread Larry Martell
On Thu, Aug 24, 2017 at 9:21 PM Rustom Mody wrote: > Statement 1: Aeroplanes fly > Statement 2: Submarines swim > > > Are these two statements equally acceptable? > > [Inspired by a talk by Noam Chomsky] There should be a corollary of Godwin's law for that idiot. -- https://mail.python.org/mail

Re: Reading the documentation

2017-08-24 Thread Larry Martell
On Thu, Aug 24, 2017 at 11:08 PM, Rustom Mody wrote: > On Friday, August 25, 2017 at 8:28:55 AM UTC+5:30, Ian wrote: >> On Aug 24, 2017 8:51 PM, "Larry Martell" wrote: >> >> On Thu, Aug 24, 2017 at 9:21 PM Rustom Mody wrote: >> >> > Statement 1: Ae

Re: Reading the documentation

2017-08-24 Thread Larry Martell
On Thu, Aug 24, 2017 at 11:27 PM, Rustom Mody wrote: > Chomsky is in the Turing bracket, I wonder where Larry falls wrt CS I have a degree in Software Engineering from Rochester Institute of Technology. I stared programming when I was 16, and I have worked professionally since I was 19. I am 57 n

pip-sync

2023-07-21 Thread Larry Martell via Python-list
I am trying to set up and maintain a venv with pip-sync. On my bare metal I have the apparmor python package installed, but it is not installed in my venv and it's not in my requirements file. When I run pip-sync I get: Found existing installation: apparmor 2.13.3 ERROR: Cannot uninstall 'apparmor

Re: pip-sync

2023-07-24 Thread Larry Martell via Python-list
On Fri, Jul 21, 2023 at 11:08 AM Larry Martell wrote: > > I am trying to set up and maintain a venv with pip-sync. On my bare > metal I have the apparmor python package installed, but it is not > installed in my venv and it's not in my requirements file. When I run > pip-s

Re: Why do I always get an exception raised in this __init__()?

2023-08-31 Thread Larry Martell via Python-list
On Thu, Aug 31, 2023 at 3:19 PM Chris Green via Python-list wrote: > > I'm obviously doing something very silly here but at the moment I > can't see what. > > Here's the code:- > > #!/usr/bin/python3 > # > # > # GPIO > # > import gpiod > # > # > # Simple wrapper

path to python in venv

2023-09-27 Thread Larry Martell via Python-list
I was under the impression that in a venv the python used would be in the venv's bin dir. But in my venvs I see this in the bin dirs: lrwxrwxrwx 1 larrymartell larrymartell7 Sep 27 11:21 python -> python3 lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 -> /usr/bin/python3 Goo

Re: path to python in venv

2023-09-27 Thread Larry Martell via Python-list
On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list wrote: > > On 2023-09-27, Larry Martell wrote: > > I was under the impression that in a venv the python used would be in > > the venv's bin dir. But in my venvs I see this in the bin dirs: > > > > lrw

Re: path to python in venv

2023-09-27 Thread Larry Martell via Python-list
On Wed, Sep 27, 2023 at 12:53 PM Niktar Lirik wrote: > > Hi Larry, > > You could just create venv with option '—copies' > > > > For example: > > python -m venv -–copies .venv Thanks! That is just what I was looking for. > From: Larry Martell via Py

Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
I have a python script, and from that I want to run another script in a subprocess in a venv. What is the best way to do that? I could write a file that activates the venv then runs the script, then run that file, but that seems messy. Is there a better way? -- https://mail.python.org/mailman/list

Re: Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
On Sat, Oct 21, 2023 at 9:49 AM Johannes Findeisen wrote: > > On Sat, 21 Oct 2023 09:01:18 -0400 > Larry Martell via Python-list wrote: > > > I have a python script, and from that I want to run another script in > > a subprocess in a venv. What is the best way to do t

Re: Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
On Sat, Oct 21, 2023 at 12:10 PM Johannes Findeisen wrote: > > On Sat, 21 Oct 2023 11:32:03 -0400 > Larry Martell wrote: > > > On Sat, Oct 21, 2023 at 9:49 AM Johannes Findeisen > > wrote: > > > > > > On Sat, 21 Oct 2023 09:01:18 -0400 > > > La

Re: Extract lines from file, add to new files

2024-01-30 Thread Larry Martell via Python-list
On Tue, Jan 30, 2024 at 1:13 AM AVI GROSS via Python-list wrote: > > It can be quite frustrating figuring out what someone wants, Grant, > especially when they just change it. > > It is worse when instead of starting a new thread with an appropriate > subject line, it continues and old one that wa

Re: Version of NymPy

2024-05-15 Thread Larry Martell via Python-list
On Wed, May 15, 2024 at 2:43 PM Popov, Dmitry Yu via Python-list wrote: > > What would be the easiest way to learn which version of NumPy I have with my > Anaconda distribution? >>> import numpy >>> numpy.__version__ '1.24.4' -- https://mail.python.org/mailman/listinfo/python-list

PyCon

2024-05-17 Thread Larry Martell via Python-list
I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! -- https://mail.python.org/mailman/listinfo/python-list

Re: PyCon

2024-05-17 Thread Larry Martell via Python-list
LOn Fri, May 17, 2024 at 8:57 PM Larry Martell wrote: > I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! s/haven’t/having/ -- https://mail.python.org/mailman/listinfo/python-list

Serializing pydantic enums

2024-05-28 Thread Larry Martell via Python-list
Just getting started with pydantic. I have this example code: class FinishReason(Enum): stop = 'stop' class Choice(BaseModel): finish_reason: FinishReason = Field(...) But I cannot serialize this: json.dumps(Choice(finish_reason=FinishReason.stop).dict()) *** TypeError: Object of type

Re: Serializing pydantic enums

2024-05-29 Thread Larry Martell via Python-list
Yeah, I know I can do this, but I seem to recall reading that pydantic handled serialization. Guess not. > On Tue, May 28, 2024 at 2:50 PM Larry Martell via Python-list > wrote: > > > > Just getting started with pydantic. I have this example code: > > > > class

Re: Serializing pydantic enums

2024-05-29 Thread Larry Martell via Python-list
On Wed, May 29, 2024 at 12:27 PM Larry Martell wrote: > > On Tue, May 28, 2024 at 11:46 AM Left Right via Python-list > wrote: > > > > Most Python objects aren't serializable into JSON. Pydantic isn't > > special in this sense. > > > > What ca

Re: From JoyceUlysses.txt -- words occurring exactly once

2024-06-08 Thread Larry Martell via Python-list
On Sat, Jun 8, 2024 at 10:39 AM Mats Wichmann via Python-list < python-list@python.org> wrote: > On 6/5/24 05:10, Thomas Passin via Python-list wrote: > > > Of course, we see this lack of clarity all the time in questions to the > > list. I often wonder how these askers can possibly come up with

PyCon

2025-05-12 Thread Larry Martell via Python-list
Anyone going to PyCon? I'll be there, getting in Tuesday night. -- https://mail.python.org/mailman/listinfo/python-list

Trailer for upcoming Python documentary

2025-05-18 Thread Larry Martell via Python-list
https://youtu.be/pqBqdNIPrbo?si=P2ukSXnDj3qy3HBJ -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5