sqlite & python 2.5

2006-10-13 Thread Joseph
stinct strftime('%Y',postdate) from ton_posts", "select distinct strftime('%m',postdate) from ton_posts", 'select catid from ton_category') Is there anyway I can find out the sql that gets executed (after the varible substitution)? Also can anyo

Import Error

2006-10-27 Thread Joseph
w an error that there is no module called Sprite. I delete the .pyc file, call a page in the main folder, then it will work. Any help how I can resolve it? Thank you in advance, Joseph -- http://mail.python.org/mailman/listinfo/python-list

Import Error

2006-10-27 Thread Joseph
w an error that there is no module called Sprite. I delete the .pyc file, call a page in the main folder, then it will work. Any help how I can resolve it? Thank you in advance, Joseph -- http://mail.python.org/mailman/listinfo/python-list

Import Error

2006-10-27 Thread Joseph
w an error that there is no module called Sprite. I delete the .pyc file, call a page in the main folder, then it will work. Any help how I can resolve it? Thanks in advance, Joseph -- http://mail.python.org/mailman/listinfo/python-list

Web queries in Python

2006-09-04 Thread Joseph
Hi, Excel uses web queries to read data (like financial/weather data) from web. How to do the same in python? Even pointers to such would be of help. Thank you, Joseph -- http://mail.python.org/mailman/listinfo/python-list

real time info to web browser from apache side ?

2006-05-23 Thread Joseph
I know about writing CGI application using Perl and Apache to refresh a static webpage that displays on the browser. But now i have an application requirement that I hope someone can help me. The server side sits in another room down the factory plant, its monitoring some hardware environment, na

adding python libraries (for shared hosting)

2008-08-10 Thread Joseph
Hi all, My shared host provides python 2.3. Since it is a shared hosting, he is not willing to upgrade to a newer version. I am looking for option to upload 2.5 on my own. Is this possible and if so, can anyone please provide a pointer to how this can be achieved? Thank you, Joseph http

ISBN Barecode reader in Python?

2008-05-04 Thread Joseph
ke to spend money on the SDK. Thank you all for your suggestions/time, Joseph http://www.jjude.com -- http://mail.python.org/mailman/listinfo/python-list

formatted output

2013-05-07 Thread Sudheer Joseph
Dear members, I need to print few arrays in a tabular form for example below array IL has 25 elements, is there an easy way to print this as 5x5 comma separated table? in python IL=[] for i in np.arange(1,bno+1): IL.append(i) print(IL) %

netcdF4 variables

2013-05-31 Thread Sudheer Joseph
Dear members, I have been using python NetcdF for some time. I understand that we can get variables from a netcdf one by one by using temp=ncf.variable['temp'][:] but is there a way to get a list of variables with out the rest of the stuff as seen below? some hing like a list

Re: netcdF4 variables

2013-06-01 Thread Sudheer Joseph
Thank you very much it works for me. with best regards, Sudheer On Saturday, June 1, 2013 12:51:01 PM UTC+5:30, Andreas Perstinger wrote: > On 01.06.2013 05:30, Sudheer Joseph wrote: > > > some hing like a list > > > xx=nc,variables[:] > > > should get me all

python netcdf

2013-06-05 Thread Sudheer Joseph
Dear Members, Is there a way to get the time:origin attribute from a netcdf file as string using the Python netcdf? with best regards, Sudheer -- http://mail.python.org/mailman/listinfo/python-list

Re: python netcdf

2013-06-05 Thread Sudheer Joseph
Thank you very much Jason With best regards Sudheer On Thursday, June 6, 2013, Jason Swails wrote: > > > > On Wed, Jun 5, 2013 at 9:07 PM, Sudheer Joseph > > > wrote: > >> Dear Members, >> Is there a way to get the time:origin attribute f

RE: Homework help requested (not what you think!)

