pythonw.exe error

2017-10-30 Thread George Kalamaras via Python-list
When I am running IDLE return to me Missing python36.dll error Στάλθηκε από την Αλληλογραφία για Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Any good explanations on pd.merge(df,df2, on=['Code', 'Region'])

2017-11-08 Thread David Shi via Python-list
I am trying to gain a clear understanding on pd.merge(df,df2, on=['Code', 'Region']). Can anyone assist? Regards, David -- https://mail.python.org/mailman/listinfo/python-list

Re: can't get python to run

2017-11-12 Thread Mary Ann via Python-list
trying to install and run Python 3.5.2 (64 bit) and keep getting error message: the program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reintalling the program to fix this problem. I am on Windows 7 Home Premium I have uninstalle

Round to 2 decimal places

2017-12-06 Thread nick martinez via Python-list
I'm stuck. I need my program to round the end solution to 2 decimal places but cant figure it out. Can someone help? I've been trying between printf and round() but cant seem to get either to work. Python 3.5 is what I'm using. import math print("This program will calculate

Re: Round to 2 decimal places

2017-12-06 Thread nick martinez via Python-list
, > round(surfacearea,2), ) > else: > print("No negatives allowed, try again.") Tried this but it doesn't seem to work. It still prints out all of the decimals -- https://mail.python.org/mailman/listinfo/python-list

Re: Round to 2 decimal places

2017-12-06 Thread nick martinez via Python-list
it doesn't seem to work. It still prints out all of the > > decimals > > This is the output from the code above (Working): > > What is the radius in feet? (no negatives): >? 2 > What is the height in feet? (no negatives): >? 4 > Your Answer is: > A cone with radius 2.0 > and height of 4.0 > has a volume of : 16.76 > and surface area of : 40.67 interesting, what version of python are you using? Tried it multiple times and it still isn't working. -- https://mail.python.org/mailman/listinfo/python-list

Re: Round to 2 decimal places

2017-12-06 Thread nick martinez via Python-list
"\nand surface area of : ", > > > > round(surfacearea,2), ) > > > > else: > > > > print("No negatives allowed, try again.") > > > > > > Tried this but it doesn't seem to work. It still prints out all of the

Python homework

2017-12-08 Thread nick martinez2 via Python-list
f __name__ == "__main__": result = rollDie(50) print (result) print(max(result)) -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Templating Language

2017-12-18 Thread Brian Oney via Python-list
you may consider checking out a more general approach. Noweb was the first to my knowledge and lead the way for Sweave (R or S), and pyweave, as mentioned. https://en.wikipedia.org/wiki/Noweb Cheers -- https://mail.python.org/mailman/listinfo/python-list

Re: Native object exposing buffer protocol

2018-01-05 Thread Ben Finney via Python-list
Rob Gaddi writes: > I'd like to create a native Python object that exposes the buffer > protocol. Basically, something with a ._data member which is a > bytearray that I can still readinto, make directly into a numpy array, > etc. The “etc.” seems pretty important, th

Re: Why does __ne__ exist?

2018-01-07 Thread Ben Finney via Python-list
. > Let's put it this way. Suppose that __eq__ existed and __ne__ didn't, > just like with __contains__. Go ahead: sell the notion of __ne__. > Pitch it, show why we absolutely need to allow this. I think “reject unless absolutely needed” is an unreasonably high bar, which wou

Re: Very strange issues with collections.Mapping

2018-01-19 Thread John Krukoff via Python-list
I ask > here is because I'm wondering if anybody has encountered this before and > managed to hunt down which of these libraries is doing something naughty? > > Thanks! > Jason > > -- > Jason M. Swails > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

error message by installation

2018-01-19 Thread ‪Ibrahim Nasr‬ ‪ via Python-list
kindly inform me what to do. -- https://mail.python.org/mailman/listinfo/python-list

Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-22 Thread Jason Qian via Python-list
Hello! I am using ctypes on Windows to interface with a dll and it works fine on Linux and windows 32-bit python. But, when using 64-bit python, we got error "exception: access violation writing 0x99222A60". Checking our server, it seems work without any problem. but

