How to instlal pyodbc, without pip

2020-02-04 Thread dcwhatthe
Hi, Pip won't work on my desktop, because of the firewalls we have set up. I have the version from github. Assuming my Python 3.8.1 Home Directory is C:\Python, How can I install pyodbc pyodbc-master.zip? Which folders should I unzip it into? Regards, -- https://mail.python.org/mailma

Re: How to instlal pyodbc, without pip

2020-02-05 Thread dcwhatthe
On Tuesday, February 4, 2020 at 8:53:10 PM UTC-5, Souvik Dutta wrote: > You might use chocolatey if you like. > > On Tue, 4 Feb, 2020, 11:05 pm , dcwhatthe wrote: > > > Hi, > > > > Pip won't work on my desktop, because of the firewalls we have set up. >

How come logging.error writes to a file, but not logging.debug or logging.info?

2020-03-26 Thread dcwhatthe
Hi, When we run logging.basicConfig( filename = "TestLogging_" + datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + ".log" ) , and then logging.error( "Test01\n" ) logging.debug("Test02\n") logging.info("Test03\n") logging.error( "Test04\n" )

Re: How come logging.error writes to a file, but not logging.debug or loggi

2020-03-27 Thread dcwhatthe
On Friday, March 27, 2020 at 3:15:50 PM UTC-4, dcwhatthe wrote: > Hi, > > > When we run > > > logging.basicConfig( filename = "TestLogging_" + > datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + ".log" ) > > > , and then &

How to cover connection exception errors, and exit

2020-03-28 Thread dcwhatthe
Hi, I've tried urllib, requests, and some other options. But I haven't found a way to trap certain urls that aren't possible to connect from, outside the office. In those cases, I need to just output an error. So, the following code will cover the 404s and similar errors for most of the pro

how to specify trusted hosts in windows config file

2020-03-30 Thread dcwhatthe
Hi, I'm able to get past the CERTIFICATE_VERIFY_FAILED error with various packages by specifying trusted host on the command line. But I can't seem to upgrade pip itself. I keep getting the message "You are using pip version 19.2.3, however 20.0.2 is available." But none of the commands o

Re: how to specify trusted hosts in windows config file

2020-03-30 Thread dcwhatthe
On Monday, March 30, 2020 at 12:09:48 PM UTC-4, MRAB wrote: > On 2020-03-30 16:25, dcwhatthe wrote: > > Hi, > > > > I'm able to get past the > > > > CERTIFICATE_VERIFY_FAILED > > > > > > error with various packages by specifying trusted

Re: how to specify trusted hosts in windows config file

2020-03-30 Thread dcwhatthe
On Monday, March 30, 2020 at 12:08:54 PM UTC-4, Chris Angelico wrote: > On Tue, Mar 31, 2020 at 2:31 AM wrote: > > > > Hi, > > > > I'm able to get past the > > > > CERTIFICATE_VERIFY_FAILED > > > > > > error with various packages by specifying trusted host on the command line. > > > > > > But I can

Re: how to specify trusted hosts in windows config file

2020-03-30 Thread dcwhatthe
These are some of the command lines I've typed, and the results. It looks like it's going to https://pypi.org. I have no idea whether that's correct, or not. I'm able to get past the Certificate error with other packages like requests. But I just can't update pip. : [C:\TCMD25]python -m pi

Re: how to specify trusted hosts in windows config file

2020-03-30 Thread dcwhatthe
On Monday, March 30, 2020 at 2:49:55 PM UTC-4, Chris Angelico wrote: > On Tue, Mar 31, 2020 at 5:46 AM dc wrote: > > > > These are some of the command lines I've typed, and the results. It looks > > like it's going to https://pypi.org. > > > > I have no idea whether that's correct, or not. > > >

Re: how to specify trusted hosts in windows config file

2020-03-31 Thread dcwhatthe
On Monday, March 30, 2020 at 5:36:00 PM UTC-4, Chris Angelico wrote: > On Tue, Mar 31, 2020 at 8:21 AM wrote: > > > > On Monday, March 30, 2020 at 2:49:55 PM UTC-4, Chris Angelico wrote: > > > On Tue, Mar 31, 2020 at 5:46 AM dc wrote: > > > > > > > > These are some of the command lines I've typed,

Re: how to specify trusted hosts in windows config file