2013-07-18 Thread Joseph Clark
f Roman names and it will give you fake names that sound Roman. // joseph w. clark , phd , visiting research associate \\ university of nebraska at omaha - college of IS&T > Date: Tue, 16 Jul 2013 15:43:45 -0700 > Subject: Homework help

RE: Homework help requested, thanks to everyone.

2013-07-21 Thread Joseph Clark
al dependencies. // joseph w. clark , phd , visiting research associate \\ university of nebraska at omaha - college of IS&T > Date: Sun, 21 Jul 2013 13:49:40 -0700 > Subject: Homework help requested, thanks to everyone. > From: john_lada...@sbcglobal.net > To: python-list@python.org &g

PEP 20 - Silly Question?

2011-09-06 Thread Joseph Armbruster
I noticed that it says only 19 of 20 have been written down. Which one was not written down? Thank You, Joseph Armbruster -- http://mail.python.org/mailman/listinfo/python-list

Learn Python the Hardway exercise 11 question 4

2011-03-30 Thread Joseph Sanoyo
print "How old are you?", age = raw_input() print "How tall are you?", height = raw_input() print "How much do you weigh?", weight = raw_input() print "So, you're %r old, %r tall and %r heavy." % ( age, height, weight) Note: Notice that we put a , (comma) at the end of each print line. This is so t

Amazon Simple Queue Service Worker

2011-04-06 Thread Joseph Ziegler
Hi all, Little new to the python world, please excuse the Noobness. We are writing a server which will subscribe to the Amazon Simple Queue Service. I am looking for a good service container. I saw Twisted and Zope out there. It's going to be a server which polls on a queue via the Boto api. D

Re: Amazon Simple Queue Service Worker

2011-04-08 Thread Joseph Ziegler
Thanks! On 7 April 2011 10:13, Joseph Ziegler wrote: > Hi all, > > Little new to the python world, please excuse the Noobness. > > We are writing a server which will subscribe to the Amazon Simple Queue > Service. I am looking for a good service container. I saw Twisted an

RE: lambda issues

2022-04-20 Thread Schachner, Joseph
Re: "...which takes a callable (the lambda here)" Python lamdas have some severe restrictions. In any place that takes a callable, if a lambda can't serve, just use def to write a function and use the function name. Joseph S. Teledyne Confidential; Commercially Sensitiv

RE: Python/New/Learn

2022-05-05 Thread Schachner, Joseph
Buy the book "Python 101" and do the examples. When you're done with that buy the book "Python 201" and study it. There is much more than is in both those books that you could learn about Python, but that's a very good way to start. --- Joseph S. Teled

Re: Problem when scraping the 100 Movie titles.

2022-09-22 Thread Fabian Joseph
#Try using, it's save in json format of the website: import json import requests from bs4 import BeautifulSoup url = "https://www.empireonline.com/movies/features/best-movies-2/"; soup = BeautifulSoup(requests.get(url).content, "html.parser") data = json.loads(soup.select_one("#__NEXT_DATA__").

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread joseph pareti
t; @classmethod > > def get_person(self, employee): > > print (employee['name']) > > > > return PERSONDatabase(employee['created_at'], > > employee['id'], > >

RE: IDE tools to debug in Python?

2021-02-05 Thread Schachner, Joseph
Indeed there are many. One I have not seen listed here yet, that is quite light, starts quickly, but does have good debugging capability is PyScripter. Completely free, downloadable from SourceForge, 32 or 64 bit versions (must match your Python type). --- Joseph S. Teledyne Confidential

RE: Python cannot count apparently

2021-02-08 Thread Schachner, Joseph
str to ch each time, each iteration gets the next character. To prevent each character from appearing on a separate line (in Python 3) you need end="". That is, don't put in the usual end-of-line ending. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data

RE: .title() - annoying mistake

2021-03-19 Thread Schachner, Joseph
;. Someone who looks into this should check if the second part of a hyphenated expression needs to be capitalized. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Abdur-Rahmaan Janhangeer Sent: Friday, March 19, 2021 11:02

HELP Please, Python Program Help

2021-04-10 Thread Joseph Roffey
Hi, Im looking for some help with my program, I have been set a task to make a Strain Calculator. I need it to input two numbers, choosing either Metres or Inches for the 'Change in Length' divided by the 'Original Length' which can also be in Metres or Inches, the out put number also needs to g

RE: neoPython : Fastest Python Implementation: Coming Soon

2021-05-06 Thread Schachner, Joseph
loyee complaint about our scripts being written in Python, and I don't expect to. -- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -- https://mail.python.org/mailman/listinfo/python-list

RE: learning python ...

2021-05-24 Thread Schachner, Joseph
float)). The first argument is the variable, the second should be type name. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: hw Sent: Sunday, May 23, 2021 3:34 PM To: python-list@python.org Subject: Re: learning python ... On 5/23/21 7:

