Re: MERGE SQL in cx_Oracle executemany

2020-10-17 Thread Mladen Gogala via Python-list
On Sat, 17 Oct 2020 21:23:40 -0600, Jason Friedman wrote: >> I'm looking to insert values into an oracle table (my_table) using the >> query below. The insert query works when the PROJECT is not NULL/empty >> (""). However when PROJECT is an empty string(''), the query creates a >> new duplicate

Re: MERGE SQL in cx_Oracle executemany

2020-10-17 Thread Jason Friedman
> > I'm looking to insert values into an oracle table (my_table) using the > query below. The insert query works when the PROJECT is not NULL/empty > (""). However when PROJECT is an empty string(''), the query creates a new > duplicate row every time the code is executed (with project value > popu

Re: Embedding version in command-line program

2020-10-17 Thread Tony Flury via Python-list
On 07/10/2020 12:06, Loris Bennett wrote: Hi, I have written a program, which I can run on the command-line thus mypyprog --version and the get the version, which is currently derived from a variable in the main module file. However, I also have the version in an __init__.py file and in

Re: File Name issue

2020-10-17 Thread shrimp_banana
On 10/17/20 4:12 PM, Steve wrote: > The line: > with open("HOURLYLOG.txt", 'r') as infile: > works but, when I rename the file, the line: > with open("HOURLY-LOG.txt", 'r') as infile: > does not. The complaint is: Cannot Assign to operator > > However, I have: > BPM_O2s=open("BPM-O2-Readings.txt"

Re: Subprocess Connection Error

2020-10-17 Thread Greg Ewing
On 17/10/20 4:04 pm, Dave Dungan wrote: One more thing, the book says to save it as "types.py". Which is probably a bad thing to do, because there is a built-in module called "types" that this will shadow. If IDLE happens to use that module, bad things could happen. Have you tried using a diff

Re: File Name issue

2020-10-17 Thread Mladen Gogala via Python-list
On Sat, 17 Oct 2020 22:51:11 +, Mladen Gogala wrote: > On Sat, 17 Oct 2020 18:12:16 -0400, Steve wrote: > >> with open("HOURLYLOG.txt", 'r') as infile: >> works but, when I rename the file, the line: >> with open("HOURLY-LOG.txt", 'r') as infile: >> does not. The complaint is: Cannot Assign

Re: File Name issue

2020-10-17 Thread MRAB
On 2020-10-17 23:12, Steve wrote: The line: with open("HOURLYLOG.txt", 'r') as infile: works but, when I rename the file, the line: with open("HOURLY-LOG.txt", 'r') as infile: does not. The complaint is: Cannot Assign to operator However, I have: BPM_O2s=open("BPM-O2-Readings.txt","a") And it w

Re: File Name issue

2020-10-17 Thread Mladen Gogala via Python-list
On Sat, 17 Oct 2020 18:12:16 -0400, Steve wrote: > with open("HOURLYLOG.txt", 'r') as infile: > works but, when I rename the file, the line: > with open("HOURLY-LOG.txt", 'r') as infile: > does not. The complaint is: Cannot Assign to operator Try this: with open("HOURLY\-LOG.txt", 'r') as infil

Re: Subprocess Connection Error

2020-10-17 Thread Terry Reedy
On 10/17/2020 5:00 PM, Dan Stromberg wrote: Does this help? https://stackoverflow.com/questions/29567051/python-error-idles-subprocess-didnt-make-connection-either-idle-cant-start I believe I included every legitimate answer on stackoverflow, including that post, in the doc section linked bel

File Name issue

2020-10-17 Thread Steve
The line: with open("HOURLYLOG.txt", 'r') as infile: works but, when I rename the file, the line: with open("HOURLY-LOG.txt", 'r') as infile: does not. The complaint is: Cannot Assign to operator However, I have: BPM_O2s=open("BPM-O2-Readings.txt","a") And it works. At first, I thought the issue

Re: Simple question - end a raw string with a single backslash ?

2020-10-17 Thread Mladen Gogala via Python-list
On Thu, 15 Oct 2020 21:30:15 +, Stefan Ram wrote: > Tony Flury writes: >> >>> a = r'end' + chr(92) > > Or maybe, > > a = r''' > end\ > '''[ 1: -1 ] > > ? The first and the last line are messy, but in the middle, > the intended string is clearly visible. You can use perl module for

Re: Subprocess Connection Error

2020-10-17 Thread Dan Stromberg
Does this help? https://stackoverflow.com/questions/29567051/python-error-idles-subprocess-didnt-make-connection-either-idle-cant-start On Sat, Oct 17, 2020 at 12:44 PM Dave Dungan via Python-list < python-list@python.org> wrote: > Hello, > > I bought a book called Coding for Beginners to learn

Subprocess Connection Error

2020-10-17 Thread Dave Dungan via Python-list
Hello, I bought a book called Coding for Beginners to learn how to code using Python. The first few exercises went fine. When I got to the page called Recognizing types and did the exercise and saved it and tried to run the module it comes up with a Subprocess Connection Error. It says, "IDLE's

Re: python unistallation

2020-10-17 Thread MRAB
On 2020-10-17 18:39, Aniruddha Ghosh wrote: I by chance deleted the python 3.9 files from my file explorer and now while unistalling it is showing fatal error . I cant uninstall it . please anyone help. Have you tried using the installer to repair it first? -- https://mail.python.org/mailman/

python unistallation

2020-10-17 Thread Aniruddha Ghosh
I by chance deleted the python 3.9 files from my file explorer and now while unistalling it is showing fatal error . I cant uninstall it . please anyone help. -- https://mail.python.org/mailman/listinfo/python-list