2020-03-31 Thread dcwhatthe
On Tuesday, March 31, 2020 at 5:48:50 AM UTC-4, dcwh...@gmail.com wrote: > On Monday, March 30, 2020 at 5:36:00 PM UTC-4, Chris Angelico wrote: > > On Tue, Mar 31, 2020 at 8:21 AM wrote: > > > > > > On Monday, March 30, 2020 at 2:49:55 PM UTC-4, Chris Angelico wrote: > > > > On Tue, Mar 31, 2020 a

Re: how to specify trusted hosts in windows config file

2020-03-31 Thread dcwhatthe
I don't have control over this, Chris. This is at my office. I'm not the resource who manages network or other settings. And we have various anti-spyware in place, that at leasts mitigates the risk. What I'm doing isn't unprecedented. People get false positives all the time on the web, and

Re: how to specify trusted hosts in windows config file

2020-04-05 Thread dcwhatthe
addresses you got were also Fastly addresses: > > | pypi.org. 86278 IN A 151.101.192.223 | pypi.org. 86278 IN A 151.101.64.223 > | > pypi.org. 86278 IN A 151.101.128.223 | pypi.org. 86278 IN A 151.101.0.223 > > And in fact the address dcwhatthe gets (151.101.128.223) is one

What variable type is returned from Open()?

2020-04-15 Thread dcwhatthe
Hi, As much as possible, I make use of optional type hints. So if I know a function returns an integer, then I use this_number_i : int = GetThisNumber() But there's no 'file' type, so I'm not sure what to use as the type for the return value of an Open() function. config_file : file = op

Re: What variable type is returned from Open()?

2020-04-15 Thread dcwhatthe
On Wednesday, April 15, 2020 at 10:10:31 AM UTC-4, Souvik Dutta wrote: > _io.TextIOWrapper > > On Wed, 15 Apr, 2020, 7:30 pm , wrote: > > > Hi, > > > > > > As much as possible, I make use of optional type hints. So if I know a > > function returns an integer, then I use > > > > > > this_number_

Re: What variable type is returned from Open()?

2020-04-15 Thread dcwhatthe
On Wednesday, April 15, 2020 at 1:09:26 PM UTC-4, Souvik Dutta wrote: > Yes that is the type. You can try using a print(type()) to > verify that. > > Souvik flutter dev > > On Wed, Apr 15, 2020, 9:45 PM wrote: > > > On Wednesday, April 15, 2020 at 10:10:31 AM UTC-4, Souvik Dutta wrote: > > > _i

Re: What variable type is returned from Open()?