Re: Posting code on stackoverflow

2021-06-06 Thread joseph pareti
didn't involve long lines > of code, I need to learn a) how to enter code if it's not just clicking on > the 'code' box before pasting text and b) how to keep code lines from > wrapping so a horizontal scroll bar is made available. > > TIA, > > Rich &g

Is there a conference in the US that is similar to EuroPython?

2021-07-19 Thread Schachner, Joseph
U.S.A. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -- https://mail.python.org/mailman/listinfo/python-list

[Errno 2] No such file or directory:

2021-07-28 Thread joseph pareti
_filename) FileNotFoundError: [Errno 2] No such file or directory: 'ls -l /media/joepareti54/Elements/x/finance-2020/AI/Listen_attend_spell/VCTK-Corpus/wav48 | awk "{print $9 -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services h

Re: [Errno 2] No such file or directory:

2021-07-29 Thread joseph pareti
indeed. There are better options than the one I attempted. Thanks for the advice Am Mi., 28. Juli 2021 um 18:19 Uhr schrieb Chris Angelico : > On Thu, Jul 29, 2021 at 2:10 AM joseph pareti > wrote: > > > > The following code fails as shown in the title: > > > &g

RE: Defining a Python enum in a C extension - am I doing this right?

2021-07-30 Thread Schachner, Joseph
ickly build an enum type from one string and instantiate enums of that type from the other string. In short, if you have problems creating an enum in C and passing it to Python, give the problems to Python! Let it create the enum. --- Joseph S. Teledyne Confidential; Commercially Sens

question on trax

2021-08-17 Thread joseph pareti
print("expected inputs :", add.n_in) print("promised outputs :", add.n_out, "\n") # Inputs x = np.array([3]) y = np.array([4]) print("-- Inputs --") print("x :", x, "\n") print("y :", y, "\n") # Outputs z = add((x,

Re: question on trax

2021-08-18 Thread joseph pareti
yes, but I do not see Fn anywhere. Another question is on this line: z = add((x, y)) If I code: z = add(x, y) Then the following exception occurs : *Expected input to be a tuple or list; instead got .* Am Di., 17. Aug. 2021 um 19:21 Uhr schrieb MRAB : > On 2021-08-17 16:50, joseph par

RE: matplotlib questions

2021-08-27 Thread Schachner, Joseph
Complete documentation link (this link works) : https://matplotlib.org/stable/contents.html --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Steve Sent: Thursday, August 26, 2021 11:48 AM To: python-list@python.org Subject

code to initialize a sequence

2021-08-29 Thread joseph pareti
(B)) print('-') print(C) print(type(C)) print('-') print(D) print(type(D)) Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 7

RE: on floating-point numbers

2021-09-03 Thread Schachner, Joseph
e sum of sums to get the final sum. This is much more likely to work accurately than adding up all the values in one summation except the last, and then adding the last (which could be a relatively small value). --- Joseph S. Teledyne Confidential; Commercially Sensitive Business

RE: on floating-point numbers

2021-09-03 Thread Schachner, Joseph
Actually, Python has an fsum function meant to address this issue. >>> math.fsum([1e14, 1, -1e14]) 1.0 >>> Wow it works. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Hope Rouselle Sent: Thursday, September