Re: Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-22 Thread Jason Qian via Python-list
Thanks you very much, fixed the problem :) On Mon, Jan 22, 2018 at 4:28 PM, Random832 wrote: > On Mon, Jan 22, 2018, at 16:00, Jason Qian via Python-list wrote: > > Hello! > > > > I am using ctypes on Windows to interface with a dll and it works fine > > on Linu

Re: Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-22 Thread Jason Qian via Python-list
Thanks for the help, Jason On Mon, Jan 22, 2018 at 5:41 PM, eryk sun wrote: > On Mon, Jan 22, 2018 at 9:00 PM, Jason Qian via Python-list > wrote: > > > > I am using ctypes on Windows to interface with a dll and it works fine > > on Linux and windows 32-bit python.

Re: Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-24 Thread Jason Qian via Python-list
application will give a exception due to the pointer of callback handler = NULL; Not sure, why the callback handler missed up, when the app calling from python. Thanks -- python lib.createService.argtypes=[ctypes.c_void_p,ctypes.c_char_p] lib.createService.restype=ctypes.c_int def

Python call c pass a callback function on Linux

2018-01-24 Thread Jason Qian via Python-list
ponse ---') print(message) print(code) class GSPythonDriver(object): def submif(self,methodname) invm_fn = InvocationCB(handleResponse) lib.submit(self.obj,methodname,invm_fn) How can I do this on the Linux ? Thanks for the help Jason -- https://mail.python.org/mailman/listinfo/python-list

Re: Python call c pass a callback function on Linux

2018-01-24 Thread Jason Qian via Python-list
HI Dennis, Thanks for the help, After changing WINFUNCTYPE to CFUNCTYPE, the call back function works on the Linux :) Thanks again, Jason On Wed, Jan 24, 2018 at 6:15 PM, Dennis Lee Bieber wrote: > On Wed, 24 Jan 2018 17:16:22 -0500, Jason Qian via Python-list > declaim