2020-04-15 Thread dcwhatthe
On Wednesday, April 15, 2020 at 5:28:55 PM UTC-4, Random832 wrote: > On Wed, Apr 15, 2020, at 12:11, dcwhatthe wrote: > > So you're saying this is a type _io.TextIOWrapper? This type doesn't > > show up, on the hint listbox (I'm using Wing IDE). So if I type >

Re: What variable type is returned from Open()?

2020-04-16 Thread dcwhatthe
On Wednesday, April 15, 2020 at 9:46:30 PM UTC-4, Michael Torrie wrote: > On 4/15/20 5:47 PM, dcwh wrote: > > So in the case of Python, whenever the type information is available, > > I want to make it explicit rather than inferred. Whether the A.I. is > > running a simulation of the software in a

Re: What variable type is returned from Open()?

2020-04-16 Thread dcwhatthe
On Thursday, April 16, 2020 at 12:09:44 PM UTC-4, Souvik Dutta wrote: > What are you making? > > Souvik flutter dev > > On Thu, Apr 16, 2020, 9:10 PM wrote: > > > On Wednesday, April 15, 2020 at 9:46:30 PM UTC-4, Michael Torrie wrote: > > > On 4/15/20 5:47 PM, dcwh wrote: > > > > So in the case

Re: What variable type is returned from Open()?

2020-04-16 Thread dcwhatthe
On Thursday, April 16, 2020 at 12:12:23 PM UTC-4, Richard Damon wrote: > On 4/15/20 9:55 AM, dcw wrote: > > Hi, > > > > > > As much as possible, I make use of optional type hints. So if I know a > > function returns an integer, then I use > > > > > > this_number_i : int = GetThisNumber() > > > >

Re: What variable type is returned from Open()?

2020-04-16 Thread dcwhatthe
On Thursday, April 16, 2020 at 2:37:42 PM UTC-4, Chris Angelico wrote: > On Fri, Apr 17, 2020 at 2:13 AM Richard Damon wrote: > > I get the answer: > > > > So that is the name of the type that is returned, at least for that > > call. One key thing to note is that it begins with a _, so that type

Re: What variable type is returned from Open()?

2020-04-17 Thread dcwhatthe
Yes,personal preference is definitely a factor and a bias, in these matters. But aside from trying to make it easier for future A.I. to figure out what the heck we humans were doing, it also makes a difference in how the IDE interpets the code. Maybe it isn't true for all IDE's or all languages

Re: What variable type is returned from Open()?

2020-04-17 Thread dcwhatthe
On Friday, April 17, 2020 at 2:11:17 PM UTC-4, Rhodri James wrote: > On 17/04/2020 17:18, dc wrote: > > Maybe it isn't true for all IDE's or all languages. (I know SOMEONE > > will interject here, to argue for the sake of arguing). But when I > > worked with Groovy in Intellij about 5 years ago, th

Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-20 Thread dcwhatthe
I'm validating several sites in a row, and most of them connect successfully. However, one of them immediately returns a 401. I'm using the exact same credentials to check this site, as when loggin in. Also, interestingly, it returns the 401 right away. I tried setting the timeout value for

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-20 Thread dcwhatthe
On Monday, April 20, 2020 at 3:18:59 PM UTC-4, Eli the Bearded wrote: > In comp.lang.python, dc wrote: > > However, one of them immediately returns a 401. I'm using the exact > > same credentials to check this site, as when loggin in. > > > > Also, interestingly, it returns the 401 right away.

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-20 Thread dcwhatthe
On Monday, April 20, 2020 at 3:56:46 PM UTC-4, dcwh...@gmail.com wrote: > On Monday, April 20, 2020 at 3:18:59 PM UTC-4, Eli the Bearded wrote: > > In comp.lang.python, dc wrote: > > > However, one of them immediately returns a 401. I'm using the exact > > > same credentials to check this site, a

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-20 Thread dcwhatthe
On Monday, April 20, 2020 at 5:02:23 PM UTC-4, Eli the Bearded wrote: > In comp.lang.python, dc wrote, in reply to me: > > "What do you think it is doing?" > > I thought the timeout was waiting for a successful connection. > > A successful *connection* and a successful *authentication* are > diff

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-21 Thread dcwhatthe
On Tuesday, April 21, 2020 at 12:40:25 PM UTC-4, Dieter Maurer wrote: > dc wrote at 2020-4-20 14:48 -0700: > > ... > >I tried telneting the landing page, i.e. without the specific node that > >requires the login. So e.g. > > > >Telnet thissite.oh.gov 80 > > > >, but it returns a 400 Bad Request.

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-21 Thread dcwhatthe
On Tuesday, April 21, 2020 at 3:16:51 PM UTC-4, Barry Scott wrote: > > On 21 Apr 2020, at 18:11, dc wrote: > > > > On Tuesday, April 21, 2020 at 12:40:25 PM UTC-4, Dieter Maurer wrote: > >> dc wrote at 2020-4-20 14:48 -0700: > >>> ... > >>> I tried telneting the landing page, i.e. without the spec

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-21 Thread dcwhatthe
On Tuesday, April 21, 2020 at 4:25:54 PM UTC-4, Barry Scott wrote: > > On 21 Apr 2020, at 20:47, dc wrote: > > > > On Tuesday, April 21, 2020 at 3:16:51 PM UTC-4, Barry Scott wrote: > >>> On 21 Apr 2020, at 18:11, dc wrote: > >>> > >>> On Tuesday, April 21, 2020 at 12:40:25 PM UTC-4, Dieter Maure

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-21 Thread dcwhatthe
On Tuesday, April 21, 2020 at 4:38:52 PM UTC-4, Chris Angelico wrote: > On Wed, Apr 22, 2020 at 6:30 AM Barry Scott barr wrote: > > > > > > > > > On 21 Apr 2020, at 20:47, dc wrote: > > > > > > On Tuesday, April 21, 2020 at 3:16:51 PM UTC-4, Barry Scott wrote: > > >>> On 21 Apr 2020, at 18:11, dc w