RE: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-14 Thread Schachner, Joseph
us. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Mostowski Collapse Sent: Tuesday, September 14, 2021 8:56 AM To: python-list@python.org Subject: Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) I am testing a Prolog

RE: New assignmens ...

2021-10-26 Thread Schachner, Joseph
previously pointed out you can still just use = . --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Chris Angelico Sent: Monday, October 25, 2021 6:25 PM To: Python Subject: Re: New assignmens ... On Tue, Oct 26, 2021 at 9:19 AM dn via

RE: Problem with concatenating two dataframes

2021-11-08 Thread Schachner, Joseph
be shocked if you couldn't do it. Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Mahmood Naderan Sent: Saturday, November 6, 2021 6:01 PM To: python-list@python.org; MRAB Subject: Re: Problem with concatenating two datafram

RE: Behavior of the for-else construct

2022-03-03 Thread Schachner, Joseph
Useful: On rare occasions (when a loop has a "break" in it) Used: Yes Know how it works: Yes Even is such a thing: Yes Your suggestion: Also useful. Will require a different keyword. I don't know what that would be. "finally" is available 😊 Write up a featu

RE: Behavior of the for-else construct

2022-03-07 Thread Schachner, Joseph
Can someone please change the topic of this thread? No longer about for-else. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Dennis Lee Bieber Sent: Sunday, March 6, 2022 1:29 PM To: python-list@python.org Subject: Re: Behavior of the for-else con

RE: Reportlab / platypus bug?

2022-03-14 Thread Schachner, Joseph
I realize this is Python code, but I doubt that the question is a Python question. I have used Python +numpy, scipy, matplotlib for years. I have not used reportlab and have no idea about the reported problem except that I will be very surprised if it turns out to be a Python language issue.

RE: Functionality like local static in C

2022-04-14 Thread Schachner, Joseph
be global. In the function declare global var, so that it will not only read the global but will also write it. That variable does not go away. On the next time the function is called, It will hold whatever value it had when the function finished previously. Joseph S. Teledyne Confid

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
On 8/9/16 1:42 PM, Terry Reedy wrote: > On 8/9/2016 9:22 AM, Joseph Bane wrote: >> Hello. >> >> It recently came to my attention that the strtobool function in the >> standard library doesn't return Python native boolean values, but >> rather returns integ

issues when buidling python3.* on centos 7

2018-03-25 Thread joseph pareti
I have a VM in the cloud running centos that comes with python 2.7 installed on it. For my purpose, I need python 3.5 (or 6?) However there is an issue with urlgrabber, and I believe this is due to inconsistencies with the 2 python versions, whcih I am not able to resolve. DETAILS INSTALL PYTHO

Re: issues when buidling python3.* on centos 7

2018-03-29 Thread joseph pareti
r/bin/python2.7 [joepareti54@xxx build]$ CONCLUSION In summary, I don't know whether this configuration is consistent or not for building the manta application, and whether the python set-up is consistent. Also to be noted that the manta application was built by the authors on an ubuntu platform,

permission denied when installing tensorflow on centos 7

2018-04-30 Thread joseph pareti
here are details on my attempt: tensorflow for centos 7 installation guidelines are in: https://gist.github.com/thoolihan/28679cd8156744a62f88 sudo yum -y install epel-release sudo yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc- gfortran openssl-devel libffi-devel # use

syntax error (?) on ubuntu

2018-05-03 Thread joseph pareti
$ python tf_simple.py /anaconda/envs/py35/lib/python3.5/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import registe

ImportError: cannot import name _remove_dead_weakref

2018-05-03 Thread joseph pareti
on an Ubuntu VM with : 1. Linux JP-Paid-UBUNTU-DSVM 4.13.0-1014-azure 2. Python 3.5.4 :: Anaconda custom (64-bit) $ manta manta_genSimData.py Loading script 'manta_genSimData.py' Traceback (most recent call last): skipping some details ... File "/anaconda/lib/python2.7/weakref.py", line