Re: Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-24 Thread Jason Qian via Python-list
ack handler as second > parameter. >Without callback handler, it works fine. But if we add the callback > handler, the application will give a exception due to the pointer of > callback handler = NULL; > >Not sure, why the callback handler missed up, when the app calling

Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
HI I am a string that contains \r\n\t [Ljava.lang.Object; does not exist*\r\n\t*at com.livecluster.core.tasklet I would like it print as : [Ljava.lang.Object; does not exist tat com.livecluster.core.tasklet -- https://mail.python.org/mailman/listinfo/python-list

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
HI I have a string that contains \r\n\t [Ljava.lang.Object; does not exist*\r\n\t*at com.livecluster.core.tasklet I would like to print it as : [Ljava.lang.Object; does not exist tat com.livecluster.core.tasklet How can I do this in python print ? Thanks On Sat, Jan 27

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
Thanks for taking look this. 1. Python pass a function to c side as callback, and print out the message. def handleError(message, code): print('** handleError **') * print('exception ' + str(message))* 2. On c side : send stack trace back to python by calling the callbac

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
Thanks for taking look this. The source of the string is std::string from our c code as callback . On the python side is shows as bytes. Is there way we can reformat the string that replace \r\n with newline, so python can correctly print it ? Thanks On Sat, Jan 27, 2018 at 5:39 PM, Terry

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
there are 0D 0A 09 %c %d 116 *%c %d 13%c %d 10%c %d 9* %c %d 97 On Sat, Jan 27, 2018 at 9:05 PM, Dennis Lee Bieber wrote: > On Sat, 27 Jan 2018 20:33:58 -0500, Jason Qian via Python-list > declaimed the following: > > > Ljava.lang.Object; does not exis

Re: How to embed a native JIT compiler to a django app?

2018-01-28 Thread Stephane Wirtel via Python-list
On 01/27, Etienne Robillard wrote: Hi, I want to compile a Django application into a C source file and embed a JIT compiler into the binary. Is there any way of doing this with llvm/clang? Hi Etienne, I think no, Django will use Python and this one is interpreted. Answer, no... Now

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-28 Thread Jason Qian via Python-list
99 c %d %c 111 o %d %c 109 m On Sun, Jan 28, 2018 at 9:50 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Sat, 27 Jan 2018 21:23:02 -0500, Jason Qian via Python-list wrote: > > > there are 0D 0A 09 > > If your string actually contains CARRIAGE

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-28 Thread Jason Qian via Python-list
Thanks a lot :) os.write(1, message) works ! On Sun, Jan 28, 2018 at 8:04 PM, Dan Stromberg wrote: > How about: > >>> os.write(1, message) > > On Sun, Jan 28, 2018 at 4:51 PM, Jason Qian via Python-list > wrote: > > print(repr(message)) out : >

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-28 Thread Jason Qian via Python-list
Thanks Peter, replace print with os.write fixed the problem. On Sun, Jan 28, 2018 at 3:57 AM, Peter Otten <__pete...@web.de> wrote: > Jason Qian via Python-list wrote: > > > HI > > > >I have a string that contains \r\n\t > > > >[L

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-28 Thread Jason Qian via Python-list
The message type is bytes, this may make different ? print(type(message)) On Sun, Jan 28, 2018 at 8:41 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Sun, 28 Jan 2018 20:31:39 -0500, Jason Qian via Python-list wrote: > > > Thanks a lot :) >

Re: IoT automation

2018-01-28 Thread Dale Marvin via Python-list
On 1/28/18 7:39 AM, Prahallad Achar wrote: Hello team, Could you please help me out in automation of IoT product end to end Regards Prahallad <https://micropython.org/> ? --Dale -- https://mail.python.org/mailman/listinfo/python-list

Re: IoT automation

2018-01-29 Thread Prahallad Achar via Python-list
Thank you Mr. Marvin On 29 Jan 2018 12:02 pm, "Dale Marvin via Python-list" < python-list@python.org> wrote: > On 1/28/18 7:39 AM, Prahallad Achar wrote: > >> Hello team, >> Could you please help me out in automation of IoT product end to end >>

Help on convert PyObject to string (c) Python 3.6

2018-02-04 Thread Jason Qian via Python-list
Hi, This is the case of calling python from c and the python function will return a string. It seems python been called correctly, but got error when convert the python string to c string. -- c -- PyObject* pValue = PyObject_CallObject(pFunc, pArgs); -- python -- import string

Re: Help on convert PyObject to string (c) Python 3.6

2018-02-04 Thread Jason Qian via Python-list
Hi Chris, Thanks a lot ! Using PyUnicode_DecodeUTF8 fix the problem. On Sun, Feb 4, 2018 at 12:02 PM, Chris Angelico wrote: > On Mon, Feb 5, 2018 at 3:52 AM, Jason Qian via Python-list > wrote: > > Hi, > > > >This is the case of calling python from c and th

Help on PyImport_Import(pNAme)

2018-02-04 Thread Jason Qian via Python-list
Hi, This only works when loading modules from the current directory. Is there a way I can load from somewhere else ? Thanks for help, -- https://mail.python.org/mailman/listinfo/python-list

Re: $srcdir and $datadir

2018-02-10 Thread Ben Finney via Python-list
y hard-code them at all, then? So, I am going to have to ignore the “$srcdir and $datadir” specifics, and address the stated intent. The current convention in Python build systems is the Setuptools library. You will be familiar with the ‘setup.py’ top-level script for co-ordinating Setuptools action

"Programs" folder not found.

2018-02-15 Thread Enerel Amgalan via Python-list
Hello! So I downloaded “Python” program in C:>Users>(my name)>AppData>Local>Programs>Python.And then in “Local” folder I can’t find “Programs” folder,but it says it downloaded in “Programs”.So can you help me. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help on convert PyObject to string (c) Python 3.6

2018-02-19 Thread Jason Qian via Python-list
Thanks a lot and I will take a look Cython, On Mon, Feb 19, 2018 at 3:23 PM, Stefan Behnel wrote: > Jason Qian via Python-list schrieb am 04.02.2018 um 17:52: > >This is the case of calling python from c and the python function > will > > return a string. > > Hi J

How to link to python 3.6.4 library on linux ?

2018-02-19 Thread Jason Qian via Python-list
Hi, I am calling python from a c application. It compiles and works fine on the windows. How do I compile and link it on the linux for Python 3.6.4 ? Under python dir, it only have a static library, /opt/Python-3.6.4*/lib*/*libpython3.6m.a* * If I link to it, I

Re: How to link to python 3.6.4 library on linux ?

2018-02-19 Thread Jason Qian via Python-list
Thanks Chris, I think I figured it out that when build python on Linux, we need to enable-shared. Thanks again, On Mon, Feb 19, 2018 at 5:04 PM, Chris Angelico wrote: > On Tue, Feb 20, 2018 at 8:07 AM, Jason Qian via Python-list > wrote: > > Hi, > > > > I am

APPLICATION NOT RUNNING.

2018-03-02 Thread Faruq Bashir via Python-list
I try to run an application with the latest version of python that is python 3.6.4 (32-bit) ., instead of running the application it only shows feel free to mail python-list@python.org if you continue to encounter issues,Please help me out thanks. -- https://mail.python.org/mailman/listinfo

Bypassing firewall

2018-03-05 Thread Faruq Bashir via Python-list
    How will i bypass web application firewall -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-16 Thread Jon Ribbens via Python-list
ds (or indeed any other fixed time period), to a timezone-aware >>datetime in Python, how do I do it? It would appear that, without >>converting to UTC before doing the calculation, you can't. > > Which is probably the recommended means to do just that. Yes, as I've a

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-19 Thread Jon Ribbens via Python-list
5 I don't recognise that format and can't work out what it means. It should be trivial to write functions to parse whatever format you wanted and convert between it and timedelta objects though. > It is obviously fairly easy to rustle up something to do this, but I am > surprised that

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-19 Thread Jon Ribbens via Python-list
also defines a format for durations (e.g. 'P4Y3M' for '4 years 3 months'), I don't think I have ever seen it used in practice - not least because apparently it doesn't define what it actually means. So there isn't one simple standard agreed by everyone that is an obvious candidate for inclusion in language standard libraries. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-19 Thread Jon Ribbens via Python-list
's all in their own slightly-different little niches. There isn't one straightforward standard that makes all or even most of them happy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-19 Thread Jon Ribbens via Python-list
division operation ;-) -- https://mail.python.org/mailman/listinfo/python-list

Re: Why no list as dict key?

2022-04-20 Thread Avi Gross via Python-list
.  Life is complicated. Then you die. -Original Message- From: Chris Angelico To: python-list@python.org Sent: Wed, Apr 20, 2022 3:49 pm Subject: Re: Why no list as dict key? On Thu, 21 Apr 2022 at 05:30, Sam Ezeh wrote: > > Repeating the above points, here is an example of what would

How to have python 2 and 3 both on windows?

2022-04-22 Thread Sunil KR via Python-list
I have some scripts that are old and won't work under python2 and at the same time I am writing new scripts which will use python3. However, if python 2 and 3 cannot co-exist in a windows box it will be impossible to transition What I try:- remove all pythons and launchers- Use windows inst

Re: How to have python 2 and 3 both on windows?

2022-04-22 Thread Sunil KR via Python-list
Please excuse the formatting in my previous message. And it is not complete even, so here is the rest of it. What happens after I follow the above steps: - Upon running one of my python 2 scripts (using python2), I see this error:     """       ^SyntaxError: (unicode error) '

Re: Style for docstring

2022-04-22 Thread Rob Cliffe via Python-list
uot;. Checking out help() on a few functions in the stdlib, they all used "Return" or a grammatical equivalent, so this does seem to be a Python cultural thing.  But why?  To me, "Returns" begins a description as to what the function does, whereas "Return" is an imperat

Re: Style for docstring

2022-04-22 Thread Avi Gross via Python-list
Python does have a concept of "truthy" that includes meaning for not just the standard Booleans but for 0 and non-zero and the empty string and many more odd things such as an object that defines __bool__ (). But saying it returns a Boolean True/False valuesounds direct and

Re: Style for docstring

2022-04-22 Thread Avi Gross via Python-list
d by either style but when documenting what is, I prefer proper English (or any otherlanguage) in communicating what it does for them. As with many such things, if you work for a company or with groups of others, it is wise to find out what is expected and do the same as much as reasonable.

Re: Style for docstring

2022-04-23 Thread Avi Gross via Python-list
. -Original Message- From: Michael F. Stemper To: python-list@python.org Sent: Sat, Apr 23, 2022 8:57 am Subject: Re: Style for docstring On 22/04/2022 21.58, Avi Gross wrote: > Python does have a concept of "truthy" that includes meaning for not just the > standard

Re: How to have python 2 and 3 both on windows?

2022-04-23 Thread Sunil KR via Python-list
I am happy with how the python starts up. When I use python I get python 2.  I am ok with using py -3 for my new scripts, even using the shebang like #!py -3 I don't want to put a unix (or for that matter windows) path in the shebang, as it is not platform portable But the real question/s f

Re: How to have python 2 and 3 both on windows?

2022-04-24 Thread Sunil KR via Python-list
The question is not one of conversion. The question is this: When I have both python 2 and python3, why is my python 2 script breaking? And when I remove python3 the problem goes away? In both cases (regardless of installing python 3 or not) I am using only python 2 to run the python2 script

Re: tail

2022-04-24 Thread Avi Gross via Python-list
wing file, often into a pipeline for further processing. The variant now being mentioned is a sort of "reverse" that has nothing to do with that kind of "tail" except if the implementation is to read the file backwards. A very straightforward way to reverse a file takes perhap

Re: Style for docstring

2022-04-24 Thread Avi Gross via Python-list
t;, "Return(s)": "Text", "Optional-Note": "Text", "French version": DocStringFrench} Too late to seriously change the language now! -Original Message- From: Michael F. Stemper To: python-list@python.org Sent: Sun, Apr 24, 2022 9:24 am Subj

Re: Verifying I installed Python correctly

2022-04-25 Thread Sunil KR via Python-list
cd C:\google-python-exercises> python hello.py this doesn't looks like a valid command. However, is it because a newline got swallowed by misformatting? For clarity, I am reproducing the correct version of the steps: cd /d  C:\google-python-exercises python hello.py The error is:  Th

Re: Style for docstring

2022-04-25 Thread Rob Cliffe via Python-list
items which are frobby and composes a nangle of the items. ''' I very much like the concise imperative opening sentence, sometimes 2 sentences. Then the elaboration if the function isn't trivially obvious. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Printing Unicode strings in a list

2022-04-28 Thread Jon Ribbens via Python-list
On 2022-04-28, Stephen Tucker wrote: > Hi PythonList Members, > > Consider the following log from a run of IDLE: > >== > > Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] > on win32 > Type "copyright", "cr

Re: Printing Unicode strings in a list

2022-04-28 Thread Rob Cliffe via Python-list
On 28/04/2022 14:27, Stephen Tucker wrote: To Cameron Simpson, Thanks for your in-depth and helpful reply. I have noted it and will be giving it close attention when I can. The main reason why I am still using Python 2.x is that my colleagues are still using a GIS system that has a Python

Re: Python/New/Learn

2022-05-04 Thread Avi Gross via Python-list
https://wiki.python.org/moin/PythonBooks -Original Message- From: Patrick 0511 To: python-list@python.org Sent: Wed, May 4, 2022 9:36 pm Subject: Python/New/Learn Hello, I'm completely new here and don't know anything about python. Can someone tell me how best to start? So w

Re: Python/New/Learn

2022-05-04 Thread Avi Gross via Python-list
Chris, It was an extremely open-ended question to a forum where most of the readers are more advanced, at least I think. My library has oodles of Python Books for free to borrow on paper and return and I have read many of them. There are various e-books too, and of course lots of free internet

Re: Python/New/Learn

2022-05-04 Thread Avi Gross via Python-list
I agree Chris that the Ukrainian Python Books are daunting as I barely started learning that language now even though my early years were just a few miles away and I might even have relatives still there! But as has been pointed out, suggestions are more helpful if you know a bit more about

Re: Python/New/Learn

2022-05-05 Thread Avi Gross via Python-list
calls asking if I want to sell my house ... -Original Message- From: Schachner, Joseph To: Patrick 0511 ; python-list@python.org Sent: Thu, May 5, 2022 12:04 pm Subject: RE: Python/New/Learn Buy the book "Python 101" and do the examples.  When you're done with that buy

Re: Python/New/Learn

2022-05-06 Thread Avi Gross via Python-list
This topic has rapidly shifted over way beyond Python even as the original  person has not returned to participate. There are many ways to teach anything and since the classical method was to learn in person from someone using mainly sound or pantomime, it has hung on. Even with the existence

Re: tail

2022-05-07 Thread Avi Gross via Python-list
general purpose tool, internationalization from ASCII has created a challenge for lots of such tools. -Original Message- From: Marco Sulla To: Dennis Lee Bieber Cc: python-list@python.org Sent: Sat, May 7, 2022 9:21 am Subject: Re: tail On Sat, 7 May 2022 at 01:03, Dennis Lee Bieber wrote: > >

Re: tail

2022-05-11 Thread Avi Gross via Python-list
than how to stepwise make changes in a pipeline so reading from the beginning to end was not an issue. -Original Message- From: Marco Sulla To: Chris Angelico Cc: python-list@python.org Sent: Wed, May 11, 2022 5:27 pm Subject: Re: tail On Wed, 11 May 2022 at 22:09, Chris Angelico wrote

Re: tail

2022-05-11 Thread Avi Gross via Python-list
numpy/pandas in Python often provide functions with names like head or tail as do other languages where data structures with names like data.frame are commonly used. These structures are in some way indexed to make it easy to jump towards the end. Text files are not. Efficiency aside, a 3-year-old

Re: .0 in name

2022-05-13 Thread Avi Gross via Python-list
rame with embedded spaces and other anomalies requiring special handling. So why you wonder where it is documented that variables cannot be what you feel like is a bit puzzling!  -Original Message- From: bryangan41 To: python-list@python.org Sent: Fri, May 13, 2022 12:47 pm Subject: .0 i

Re: .0 in name

2022-05-13 Thread Avi Gross via Python-list
Boy do I hate when I see my code mangled by the stupid AOL mailer. Not that anyone cares, but the code should be read with each line starting with the "> " prompt. If I leave lots of blank lines, it may work, but as the illustration is not in python, I will now remove the pro

Re: .0 in name

2022-05-13 Thread Avi Gross via Python-list
t it to be. But although starting with a numeral is verboten for variable names, may I suggest that a relatively invisible character can make a name like _3CPO that will be allowed. But be careful as Python programs often have conventions on use of the underscore and don't even think about a

Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
I was shocked to discover that when repeatedly running the following program (condensed from a "real" program) under Python 3.8.3 for p in { ('x','y'), ('y','x') }:     print(p) the output was sometimes ('y', 'x') (&

Re: Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
On 16/05/2022 04:13, Dan Stromberg wrote: On Sun, May 15, 2022 at 8:01 PM Rob Cliffe via Python-list wrote: I was shocked to discover that when repeatedly running the following program (condensed from a "real" program) under Python 3.8.3 for p in { ('x

Re: Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
Thanks, Paul.  Question answered! Rob Cliffe On 16/05/2022 04:36, Paul Bryan wrote: This may explain it: https://stackoverflow.com/questions/27522626/hash-function-in-python-3-3-returns-different-results-between-sessions On Mon, 2022-05-16 at 04:20 +0100, Rob Cliffe via Python-list wrote

Re: Python & nmap

2022-05-18 Thread Jon Ribbens via Python-list
ate']) for x in nm.all_hosts()] > for host, status in hosts_list: > print('{0}:{1}'.host) > > THE OUTPUT > ----- > Traceback (most recent call last): >File "/home/gabriele/Documenti

ANN: A new version (0.4.9) of python-gnupg has been released.

2022-05-20 Thread Vinay Sajip via Python-list
especially bug reports [3], patches and suggestions for improvement, or any other points via this group). Enjoy! Cheers Vinay Sajip [1] https://github.com/vsajip/python-gnupg [2] https://pypi.org/project/python-gnupg/0.4.9 [3] https://github.com/vsajip/python-gnupg/issues [4] https://github.com/vsa

Re: oop issue

2022-05-23 Thread Avi Gross via Python-list
get you up to speed, but then again, we often find out someone is given a homework assignment ... -Original Message- From: Tola Oj To: python-list@python.org Sent: Mon, May 23, 2022 4:54 pm Subject: oop issue i just finished learning oop as a beginner and trying to practice with i

Re: Problems with Python

2022-05-31 Thread Howard Samuels via Python-list
Good day I am new to programming.  I have signed up for a virtual online course and installed Python using Anaconda as well as jupyter notebook. I encountered problems & then went to YouTube tried going directly to the python website and used Pycharm. When I used pycharm and try to run

Re: How to test characters of a string

2022-06-07 Thread Avi Gross via Python-list
the original (perhaps with some normalization of case and whitespace, fine. If not will they match if one or both have something to remove as a prefix such as "02 ". And if you are comparing items where the same song is in two different numeric sequences on different disks, ...

Re: How to replace characters in a string?

2022-06-08 Thread Jon Ribbens via Python-list
x27;, 8722: '-', 8216: "'", 8217: "'", 8220: '"', 8221: '"', 64256: 'ff', 160: ' ', 64260: 'ffl', 8198: ' ', 230: 'ae', 12288: ' ', 173: '', 497: 'DZ', 498: 'Dz', 499: 'dz', 64259: 'ffi', 8230: '...', 64257: 'fi', 64262: 'st'}) If you want to go further then the Unidecode package might be helpful: https://pypi.org/project/Unidecode/ -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace characters in a string?

2022-06-08 Thread Avi Gross via Python-list
"Black Polish" would match a song about keeping your shoes dark with "black polish" so I keep repeating it is very hard or frankly impossible, to catch every case I can imagine and the many I can't! But the emphasis here is not your overall problem. It is about whe

Re: How to test characters of a string

2022-06-09 Thread Avi Gross via Python-list
stored as names and you keep finding new variants. Yes, if your goal is to use this as a way to learn more in general about Python, clearly it may meet that goal! Contrary to what I (and some others) said earlier, it may be time to consider  regular expressions and other heavier artillery! LOL

Re: Missing global # gdal DRIVER_NAME declaration in gdal_array.py

2022-06-09 Thread Payton Ireland via Python-list
On Tuesday, March 8, 2022 at 12:52:29 PM UTC-6, Shaozhong SHI wrote: > The following warning kept coming up when running ogr2ogr. > > Warning 1: Missing global # gdal: DRIVER_NAME declaration in > C:\Users\AppData\Local\Programs\Python\Python36\Lib\site-packages\osgeo\g

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Avi Gross via Python-list
. Consider using a search engine before posting. Throw in a few words like  "python pretty print dictionary function" and refine that if it does not get you immediate results. It is free and easy and does not waste time for so many others who already know or don't care. And conside

Re: fill out bulletins

2022-06-14 Thread Avi Gross via Python-list
printed will happen to write over the same spots. As to what tools you can use, there are many to choose from. You asked on a Python list so you may want some of the Python Graphics utilities. In R, I might use ggplot which lets me set a background layer then draw objects above it at various

What's up with modern Python programmers rewriting everything in Rust?

2022-06-20 Thread jan Anja via Python-list
Dude, it's called CPython for a reason. -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-20 Thread Avi Gross via Python-list
This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called? C++Python CPython++ C+Python+ DPython SeaPython? SeeSeaSiPython I don't even want to think fo what sound a C# Python would make. OK, my apologies to all. Bei

Re: "CPython"

2022-06-21 Thread Avi Gross via Python-list
If we want to be humorous, RPython would obviously either be written in R, which really is not designed well for such purposes, or would be some kind of synthesis that already exists that allows you to run R and python code interchangeably on sort of shared data that I sometimes do in RSTUDIO

Re: "CPython"

2022-06-23 Thread Avi Gross via Python-list
it has it's features but have had no  opportunity to use it. Is it expected to make a faster version of Python, or enable better connections to libraries and so on?  What I mean is that if you are planning on making it pass all tests for python functionality, are you also adding unique featur

Re: "CPython"

2022-06-24 Thread Avi Gross via Python-list
with many modules now available or keep up with changes as python adds features or fixes bugs. I am curious about why something like numpy could not be integrated into what you do. Of course, if you are the only user, ... My hobbies to spend my time may not be as ambitious, but are quite a bit more

REPL with multiple function definitions

2022-06-26 Thread Rob Cliffe via Python-list
This 2-line program def f(): pass def g(): pass runs silently (no Exception).  But: 23:07:02 c:\>python Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license&qu

Re: REPL with multiple function definitions

2022-06-26 Thread Jon Ribbens via Python-list
On 2022-06-26, Rob Cliffe wrote: > This 2-line program > > def f(): pass > def g(): pass > > runs silently (no Exception).  But: > > 23:07:02 c:\>python > Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 > bit (Intel)] on win32 > Ty

Re: REPL with multiple function definitions

2022-06-28 Thread Rob Cliffe via Python-list
On 26/06/2022 23:22, Jon Ribbens via Python-list wrote: On 2022-06-26, Rob Cliffe wrote: This 2-line program def f(): pass def g(): pass runs silently (no Exception).  But: 23:07:02 c:\>python Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on wi

Byte arrays and DLLs

2022-06-30 Thread Rob Cliffe via Python-list
Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Byte arrays and DLLs

2022-07-03 Thread Rob Cliffe via Python-list
That worked.  Many thanks Eryk. Rob On 30/06/2022 23:45, Eryk Sun wrote: On 6/30/22, Rob Cliffe via Python-list wrote: AKAIK it is not possible to give ctypes a bytearray object and persuade it to give you a pointer to the actual array data, suitable for passing to a DLL. You're overlo

Re: NILEARN - WHY THIS CODE THROWS AN ERROR?????

2022-07-08 Thread Avi Gross via Python-list
Nati Stern has asked several questions here, often about relatively technical uses of python code that many of us have never used and still is not providing more exact info that tends to be needed before anyone can even think of diagnosing the problem. I have learned to stay away from some

Re: what's the problem??????

2022-07-13 Thread Avi Gross via Python-list
=labels.to_dict() If the labels variable had a method like that, that is also a way. So be specific about what LINE or region of code and what is wrong and what you already tried or error messages you got. Avi -Original Message- From: נתי שטרן To: Neuroimaging analysis in Python ; python

ANN: distlib 0.3.5 released on PyPI

2022-07-14 Thread Vinay Sajip via Python-list
dists()``. * Fixed #172: Compute ABI correctly for Python < 3.8. * Changed the default locator configuration. * Made updates in support of PEP 643 / Metadata 2.2. * Updated launcher executables. Thanks to Michael Bikovitsky for his help with   the launcher changes. * Updated to write archive

<    20   21   22   23   24   25   26   27   28   29   >