ogunleye ayobami writes:
> Dear Python Team,
>
> After downloading and installing python on my system, error generated on
> command prompt is
> C:\Users\Olakunle Johnson>python
>
> *'python' is not recognized as an internal or external command,operable
> pr
return value of an Open() function.
config_file : file = open(config_file_s, "r")
What type of variable should config_file (above) be declared as?
First point (at the risk of teaching you/Grandma how to suck eggs) is
that Python is a "dynamically-typed" language. Thus we ma
On 16/04/20 3:34 PM, Dennis Lee Bieber wrote:
On Wed, 15 Apr 2020 19:23:43 +0100, Barry Scott
declaimed the following:
I post some suggestion to improve the Python installer for Windows
to better sign post users on the next steps.
https://mail.python.org/archives/list/[email protected]
e exact details, but
that anomaly happened only with DEFed variables ; it didn't happen when the
data type was specified.
I am going to interject here - and because there is arguing!
1 the above description seems to suggest that the coder's objectives are
now to be split: firstly to m
On 18/04/20 11:10 AM, [email protected] wrote:
I am reading a Python file and find an specific line, replace a text and then
write back to the file.
When I check back the file, I am getting indent error.
How to fix this issue.
Please make it easier for us (volunteers giving-up our free
?good, old days, a Computer Science course would almost
certainly involve some "Numerical Analysis", when such issues would be
discussed. Not sure that many institutions offer such, these days...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
computer behave so
differently?
Please don't top-post - (human) conversations are normally question
followed by answer, not the other way around!
Computers use binary, not decimal - asked and answered (see previous
first response, below)
On Sat, 18 Apr, 2020, 7:02 pm DL Neil via P
into it as soon as possible.
Hi, and welcome to Python.
Please be aware that the members of this Discussion List are volunteers,
giving-up their free time to help each-other.
This question appears (and has been answered) in the list archives. (ref
close of all messages)
The Python
Springer (publisher) has released a bunch of eBook versions of Python
text-books, free to download (.PDF and/or .EPUB), in support of COVID-19
stay-at-homes.
This sub-list features texts for all 'levels' of mastery, and published
between 2014 and 2019/20. They tend to be 'sol
, b = 1, 2
Which is why a single element/expression tuple must be expressed with a
comma. Yet, things become slightly confusing when an empty pair of
parentheses defines an empty tuple.
You will find these definitions (and so much more) in the Python
Reference Manual amongst the Python docs.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
d it seems that this is
far better than fiddling with the for loop syntax.
--
https://mail.python.org/mailman/listinfo/python-list
On 21/04/20 9:40 AM, elisha hollander wrote:
I have a python library with a function.
This function call some other functions, classes and variable from the
library (and those functions and classes call other ones, etc)...
Can I automatically create a file with all of the dependencies (and
I’ve just begun a serious study of using Python as an aspiring programmer/data
scientist.
Can someone please walk me through how to download Python, SO THAT I will be
able to import numpy?
Thanks,
Derek
Sent from Mail for Windows 10
--
https://mail.python.org/mailman/listinfo/python-list
Have tracked-down and communicated with the site owner/operator. He
advised a loop-back problem which has now been blocked.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
brary/functions.html#isinstance
(If this is the wrong group for this question, what group should I use.)
We're happy to help. There is a Python-Tutor group which is a good
'home' for beginners or new-converts to Python...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 24/04/20 1:24 PM, Deac-33 Lancaster wrote:
I'm aware that you can find the type of a variable with
type(var)
But are there Boolean operators in Python3.8 to test the data type, e.g.
is_floate(var)
is_string(var)
etc. ?
There is also a 'pythonic' answer (what is
... Is there a way to see all of the groups?
Yes! Follow the link at the bottom of this email msg. Then follow the
link at the bottom of this list's web-page ...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
ble, by changing one line, to
re-direct the log to wherever you would like - including the above!
Python library: https://docs.python.org/3/library/logging.html
Logging (testing): https://docs.pytest.org/en/latest/logging.html
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
d easily be
re-directed. On the other hand: YAGNI!)
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
From the above, I'm wondering if a custom exception might be applicable.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
le, change!")
The policy file is a JSON file and could have different categories.
Each category defines a policy for a certain directory tree. Comand
line args could overwrite directory names, as well as user and group.
Or if for example a directory is not specified in the JSON file I am
required to specify it via command line. Otherwise no check can take
place.
default":
{
"match_perms": "644",
"match_permsd": "755",
"match_permsx": "755",
"owner": "manfred",
"group": "manfred"
}
Won't a directory-path be required, to tie 'policy' to 'tree'?
Is that enough feedback to help you take a few more steps?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
4. That’s an error.
The requested URL was not found on this server. That’s all we know.
>>>
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
ctrons became
considerably excited!)
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
mple I have changed the check() method in the Policy class to
get called like this:
def check(self, fpath, user, group, mode):
This means I can test the checks and its result without requiring any
external test data.
Thanks a lot to all for your help.
Given your replies, 'now' might be a good time to take a look at Pytest,
and see how you could use it to help build better code - by building
tested units/functions which are assembled into ever-larger tested-units...
(there is a range of choice/other testing aids if Pytest doesn't take
your fancy)
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
presente messaggio.
--
https://mail.python.org/mailman/listinfo/python-list
def foo(i):
foo.bar += i
foo.bar = 5
--Jach
And as you have shown - foo.bar is effectively a global variable - just
one with a qualified name :-)
--
Tony Flury
--
https://mail.python.org/mailman/listinfo/python-list
error, you could use a 4xx code.
However, I would prefer to use the standard codes, and add a custom header with
more information on the issue.
-- Ed Leafe
--
https://mail.python.org/mailman/listinfo/python-list
x27;t take your fancy)
I have to admit I chose unittest. Simply because it is in the standard
lbrary. As so many people seem to prefer pytest I should take a look at
it.
Not at all! This is a personal bias - I happen to have been using Pytest.
Your objective is learning to program in Python. 'C
On 28/04/20 7:36 PM, Chris Angelico wrote:
"Best"? Not sure about that. Functions are first-class objects in
Python, so a function *is* a callable object. You don't have to create
a custom class with a call method just to be able to attach attributes
to your function.
ChrisA
On 2/05/20 11:30 AM, Chris Angelico wrote:
On Sat, May 2, 2020 at 9:14 AM DL Neil via Python-list
wrote:
On 28/04/20 7:36 PM, Chris Angelico wrote:
"Best"? Not sure about that. Functions are first-class objects in
Python, so a function *is* a callable object. You don't h
ple) training, generator functions (and
async-gen-func-s) already offer this (without the static-statement)
def gen( args ):
counter = 0
while counter < max_depth:
yield counter
counter will retain its value ("maintain state") between iterations.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
Is this the way to write Python Enhancement Proposals (PEPs)?
eg https://www.python.org/dev/peps/pep-0008/#indentation
TabError: inconsistent use of tabs and spaces in indentation
https://www.geeksaresexy.net/2020/05/01/the-tab-club-comic/
--
Regards,
=dn
--
https://mail.python.org/mailman
To make-up to those people who frowned at the earlier OT-Comic post...
There are changes in-the-wind, in the way Python should/could be
documented.
Currently, there is a difficulty in 'scaling' the documentation to cope
with the growing range of language user-types, as well as
On 3/05/20 9:07 AM, Chris Angelico wrote:
On Sun, May 3, 2020 at 6:33 AM DL Neil via Python-list
wrote:
Is this the way to write Python Enhancement Proposals (PEPs)?
eg https://www.python.org/dev/peps/pep-0008/#indentation
TabError: inconsistent use of tabs and spaces in indentation
https
Is this anything? When you run a python command from the shell to just print
the command line args you get this:
$ python -c "import sys; print(sys.argv)"
['-c']
But I would expect one of these:
Either the '-c' option consumes both args:
$ python
it/s]
print('abcdef', end='\r'); print('ghi', end='')
--
https://mail.python.org/mailman/listinfo/python-list
On 7/05/20 4:15 PM, Music lover wrote:
Hello python team,
I have installed the latest version of python from your site.
Then I successfully installed some modules like :- numpy , pandas,
matplotlib from command prompt. But I am not able to use them while
programing in python Idle
/info.cern.ch/hypertext/WWW/TheProject.html ;-)
--
https://mail.python.org/mailman/listinfo/python-list
On 15/05/20 12:58 AM, Jon Ribbens via Python-list wrote:
On 2020-05-14, MRAB wrote:
Look at the date of the original post. It says "8 May 2009". That's over
11 years ago!
Since then, Google Code has ceased to exist.
Disgraceful, all URLs should continue to work for at least
On 15/05/20 4:18 PM, Jhoana Kacheva Melissa Joseph wrote:
Hello,
I downloaded python 3.8 in my windows, I selected the box for the path but
when I try to run it in powershell it brought me to app store to get it
again.
Please advise if the following reference is accurate, and works for you
ent and cynical views of computing,
poking-fun at every opportunity and using British-slang (which may
challenge some - one way or another).
I've often surmised reminders of ALGOL in Python. However, I had not
previously remembered the ALGOL Bulletins and their similarity to
Python's
On 17/05/20 7:06 PM, Tarun Pathak wrote:
-- Forwarded message -
From: Tarun Pathak
Date: Sun, May 17, 2020, 12:07 PM
Subject: Unable to Install Python (3.5.0) Properly
To:
Dear Sir/Madam,
I am trying to install Python for a while. But failed to do so. Tried
with
On 18/05/20 10:52 AM, Oscar Benjamin wrote:
On Sun, 17 May 2020 at 15:21, Mats Wichmann wrote:
On 5/15/20 9:47 PM, Souvik Dutta wrote:
I dont know if you should shift from powershell to cmd. Python kinda does
not work in powershell.
Powershell has a funky way of looking up programs, with
On 19/05/20 6:40 AM, [email protected] wrote:
Hi All,
I am using python for doing the following:
I have a matrix which has dimension of 174*993.
Each row of the matrix has some numbers in the range of 30-30.5.
I would like to determine the index of the numbers in the range of 30-30.5 in
anaged to make it as far as C in my alphabet skills, but yes,
maybe SQL influences)
@Chris: are you on the night-shift?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
During my Covid19 lock-down I thought I'd spend my time translating
the "Linux Curses Programming HOWTO" document into Pythonic curses.
One of the functions discussed that does not appear to have
a Python equivalent is attr_get() which gets the current
attributes.
There are functi
y readable. notEveyoneThinksReadingCamelCaseIsEasy.
Me: "What does casels mean?"
Chris
Angelico
Shortens
Every
Long-name
Savagely
?
Significantly
?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
om/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
he attributes for a single character - inch().
That is supported in Python.
To get the current settings you would need to write a
character to the window(addch), fetch its attributes using
inch() then delete the character just written (delch).
Clunky but it should work. I'll try it and see if
On 19/05/2020 20:53, Alan Gauld via Python-list wrote:
> One of the functions discussed that does not appear to have
> a Python equivalent is attr_get() which gets the current
> attributes.
OK, Using inch() I've written the following function:
def attr_get(win):
""
On 21/05/20 2:22 AM, Supriyo Roy wrote:
I have installed the latest version of python which is 3.8.3. However, when
I try to run a sample program, a small python icon appears on my taskbar
for a split second and then disappears. Nothing else happens. Please advise
me on how to get python up and
ng reference is accurate, and works for you:
https://docs.python.org/3/using/windows.html
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
exit
n += 1
print("\n", n, "terms are required.")
--
https://mail.python.org/mailman/listinfo/python-list
On 23/05/20 3:40 AM, Itamar Turner-Trauring wrote:
You’re about to ship your Python application into production using Docker: your
images are going to be critical infrastructure.
...
*The class will take place on two mornings (US East Coast) on June 11th and 12th. You
can **learn more about
You still have to call it. ;)
Which definition (may) make it 'worse' (when compared with "break"):
doesn't exit() also close the application-window under some OpSys (if
not all) - which would 'disappear' the output before it could be read?
--
Regards =dn
--
h
/python-list
uot;""
)
worked pretty well, served to both satisfy my brain's desire for semantic
indentation (you should see some of the SQL I inherited - yikes!) and
maintain a visual distinction between Python and SQL quoting. (Consistently
using triple quotes minimizes the chance of needing a
as if the delimiters are stored along
with other variable detail!)
That the REPL is 'intelligent' about its choice to vary the delimiter to
suit the content is good (design) sense - the best presentation (UX), ie
doesn't is a better presentation than doesn\'t!
Which brings
alled but doesn't boot
To:
I have installed python after getting the book "Coding for Kids/Python, and
it won't boot. HELP
Assuming MS-Windows:
Please advise if the following reference is accurate, and works for you:
https://docs.python.org/3/using/windows.html
--
On 24/05/20 8:39 AM, Skip Montanaro wrote:
May I ask why not simply like this:
stmt = """
select foo from bar
where a = 'bag'
and c = 'dog'
"""
Sorry, I don't recall. I wouldn't be at all su
On 24/05/20 5:43 PM, Frank Millman wrote:
On 2020-05-23 9:45 PM, DL Neil via Python-list wrote:
My habit with SQL queries is to separate them from other code, cf the
usual illustration of having them 'buried' within the code,
immediately before, or even part of, the query call.
On 24/05/20 8:41 PM, Frank Millman wrote:
On 2020-05-24 9:58 AM, DL Neil via Python-list wrote:
On 24/05/20 5:43 PM, Frank Millman wrote:
On 2020-05-23 9:45 PM, DL Neil via Python-list wrote:
My habit with SQL queries is to separate them from other code, cf
the usual illustration of having
On 26/05/20 8:26 AM, [email protected] wrote:
Hi,
I have a case in which I have to use custom function for logging.
For example, all messages should go to stderr and end with '\r\n'.
Can I somehow use standard python logging module but send all message to stderr
with '\r\
…
If you’re interested feel free to take a look.
Thanks.
Am on-the-road at present, but will take a look...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
e path on Windows '\\' is recognised as a
separator between directories and not as an indicator that what follows
is an absolute path based on the drive letter (although it might, as you
say, imply a drive context).
[some of this answer may appear 'obvious' to you. If so, ple
We can't define/re-define such terms
to suit ourselves - nor does Python.
If your specification embraces only MS-Windows, then please ignore the
Python facilities which attempt a more universal solution. If, however,
you choose a more universal abstraction, then please accept that it will
ks( Link )
NB in this scenario it is only necessary to register once - all of the
links at-once, cf registering each link as it is itself instantiated.
Also, that each Link() object is not aware that it is/will be 'registered'!
Later, when it is necessary to carry-out the same action on each of the
objects, we can use the register's iterator/generator (as above).
Critique/other ideas welcome...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
ttachments: [{
filename: 'image.png',
path: 'data:image/png;base64,iVBORw',
cid: '[email protected]'
}]
}
Does an approach exist to construct a MIMEImage object with the existing
base64 string without parsing it and decoding it?
Might the Pyth
On 30/05/20 7:42 PM, Preetha M wrote:
Hello. Thank you for responding to my previous mail. Can someone tell me
how to connect python to sublime text 3. Whenever I select python and type
the code, it does not work when I press ctrl+B. Please tell.
ST is an editor/IDE which is not Python
On 30/05/20 4:52 AM, [email protected] wrote:
In an effort to clean up my python logging practices when creating libraries, I have
begun reading into "Advanced Logging" and converting my logging practices into
logging configuration `.ini` files:
[link](https://docs.python.org
I used https://github.com/python/pyperformance pyperformance to
compare Arch linux latest
Python 3.8.3 (default, May 17 2020, 18:15:42) [GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
against a vanil
I had been using python 3.6 on two computers with windows 7 and windows 10.
We bought a windows 10 machine and I installed python 3.8 on it. Many of my
python apps failed with an error similar to this:
File "C:\Python38\lib\os.py", line 818, in fsdecode filename =
fspat
On 4/06/20 4:59 PM, Meet Agrawal wrote:
I want to unsubscribe from python list and would like to stop recieving
mails from the same.
At the bottom of your request (as reflected), this, and all over
messages to the list is an administration link. At the foot of that
web-page you will find a
On 4/06/20 2:22 PM, Kelley Hudson wrote:
Keep getting an error when trying to us Python with Pycharm. I uninstalled
it but this was the error I received.
Sent from [1]Mail for Windows 10
References
Visible links
1. https://go.microsoft.com/fwlink/?LinkId
How do you prefer to balance all of the above when import-ing?
Python offers a number of options for importing modules, eg
import module, ...
from importable import object, ...
most of which can be augmented with the "as preferred_name" syntax.
(ignoring the much-reviled &
To whom it may concern,
I have trouble installing the Pygame and Pgzero on Window. I based on the
instruction on the "Computer Coding Python Games for Kids" by Carol Vorderman.
Nothing works.
I tried Python 3.6.2 as describe in the book and the latest version 3.8.3 still
encoun
the error SyntaxError: invalid syntax because of the property named from.
Looks like in python from is a keyword that cannot be used as a property name.
I have to create a python object from a complex (nested) json object that has many keys
with name "from" and value of date in string f
On 8/06/20 7:06 AM, Caledonian26 wrote:
...
However, I keep getting the error: IndexError: list index out of range. Could
anyone give me a helping hand as to where I am going wrong?
When things go wrong, Python tries to be helpful by providing a
"traceback". Please copy-paste
On 8/06/20 10:38 AM, MRAB wrote:
On 2020-06-07 23:24, DL Neil via Python-list wrote:
On 8/06/20 7:06 AM, Caledonian26 wrote:
...
However, I keep getting the error: IndexError: list index out of
range. Could anyone give me a helping hand as to where I am going wrong?
When things go wrong
On 2020-06-09 09:00, [email protected] wrote:
Well the problem that I am facing with is, that I have to establish interface
between python and outer system.
Original question was about creation of input object (data that I have received from outer system).
If I accept recommendation to use
On 10/06/20 11:26 PM, Silvia Aminul wrote:
I tried installing Python for windows 10 (the latest version of python for
windows )
And after downloading and trying to launch it keeps saying repair modify
uninstall I tried looking for solution and it was suggested I might have
fer to be the result?
(remember that this list will only accept text-format attachments (no
graphic screen-dumps!), so best to copy-paste code/results directly into
the email message)
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 11/06/20 4:56 AM, John Weller wrote:
I am trying to learn python. Looking at an example on the web I found this
line:
def plot(*args, **kwargs):
What do the stars mean?
The Python "docs" are (surprisingly, for this day-and-age)
comprehensive. Try https://docs.python.org/
thing thinks something is missing, say so here.
It is a solid contribution to the community. Thanks!
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
nstance with float (1.5)?
You may be confusing Python with some other programming language
previously-learned. We need to 're-wire' the way your mind is working
because whilst you are not-wrong for that-language, you are not-right
for Python.
So, I'm not going to answer your
On 12/06/20 9:32 AM, [email protected] wrote:
OK, as I can see nothing is enforced but I can use mypy and tests for the
purpose.
Exactly! Well done - Python uses 'duck typing' and thus when the Typing
module was added, it became an option. As mentioned elsewhere, it
provides
hus easier to learn and practice? Could we
develop Python to take advantage of these opportunities?
TLDR;? Skip to the last paragraphs/block...
Back in the ?good, old days, small eight-bit computers advanced beyond
many of their predecessors, because we could begin to encode characters
and &qu
across this article:
https://www.activestate.com/blog/how-to-convert-py-to-exe/
NB have no assessment/advice to report
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 13/06/20 8:49 AM, Siddharth Joshi wrote:
I am new in Python world and would like to use it for one of the our
purpose . Before that, I would like to ask if Python has compatibility with
ENSCRIBE database .
Enscribe database (file structured) is the native database of HP NonStop
(Tandem
new position (and adding it to the background), execute
appropriate code to wipe it (and restore whatever was 'underneath').
2 clear the entire display, and build it again from 'background' to
'foreground'. (takes longer but is 'guaranteed')
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
While studying the curses module I was struck by the paucity of
tutorial documentation for the Python version. Fortunately I
know C and used to write curses applications back in the 80s/90s
so I turned to the C tutorials. However, there are quite a lot
of differences between the Python wrapper
On 13/06/20 4:47 AM, Terry Reedy wrote:
On 6/12/2020 2:03 AM, DL Neil via Python-list wrote:
Unicode has given us access to a wealth of mathematical and other
symbols. Hardware and soft-/firm-ware flexibility enable us to move
beyond and develop new 'standards'. Do we have opport
On 13/06/20 5:11 AM, Dennis Lee Bieber wrote:
On Fri, 12 Jun 2020 18:03:55 +1200, DL Neil via Python-list
declaimed the following:
There is/was a language called "APL" (and yes the acronym means "A
Programming Language", and yes it started the craze, through "B&q
There was a recent thread on python-ideas discussing this. It started
with arrow characters. There have been others.
Am pleased to hear that it's neither 'new' nor 'way out there'...
Am not subscribed to that list. Went looking for its archives, but
failed - ther
On 16/06/2020 16:38, Alan Gauld via Python-list wrote:
> This is now available as a PDF and I'd be interested in review comments.
Just to add that I can send a zip of the code files too.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.co
On 16/06/2020 19:34, Karsten Hilbert wrote:
>> I therefore took it on myself to do a translation of the Linux
>> Documentation Project's "Curses HowTo" by Pradeep Padala into Python.
>>
>> This is now available as a PDF and I'd be interested in review
On 18/06/20 10:20 PM, Sourav Kundu wrote:
when I am using the editor to write a long program and trying to run it the
python command line showing it syntax error
Of possible interest:-
Why SuperHELP for Python? | pssst
Search domain
p-s.co.nz/wordpress/why-superhelp-for-python/p-s.co.nz
nd whether you have a
callable API that you can invoke.
--
https://mail.python.org/mailman/listinfo/python-list
oatingpoint.html
In the official Python documentation, well worth reading.
--
Grant
--
https://mail.python.org/mailman/listinfo/python-list
with relative interpreter paths.
Thanks
to Paul Kienzle for the patch.
* Fixed #134: Allowed specifying a different target Python version when
generating
scripts.
* Fixed #135: Exposed the ``enquote_executable`` function previously implemented
as an internal function.
* Addressed
4601 - 4700 of 6693 matches
Mail list logo