Re: ImportError: cannot import name _remove_dead_weakref

2018-05-03 Thread joseph pareti
; On Fri, May 4, 2018 at 1:53 AM, joseph pareti > wrote: > > on an Ubuntu VM with : > > > > > >1. Linux JP-Paid-UBUNTU-DSVM 4.13.0-1014-azure > >2. Python 3.5.4 :: Anaconda custom (64-bit) > > > > $ manta manta_genSimData.py > > Loading s

Re: ImportError: cannot import name _remove_dead_weakref

2018-05-04 Thread joseph pareti
thank you for the advice: depending on the value of PYTHONPATH (version 2.7, 3.5, or unset), tensorflow stops with 3 different error traps 2018-05-04 7:55 GMT+02:00 dieter : > Chris Angelico writes: > > ... > > Somewhere, you have a mismatch of versions. Make sure you're using the > > same Pytho

Re: ImportError: cannot import name _remove_dead_weakref

2018-05-05 Thread joseph pareti
problem: all I have seen is that the error code changes depending on the PYTHONPATH value. Perhaps it is a bug in the application code? 2018-05-05 9:12 GMT+02:00 dieter : > joseph pareti writes: > > thank you for the advice: depending on the value of PYTHONPATH (version > > 2.7

RE: "Data blocks" syntax specification draft

2018-05-23 Thread Schachner, Joseph
ique, or perhaps there really is a benefit that I didn't get. If so forgive me. But I do think that a good exposition of the benefit obtained by using this data representation will need to be made, or you may find that there are many other people like me. --- Joseph S. -Original Mess

RE: logging with multiprocessing

2018-06-08 Thread Schachner, Joseph
Multiprocessing, not multithreading. Different processes. This is pretty easy to do. I have done this from a Python script to run an analysis program on many sets of data, at once. To do it: 1) if there is going to be an output file, each output file must have a distinct name. 2) To use l

RE: mutable sequences

2018-06-14 Thread Schachner, Joseph
didn't actually pass a copy of your list (which could be huge), it passed a reference to a copy of your list. --- Joseph Schachner -Original Message- From: Sharan Basappa Sent: Wednesday, June 13, 2018 10:57 PM To: python-list@python.org Subject: mutable sequences The term m

RE: syntax difference

2018-06-18 Thread Schachner, Joseph
As soon as I sent the previous message I realized it's "doc string" not def string. Pardon me. --- Joe S. -Original Message- From: Ed Kellett Sent: Monday, June 18, 2018 8:47 AM To: python-list@python.org Subject: Re: syntax difference On 2018-06-18 13:18, Chris Angelico wrote: > 1)

RE: syntax difference (type hints)

2018-06-18 Thread Schachner, Joseph
gets added is a def string that says something about what the function does and explains what argument types are expected. -- Joseph S. -Original Message- From: Ed Kellett Sent: Monday, June 18, 2018 8:47 AM To: python-list@python.org Subject: Re: syntax difference On 2018-06-18 13

RE: syntax difference

2018-06-18 Thread Schachner, Joseph
On YouTube you can watch videos of Guido van Rossum presenting at PyCon from a few years ago, in which he makes clear that he has been thinking about this since 2000, that he wants someone else to guide this PEP along its path because he is too close to it, and that NOTHING about having a typing

RE: ironpython not support py3.6

2018-06-22 Thread Schachner, Joseph
Wait. -Original Message- From: fantasywan...@gmail.com Sent: Friday, June 22, 2018 2:45 AM To: python-list@python.org Subject: ironpython not support py3.6 We have a project implemented with c# and python, iron python is a good choice for us to integrate these two tech together but ir

Re: range

2018-06-25 Thread Schachner, Joseph
extra five years were added to give everyone plenty of time to switch. -- Joseph S. -- https://mail.python.org/mailman/listinfo/python-list

RE: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Schachner, Joseph
It is interesting to contemplate how this could transform Python into nearly a statically typed language: x = 3 x = f(x) If you say the type checker should infer that x is an int, and then therefore complain about x=f(x) if f() does not return an int, then we have what in new C++ is auto type d

RE: Checking whether type is None

2018-07-25 Thread Schachner, Joseph
testing thing is 1, at least I hope you wouldn't. thing is None looks just as odd to me. Why not thing == None ? That works. --- Joseph S. -Original Message- From: Tobiah Sent: Tuesday, July 24, 2018 3:33 PM To: python-list@python.org Subject: Checking whether ty

Guilty as charged

2018-07-27 Thread Schachner, Joseph
do. ... Maybe I missed it, but I'll remember it now. --- Joseph S. -- https://mail.python.org/mailman/listinfo/python-list

RE: Why emumerated list is empty on 2nd round of print?

2018-09-07 Thread Schachner, Joseph
The question "If I do this "aList = enumerate(numList)", isn't it stored permanently in aList now? I see your point to use it directly, but just in case I do need to hang onto it from one loop to another, then how is that done?" Reflects that you are thinking in a C++ kind of way I think. Whe

RE: [OT] master/slave debate in Python

2018-09-26 Thread Schachner, Joseph
This really is an amazing discussion. I actually do understand why "master" and "slave" might make people uncomfortable, although the meaning is quite clear. Perhaps we need a currently used alternative: 1) Captain and Private 2) Manager and employee 3) CEO and Peon 4) Controller and Controlled

RE: Python Enhancement Proposal for List methods

2018-10-22 Thread Schachner, Joseph
all elements, but all occurrences of a value passed to it, does not seem to me to meet that goal. Even if you implement this as a function I encourage to think of a better name than removeall. --- Joseph S. -Original Message- From: Siva Sukumar Reddy Sent: Sunday, October 21, 2018

Re: past exam paper help!

2016-04-09 Thread Joseph Caulfield
On Saturday, April 9, 2016 at 2:48:16 PM UTC+1, Joseph Caulfield wrote: > how would I model a mug a cylindrical vessel with an open top in python? > thansk :) *as a cylindrical vessel. -- https://mail.python.org/mailman/listinfo/python-list

past exam paper help!

2016-04-09 Thread Joseph Caulfield
how would I model a mug a cylindrical vessel with an open top in python? thansk :) -- https://mail.python.org/mailman/listinfo/python-list

RE: Recommendation for Object-Oriented systems to study

2016-05-29 Thread Joseph Lee
of the creator, bonus points! Thanks in advance! Ankush JL: One I contribute to that has object-oriented design is NonVisual Desktop access: http://github.com/nvaccess/nvda I'd be happy to let you talk to the led devs of this project if you'd like. Cheers, Joseph -- https://mail.py

RE: Iteration, while loop, and for loop

2016-06-28 Thread Joseph Lee
ant way to access the actual object in question, then using the first fragment is better (and more readable). For the most part, for loops are better, but there are times when while loops are preferable such as when you don't know the size of the input beforehand. Cheers, Joseph - https://m

RE: New to programming and asking about accessibility with jaws screen reader.

2016-07-24 Thread Joseph Lee
Hi, How are you running Python - via Command Prompt, perhaps? It might be better to ask a list like program-l (a dedicated programming list for blind devs). Cheers, Joseph -Original Message- From: Python-list [mailto:python-list-bounces+joseph.lee22590=gmail@python.org] On Behalf Of

Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
Hello. It recently came to my attention that the strtobool function in the standard library doesn't return Python native boolean values, but rather returns integer 0 or 1: https://hg.python.org/cpython/file/3.5/Lib/distutils/util.py#l304 I am curious why this is the defined behavior and whethe

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
On Tuesday, August 9, 2016 at 9:34:44 AM UTC-4, Michael Selik wrote: > On Tue, Aug 9, 2016 at 9:26 AM Joseph Bane wrote: > > > Hello. > > > > It recently came to my attention that the strtobool function in the > > standard library doesn't return Pytho

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
False >>> 0 is False False I am definitely not arguing that this behavior be changed, but just putting the larger issue into context. On Tue, Aug 9, 2016 at 9:34 AM, Michael Selik wrote: > On Tue, Aug 9, 2016 at 9:26 AM Joseph Bane wrote: > >> Hello. >> >> It

RE: question on the 'calendar' function

2018-11-20 Thread Schachner, Joseph
veat is that if the moon's orbit slows down as it gets farther away from the earth and the earth's rotation speed changes, then the calculations done by calendar for leap years may not be correct about the distant future. --- Joseph S. -Original Message- From: o1bigtenor S

RE: the python name

2019-01-02 Thread Schachner, Joseph
them). Until C++ 2014, there was no threading library as part of C++ standard. Even though now there is, it's seems to be to be old school. Look at Go (language) to see how concurrency can be built into the language instead of made available for optional use. Joseph S.

RE: Python read text file columnwise

2019-01-14 Thread Schachner, Joseph
d returns the next value. Kind of useful when the alternative is making and passing around huge lists. --- Joseph S. -Original Message- From: DL Neil Sent: Saturday, January 12, 2019 4:48 PM To: python-list@python.org Subject: Re: Python read text file columnwise On 12/01/19 1:03 PM

RE: get the terminal's size

2019-01-14 Thread Schachner, Joseph
Note sure why you couldn't capture $ echo $COLUMNS from a subprocess call. But, how about this (found on the web): from win32api import GetSystemMetrics print "Width =", GetSystemMetrics(0) print "Height =", GetSystemMetrics(1) -Original Message- From: Alex Ternaute Sent: Monday, Ja

RE: get the terminal's size

2019-01-14 Thread Schachner, Joseph
I just tested the fix I proposed, in Python 2.7.13 Code: from win32api import GetSystemMetrics def main(): print "Width =", GetSystemMetrics(0) print "Height =", GetSystemMetrics(1) if __name__ == '__main__': main() Result: Width = 1536 Height = 864 -Original Message- From:

RE: Pythonic Y2K

2019-01-17 Thread Schachner, Joseph
l not support. A version which most other companies will no longer be using, so programming only in Python 2 will place the employee at a disadvantage compared to others who have gained experience with Python 3 if they ever have to change employers. --- Joseph S. -Original Message-

basic question on how "import" works

2019-01-19 Thread joseph pareti
ccessfully downloaded, extracting ...* 2. I don't see any such files in /tmp/data on my system, why? 3. (this is part of a code for training a neuronal network which works as expected, it's just for my own understanding of how this works -- Thank you) -- Regards, Joseph

What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Schachner, Joseph
eplies, for replying. --- Joseph S. -- https://mail.python.org/mailman/listinfo/python-list

generate matplotlib images without having access to an X server

2019-01-23 Thread joseph pareti
rror: 'numpy.ndarray' object has no attribute 'savefig'* Anything I am missing? I am not familiar with the code, just trying to understand it. Thank you -- Regards, Joseph Pareti - Artificial Intelligence consultant cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org/mailman/listinfo/python-list

RE: Exercize to understand from three numbers which is more high

2019-01-29 Thread Schachner, Joseph
Explanation: 5 > 4 so it goes into the first if. 5 is not greater than 6, so it does not assign N1 to MaxNum. The elif (because of the lack of indent) applies to the first if, so nothing further is executed. Nothing has been assigned to MaxNum, so that variable does not exist. You're right, i

RE: Exercize to understand from three numbers which is more high

2019-01-29 Thread Schachner, Joseph
Yes, that works. Assuming it was correctly formatted when you ran it. The formatting could not possibly be run in a Python interpreter, I think. --- Joseph S. From: Adrian Ordona Sent: Tuesday, January 29, 2019 2:52 PM To: Schachner, Joseph Cc: Dan Sommers <2qdxy4rzwzuui...@potatochowder.

RE: The sum of ten numbers inserted from the user

2019-02-07 Thread Schachner, Joseph
Well of course that doesn't work. For starters, x is an int or a float value. After the loop It holds the 10th value. It might hold 432.7 ... It is not a list. The default start for range is 0. The stop value, as you already know, is not part of the range. So I will use range(10). In the

RE: The sum of ten numbers inserted from the user

2019-02-07 Thread Schachner, Joseph
removed. --- Joe S. From: Ian Clark Sent: Thursday, February 7, 2019 1:27 PM To: Schachner, Joseph Cc: python-list@python.org Subject: Re: The sum of ten numbers inserted from the user This is my whack at it, I can't wait to hear about it being the wrong big o notation! numbers=[] whil

RE: Why float('Nan') == float('Nan') is False

2019-02-13 Thread Schachner, Joseph
n to a number fails. --- Joseph S. -Original Message- From: ast Sent: Wednesday, February 13, 2019 8:21 AM To: python-list@python.org Subject: Why float('Nan') == float('Nan') is False Hello >>> float('Nan') == float('Nan') False Why ?

RE: Multiprocessing vs subprocess

2019-03-12 Thread Schachner, Joseph
subprocess call can be blocking (the caller waits), or not. If not the caller can do whatever it wants including decide not to wait forever, and it can even exit. Of course, if one of the processes you launched is locked up that is a problem all by itself, even thought the manager can exit

RE: Syntax for one-line "nonymous" functions in "declaration style"

2019-04-01 Thread Schachner, Joseph
, saying that it is a generator and describing what it does. I realize I'm calling on the programmer to address this issue by adding doc strings. Nonetheless adding doc strings is a good habit to get in to. --- Joseph S. -Original Message- From: Ian Kelly Sent: Sunday, March 31,

RE: scalable bottleneck

2019-04-04 Thread Schachner, Joseph
If you are using Python 3, range does not create at list, it is a generator. If you're using Python 2.x, use xrange instead of range. xrange is a generator. In Python 3 there is no xrange, they just made range the generator. --- Joseph S. -Original Message- From: Sayth Re

RE: Design a function that finds all positive numbers

2019-04-09 Thread Schachner, Joseph
alues, and two 2 values, but I think you only want to print 2 once. --- Joseph S. -Original Message- From: Ben Bacarisse Sent: Tuesday, April 9, 2019 7:33 AM To: python-list@python.org Subject: Re: Design a function that finds all positive numbers Ranjith Bantu writes: > A numeric ar

RE: Python-list Digest, Vol 189, Issue 17

2019-06-17 Thread Schachner, Joseph
Please see https://docs.python.org/2/library/colorsys.html And follow the links in there, read the FAQ. You'll find that python represents RGB values in three numeric values. Very simple. I believe scale is 0.0 to 1.0. --- Joseph S. -Original Message- From: Python-list On B

issue with regular expressions

2019-10-22 Thread joseph pareti
'NoneType' object has no attribute 'start' any help? Thanks -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org/mailman/listinfo/python-list

Re: issue with regular expressions

2019-10-22 Thread joseph pareti
Ok, thanks. It works for me. regards, Am Di., 22. Okt. 2019 um 11:29 Uhr schrieb Matt Wheeler : > > > On Tue, 22 Oct 2019, 09:44 joseph pareti, wrote: > >> the following code ends in an exception: >> >> import re >> pattern = 'S

TypeError: unhashable type: 'list'

2019-10-23 Thread joseph pareti
line 183, in search return _compile(pattern, flags).search(string) File "c:\Users\joepareti\Miniconda3\pkgs\python-3.7.1-h8c8aaf0_6\lib\re.py", line 276, in _compile return _cache[type(pattern), pattern, flags] TypeError: unhashable type: 'list' Thanks for any insi

  1   2   3   4   5   >