Use of statement 'global' in scripts.

2024-05-07 Thread Popov, Dmitry Yu via Python-list
Dear Sirs. The statement 'global', indicating variables living in the global scope, is very suitable to be used in modules. I'm wondering whether in scripts, running at the top-level invocation of the interpreter, statement 'global' is used exactly the same way as in modules? If there are any d

Re: Use of statement 'global' in scripts.

2024-05-08 Thread Popov, Dmitry Yu via Python-list
Thank you! From: Python-list on behalf of Greg Ewing via Python-list Sent: Wednesday, May 8, 2024 3:56 AM To: [email protected] Subject: Re: Use of statement 'global' in scripts. On 8/05/24 1: 32 pm, Popov, Dmitry Yu wrote: > The stat

Version of NymPy

2024-05-15 Thread Popov, Dmitry Yu via Python-list
What would be the easiest way to learn which version of NumPy I have with my Anaconda distribution? -- https://mail.python.org/mailman/listinfo/python-list

Re: Version of NymPy

2024-05-15 Thread Popov, Dmitry Yu via Python-list
Thank you. From: Larry Martell Sent: Wednesday, May 15, 2024 1:55 PM To: Popov, Dmitry Yu Cc: Popov, Dmitry Yu via Python-list Subject: Re: Version of NymPy On Wed, May 15, 2024 at 2: 43 PM Popov, Dmitry Yu via Python-list wrote: > > What would be the e

Re: Terminal Emulator

2024-05-18 Thread Peter J. Holzer via Python-list
On 2024-05-14 16:03:33 -0400, Grant Edwards via Python-list wrote: > On 2024-05-14, Alan Gauld via Python-list wrote: > > On 14/05/2024 18:44, Gordinator via Python-list wrote: > > > >> I wish to write a terminal emulator in Python. I am a fairly > >> competent

Re: Terminal Emulator

2024-05-18 Thread Peter J. Holzer via Python-list
On 2024-05-14 22:37:17 +0200, Mirko via Python-list wrote: > Am 14.05.24 um 19:44 schrieb Gordinator via Python-list: > > I wish to write a terminal emulator in Python. I am a fairly competent > > Python user, and I wish to try a new project idea. What references can I > >

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-18 Thread Peter J. Holzer via Python-list
On 2024-05-16 19:46:07 +0100, Gordinator via Python-list wrote: > To be fair, the problem is the fact that they use Windows (but I guess Linux > users have to deal with venvs, so we're even. I don't think Linux users have to deal with venvs any more than Windows users. Maybe e

Re: PyCon

2024-05-18 Thread Abdur-Rahmaan Janhangeer via Python-list
rtell via Python-list, < [email protected]> wrote: > I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: PyCon

2024-05-18 Thread Abdur-Rahmaan Janhangeer via Python-list
Two interesting ones: - Norwegian library: https://fosstodon.org/@osdotsystem/112459312723574625 - One about if Ai will take our jobs, using py to find out and she concludes it will On Sat, 18 May 2024, 14:15 Chris Angelico via Python-list, < [email protected]> wrote: > On Sun, 19

venvs vs. package management (was: Terminal Emulator (Posting On Python-List Prohibited))

2024-05-18 Thread Peter J. Holzer via Python-list
On 2024-05-18 20:12:33 +0200, Piergiorgio Sartor via Python-list wrote: > On 18/05/2024 20.04, Mats Wichmann wrote: > > So venvs make managing all that pretty convenient. Dunno why everybody's > > so down on venvs... > > Only people which are *not* using python... :-) &g

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-20 Thread Peter J. Holzer via Python-list
On 2024-05-20 00:26:03 +0200, Roel Schroeven via Python-list wrote: > Skip Montanaro via Python-list schreef op 20/05/2024 om 0:08: > > > Modern debian (ubuntu) and fedora block users installing using pip. > > > > Even if you're telling it to install in ~/.local? I

Can't trap paramiko runtime trace-back error

2024-05-22 Thread Vinode Singh Ujlain via Python-list
When running the code below , I get error as enumerated below. Why am I not able to trap this paramiko runtime traceback in try-except block ? Exception (client): Error reading SSH protocol banner Traceback (most recent call last):   File "/home/uzi/.local/lib/python3.8/site-packages/paramiko/t

Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Kevin M. Wilson via Python-list
The following is my effort to understand how to process a string, letter, by letter: def myfunc(name):        index = 0    howmax = len(name)    # while (index <= howmax):    while (index < howmax):        if (index % 2 == 0):            print('letter to upper = {}, index {}!'.format(name[index]

Fw: Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Kevin M. Wilson via Python-list
sweep over you. When you walk through the fire, you will not be burned: the flames will not set you ablaze."      Isaiah 43:2 - Forwarded Message - From: Kevin M. Wilson via Python-list To: [email protected] Sent: Tuesday, May 28, 2024 at 10:35:23 PM MDTSubject: Fl

Re: From JoyceUlysses.txt -- words occurring exactly once

2024-05-31 Thread Pieter van Oostrum via Python-list
HenHanna writes: > Given a text file of a novel (JoyceUlysses.txt) ... > > could someone give me a pretty fast (and simple) Python program that'd > give me a list of all words occurring exactly once? > > -- Also, a list of words occurring once, twice or 3 times > > > > re: hyphenate

Re: From JoyceUlysses.txt -- words occurring exactly once

2024-06-01 Thread Peter J. Holzer via Python-list
On 2024-05-30 19:26:37 -0700, HenHanna via Python-list wrote: > hard to decide what to do with hyphens >and apostrophes > (I'd, he's, can't, haven't, A's and B's) Especially since the same character is used as both an apost

Re: Lprint = ( Lisp-style printing ( of lists and strings (etc.) ) in Python )

2024-06-01 Thread Peter J. Holzer via Python-list
On 2024-05-30 21:47:14 -0700, HenHanna via Python-list wrote: > [('the', 36225), ('and', 17551), ('of', 16759), ('i', 16696), ('a', 15816), > ('to', 15722), ('that', 11252), ('in', 10743), ('it', 10

Re: IDLE: clearing the screen

2024-06-10 Thread Michael F. Stemper via Python-list
On 10/06/2024 09.32, Stefan Ram wrote: "Michael F. Stemper" wrote or quoted: On 08/06/2024 14.18, Rob Cliffe wrote: OK, here is the advanced version: import os class _cls(object):     def __repr__(self):         os.system('cls')         return '' cls = _cls() ... Why have it return any

Re: IDLE: clearing the screen

2024-06-10 Thread Michael F. Stemper via Python-list
On 08/06/2024 14.18, Rob Cliffe wrote: OK, here is the advanced version: import os class _cls(object):     def __repr__(self):         os.system('cls')         return '' cls = _cls() Now when you type cls it clears the screen.  The only flaw is that there is a blank line at the very top of th

Re: Suggested python feature: allowing except in context maneger

2024-06-16 Thread Albert-Jan Roskam via Python-list
The example exception is not what bothers me. The syntax change is nowhere near as useful as `with` and context managers. They provide an excellent idiom for resource usage and release. Your suggestion complicates the `with` statement and brings only a tiny indentation red

Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )

2024-06-18 Thread Peter J. Holzer via Python-list
On 2024-06-14 06:10:06 -, candycanearter07 via Python-list wrote: > Phil Carmody wrote at 12:01 this Thursday (GMT): > > I'd say you can't beat the verbosity, or lack thereof of just plain > > zsh/bash: > > $ echo {1,2,3,4}0{1,2,3} > > 101 102 10

Timezone in HH:MM Format

2024-06-18 Thread Ivan "Rambius&quot; Ivanov via Python-list
Hello, How can I convert a date, usually datetime.now(), into a format where the timezone is in hours:minutes format. I was able to get that format in shell: $ date +%Y-%m-%dT%H:%M:%S%:z 2024-06-18T19:24:09-04:00 The closest I got in python is from datetime import datetime from zoneinfo import

Re: Timezone in HH:MM Format

2024-06-18 Thread Ivan "Rambius&quot; Ivanov via Python-list
Thank you all for your responses! On Tue, Jun 18, 2024 at 9:54 PM Jon Ribbens via Python-list wrote: > > datetime.now(ZoneInfo("America/New_York")).isoformat() Both .isoformat() and "%:z" work. -- Tangra Mega Rock: http://www.radiotangra.com -- https://mail.p

Tkinter and astral characters (was: Decoding bytes to text strings in Python 2)

2024-06-24 Thread Peter J. Holzer via Python-list
On 2024-06-24 01:14:22 +0100, MRAB via Python-list wrote: > Tkinter in recent versions of Python can handle astral characters, at least > back to Python 3.8, the oldest I have on my Windows PC. I just tried modifying https://docs.python.org/3/library/tkinter.html#a-hello-world-program to d

Re: Difference method vs attribut = function

2024-06-29 Thread Peter J. Holzer via Python-list
On 2024-06-28 18:08:54 +0200, Ulrich Goebel via Python-list wrote: > a class can have methods, and it can have attributes, which can hold a > function. Both is well known, of course. > > My question: Is there any difference? > > The code snipped shows that both do what t

Relatively prime integers in NumPy

2024-07-11 Thread Popov, Dmitry Yu via Python-list
Dear Sirs. Does NumPy provide a simple mechanism to identify relatively prime integers, i.e. integers which don't have a common factor other than +1 or -1? For example, in case of this array: [[1,5,8], [2,4,8], [3,3,9]] I can imagine a function which would return array of common factors alon

Re: Relatively prime integers in NumPy

2024-07-12 Thread Peter J. Holzer via Python-list
On 2024-07-08 19:09:45 +, Popov, Dmitry Yu via Python-list wrote: > Does NumPy provide a simple mechanism to identify relatively prime > integers, i.e. integers which don't have a common factor other than +1 > or -1? Typing "numpy gcd" into my favourite search en

Re: Best use of "open" context manager

2024-07-12 Thread Albert-Jan Roskam via Python-list
Or like below, although pylint complains about this: "consider using with". Less indentation this way. f = None try: f = open(FILENAME) records = f.readlines() except Exception: sys.exit(1) finally: if f is not None: f.close() -- https://mai

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
vely prime integers h,k,l pass to this block of the code From: [email protected] Sent: Thursday, July 11, 2024 1:22 PM To: Popov, Dmitry Yu ; 'Popov, Dmitry Yu via Python-list' Subject: RE: Relatively prime integers in NumPy Дмитрий, You may think you explained what you

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
, Dmitry Yu via Python-list Sent: Thursday, July 11, 2024 2:25 PM To: [email protected] ; 'Popov, Dmitry Yu via Python-list' Subject: Re: Relatively prime integers in NumPy Thank you for your interest. My explanation is too concise indeed, sorry. So far, I have used Python code

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
Thank you very much. List comprehensions make code much more concise indeed. Do list comprehensions also improve the speed of calculations? From: [email protected] Sent: Friday, July 12, 2024 6:57 PM To: Popov, Dmitry Yu ; 'Popov, Dmitry Yu via Python

Re: Help needed - - running into issues with python and its tools

2024-08-04 Thread Peter J. Holzer via Python-list
On 2024-08-03 15:17:11 -0500, o1bigtenor via Python-list wrote: > One of the tools I need to be able to use is esptools - - well in the > devuan world you need to run that on either Devaun 3 or 5 - - - its just > not available on devuan 4. Couldn't you just upgrade to Devuan 5, t

Re: Error codes

2024-08-13 Thread Albert-Jan Roskam via Python-list
On Aug 13, 2024 15:29, Barry Scott via Python-list wrote: > Could not find file 'C:\Users\Charl\OneDrive\Documents\The Sims 4 Mod Constructor\Projects\MetalMummysMods_Ehlers-DanlosMod\Python\__pycache__\MetalMummysMods_Ehlers-DanlosMod.cpython-37.pyc'. >

pdb: How to use the 'break' parameter?

2024-08-21 Thread Kevin M. Wilson via Python-list
break (Old_MacDonald:23 | name[indx] == 'd', indx = 4), based on the doc spec in python.org (https://docs.python.org/3/library/pdb.html#debugger-commands) Cell In[1], line 20 break (Old_MacDonald:23 | name[indx] == 'd', indx = 4) ^ SyntaxError: invalid syntax I got one blan

Re: pdb: How to use the 'break' parameter?

2024-08-21 Thread Peter J. Holzer via Python-list
On 2024-08-22 01:44:35 +, Kevin M. Wilson via Python-list wrote: > break (Old_MacDonald:23 | name[indx] == 'd', indx = 4), based on the doc spec > in python.org (https://docs.python.org/3/library/pdb.html#debugger-commands) > Cell In[1], line 20 > break (Old_Ma

ANN: EmPy 4.2 -- a powerful, robust and mature templating system for Python

2024-08-25 Thread Erik Max Francis via Python-list
# EmPy 4.2 release announcement I'm pleased to announce the release of EmPy 4.2. The 4._x_ series is a modernization of the software and a revamp of the EmPy system to update its feature set and make it more consistent with the latest Python versions and practices. EmPy 4._x_ was also relicense

Re: Sanitise user input for a script

2024-08-30 Thread Peter J. Holzer via Python-list
On 2024-08-30 19:18:29 +, Simon Connah via Python-list wrote: > I need to write a script that will take some user input (supplied on a > website) and then execute a Python script on a host via SSH. I'm > curious what the best options are for protecting against malicious >

Re: ListAdmin: Is list/archive working correctly?

2024-08-31 Thread Albert-Jan Roskam via Python-list
I also think that list/archive isn't working properly. Very little emails. Before, this was quite a busy list. -- https://mail.python.org/mailman/listinfo/python-list

Synchronise annotations -> docstring

2024-09-03 Thread Albert-Jan Roskam via Python-list
Hi, Are there any tools that check whether type annotations and Numpydoc strings are consistent? I did find this Vim plugin: https://lxyuan0420.github.io/posts/til-vim-pydocstring-plugin. Looks incredibly useful, but I haven't tried it yet. Thanks! AJ -- https://mail.python

Unofficial PyBitmessage port to run with Python3 and PyQt5

2024-09-05 Thread 711 Spooky Mart via Python-list
from https://www.reddit.com/r/bitmessage/comments/1d5ff18/unofficial_pybitmessage_port_to_run_with_python3/ Unofficial PyBitmessage port to run with Python3 and PyQt5 The official PyBitmessage still runs with outdated Python2 and PyQt4. Recently, I'm trying to port PyBitmessage to run with Pyth

PyBitmessage is not dead. Ignore the FUD.

2024-09-05 Thread 711 Spooky Mart via Python-list
from [chan] bitmessage PyBitmessage is not dead. Ignore the FUD. I think Peter and gang just got tired of responding to this recurring claim. I wouldn't even expect a rebuttal from them at this point. Newer forks have been under development, one in Python3 and one in Rust. Here is the PyBitmes

Python3 Fork of BMWrapper

2024-09-05 Thread 711 Spooky Mart via Python-list
from https://github.com/kashikoibumi/bmwrapper bmwrapper is a poorly hacked together python script to let Thunderbird and PyBitmessage communicate, similar to AyrA's (generally much better) application: Bitmessage2Mail. I'm on Linux, and don't feel like dealing with wine. So I wrote this to fil

BitChan (python project)

2024-09-05 Thread 711 Spooky Mart via Python-list
from https://github.com/813492291816/BitChan BitChan is a decentralized anonymous imageboard inspired by BitBoard and built on top of Bitmessage with Tor, I2P, and GnuPG. BitChan solves a number of security and free speech problems that have plagued most imageboards. Centralized imageboards can

installation error

2015-12-18 Thread IBRAHIM ARANSIOLA RIDWAN via Python-list
Hi, My name is ridwan and I have a problem with installing the version 3.5.1 on my windows 10 system. My question is those python have specified compatibility issues or I downloaded the wrong version for my operating system, or do I need to change my system settings in some aspect. Thank you in

programeren met python

2016-03-13 Thread Imre De Craemer via Python-list
hoe moet je python dounlauden -- https://mail.python.org/mailman/listinfo/python-list

Re: DRM is self-defeating (was: Encrypt python files)

2015-05-06 Thread Albert-Jan Roskam via Python-list
- On Wed, May 6, 2015 9:41 AM CEST Ben Finney wrote: >Palpandi writes: > >> On Wednesday, May 6, 2015 at 12:07:13 PM UTC+5:30, Palpandi wrote: > >> > What are the ways to encrypt python files? >> >> No, I just want to hide the scripts from others. > >Which others? You

Re: Encrypt python files

2015-05-06 Thread Albert-Jan Roskam via Python-list
- On Wed, May 6, 2015 11:04 AM CEST Steven D'Aprano wrote: >On Wednesday 06 May 2015 17:23, Palpandi wrote: > >> On Wednesday, May 6, 2015 at 12:07:13 PM UTC+5:30, Palpandi wrote: >> Hi, >> >> What are the ways to encrypt python files? >> >> No, I just want to hide t

Re: Why does unicode-escape decode escape symbols that are already escaped?

2015-05-10 Thread Albert-Jan Roskam via Python-list
- On Sun, May 10, 2015 5:53 PM CEST Somelauw . wrote: >In Python 3, decoding "€" with unicode-escape returns 'â\x82¬' which in my >opinion doesn't make sense. >The € already is decoded; if it were encoded it would look like this: >'\u20ac'. >So why is it doing this? >

Re: Updating a package on PyPi, testing and etiquette

2015-05-12 Thread Albert-Jan Roskam via Python-list
- On Tue, May 12, 2015 8:01 PM CEST Rob Gaddi wrote: >So I've got a package I put up on PyPi a while back (ctypes-bitfield, if >it matters). For version 0.2.6 I had access to some older versions of >Python and was able to run my test suite on Python 2.6 and 3.0. > >

Re: Looking for direction

2015-05-14 Thread Albert-Jan Roskam via Python-list
- On Thu, May 14, 2015 3:35 PM CEST Dennis Lee Bieber wrote: >On Wed, 13 May 2015 16:24:30 -0700, 20/20 Lab declaimed >the following: > >>Now is were I have my problem: >> >>myList = [ [123, "XXX", "Item", "Qty", "Noise"], >>[72976, "YYY", "Item", "Qty", "

Re: need help with an accessibility prototype

2015-05-22 Thread Albert-Jan Roskam via Python-list
- On Fri, May 22, 2015 9:50 PM CEST Laura Creighton wrote: >In a message of Fri, 22 May 2015 12:29:20 -0400, "Eric S. Johansson" writes: >>2 needs. first is determining if NaturallySpeaking injects keycodes or >>ascii char into the windows input queue. second is bui

programmatically change windows regional settings?

2015-05-24 Thread Albert-Jan Roskam via Python-list
Hi, In Windows I can change the regional settings manually in the control panel. But how do I do this programmatically? I tried setting LANG but this does not work in Windows. Kernel32's SetLocaleInfo sounds promising, but "This setting only affects the user override portion of the locale se

Re: programmatically change windows regional settings?

2015-05-24 Thread Albert-Jan Roskam via Python-list
- On Sun, May 24, 2015 3:07 PM CEST Mark Lawrence wrote: >On 24/05/2015 13:50, Albert-Jan Roskam via Python-list wrote: >> >> Hi, >> >> In Windows I can change the regional settings manually in the control panel. >> But how do I

Re: programmatically change windows regional settings?

2015-05-24 Thread Albert-Jan Roskam via Python-list
- On Sun, May 24, 2015 4:45 PM CEST Laura Creighton wrote: >In a message of Sun, 24 May 2015 14:07:37 +0100, Mark Lawrence writes: >>On 24/05/2015 13:50, Albert-Jan Roskam via Python-list wrote: >> >> Hi, >> >> In Windows I can change

Re: What is considered an "advanced" topic in Python?

2015-05-30 Thread Albert-Jan Roskam via Python-list
Metaclasses, abc, asyncio, ast, some of the dunder methods, eg __del__, weakref, perhaps gc-- https://mail.python.org/mailman/listinfo/python-list

Re: Find in ipython3

2015-06-06 Thread Albert-Jan Roskam via Python-list
"To run any command at the system shell, simply prefix it with !" See: https://ipython.org/ipython-doc/dev/interactive/tutorial.html-- https://mail.python.org/mailman/listinfo/python-list

How to find number of whole weeks between dates?

2015-06-10 Thread Sebastian M Cheung via Python-list
Say in 2014 April to May whole weeks would be 7th, 14th 28th April and May would be 5th, 12th and 19th. So expecting 7 whole weeks in total -- https://mail.python.org/mailman/listinfo/python-list

Re: How to find number of whole weeks between dates?

2015-06-10 Thread Sebastian M Cheung via Python-list
On Wednesday, June 10, 2015 at 6:06:09 PM UTC+1, Sebastian M Cheung wrote: > Say in 2014 April to May whole weeks would be 7th, 14th 28th April and May > would be 5th, 12th and 19th. So expecting 7 whole weeks in total What I mean is given two dates I want to find WHOLE weeks, so if given the 20

Re: How to find number of whole weeks between dates?

2015-06-10 Thread Sebastian M Cheung via Python-list
yes just whole weeks given any two months, I did looked into calendar module but couldn't find specifically what i need. -- https://mail.python.org/mailman/listinfo/python-list

How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread Sebastian M Cheung via Python-list
How to pretty mathematical formulas in Python? Similar to Mathematica formats. Are there good packages to prettify mathematica formulas in Python? -- https://mail.python.org/mailman/listinfo/python-list

Re: How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread Sebastian M Cheung via Python-list
On Thursday, June 11, 2015 at 7:33:12 PM UTC+1, Sebastian M Cheung wrote: > How to pretty mathematical formulas in Python? Similar to Mathematica formats. > > Are there good packages to prettify mathematica formulas in Python? Thanks Pythonistas -- https://mail.python.org/mailman/listinfo/python

XCode and Python

2015-06-11 Thread Sebastian M Cheung via Python-list
For some reason I cannot build now in XCode: $ xcodebuild -find python /Users/sebc/anaconda/bin/python $python Python 2.7.10 |Anaconda 2.2.0 (x86_64)| (default, May 28 2015, 17:04:42) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more informat

Re: XCode and Python

2015-06-11 Thread Sebastian M Cheung via Python-list
On Thursday, June 11, 2015 at 11:07:59 PM UTC+1, Sebastian M Cheung wrote: > For some reason I cannot build now in XCode: > > $ xcodebuild -find python > /Users/sebc/anaconda/bin/python > > $python > Python 2.7.10 |Anaconda 2.2.0 (x86_64)| (default, May 28 2015, 17:04:42) > [GCC 4.2.1 (Apple Inc

Java to Python autoconverters

2015-06-12 Thread Sebastian M Cheung via Python-list
Are these available? Any good ones to recommend? -- https://mail.python.org/mailman/listinfo/python-list

python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
How to do financial data cleaning ? Say I assume a list of 1000 finance series data in myList = Open, High, Low and Close. For missing Close Price data, What is best practice to clean data in Python -- https://mail.python.org/mailman/listinfo/python-list

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 11:13:07 AM UTC+1, Sebastian M Cheung wrote: > How to do financial data cleaning ? Say I assume a list of 1000 finance > series data in myList = Open, High, Low and Close. For missing Close Price > data, What is best practice to clean data in Python Thanks Mark just l

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 12:35:18 PM UTC+1, Laura Creighton wrote: > I don't know anything about this program, and in particular how > complete it is, but worth a look > https://github.com/benjaminmgross/clean-fin-data > > Laura Thanks Laura, I will check it out, but basically it is to clean f

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 11:19:48 AM UTC+1, Mark Lawrence wrote: > On 15/06/2015 11:12, Sebastian M Cheung via Python-list wrote: > > How to do financial data cleaning ? Say I assume a list of 1000 finance > > series data in myList = Open, High, Low and Close. For missing Close

anaconda upgrade

2015-06-17 Thread Sebastian M Cheung via Python-list
What is the best way to upgrade an existing virtual environment anaconda from 2.7.9 to 2.7.10 -- https://mail.python.org/mailman/listinfo/python-list

Re: How to check in script if Python or Jython is used

2015-06-21 Thread Albert-Jan Roskam via Python-list
Sun, Jun 21, 2015 12:24 PM CEST Cecil Westerhof wrote: >On Sunday 21 Jun 2015 11:22 CEST, Laura Creighton wrote: > >> In a message of Sun, 21 Jun 2015 10:12:06 +0200, Cecil Westerhof >> writes: >> I installed Jython and will start playing with it. There probably >> will

windows and file names > 256 bytes

2015-06-24 Thread Albert-Jan Roskam via Python-list
Hi, Consider the following calls, where very_long_path is more than 256 bytes: [1] os.mkdir(very_long_path) [2] os.getsize(very_long_path) [3] shutil.rmtree(very_long_path) I am using Python 2.7 and [1] and [2] fail under Windows XP [3] fails under Win7 (not sure about XP). This is even when I u

Python 3.5.0 Feedback

2015-10-17 Thread Nils-Hero Lindemann via Python-list
Hallo, Zuerst mal, ein dickes Danke an alle, die an Python mitarbeiten! Hier ein paar Dinge, die mir an 3.5.0 aufgefallen sind (ich komme von 3.2.3): === Informitis === * Die Namen der Links im Startmenü und die erste Zeile der interaktiven Kommandozeile sind von (noch größerer) Informitis befa

Re: Correct syntax for pathological re.search()

2024-10-08 Thread Michael F. Stemper via Python-list
On 07/10/2024 08.56, Stefan Ram wrote: "Michael F. Stemper" wrote or quoted: if not re.search("\\sout\{", line): So, if you're not down to slap an "r" before your string literals, you're going to end up doubling down on every backslash. Never heard of that before, but it did the trick

Re: Correct syntax for pathological re.search()

2024-10-12 Thread Peter J. Holzer via Python-list
On 2024-10-11 17:13:07 -0400, AVI GROSS via Python-list wrote: > Is there some utility function out there that can be called to show what the > regular expression you typed in will look like by the time it is ready to be > used? I assume that by "ready to be used" you mean the

Correct syntax for pathological re.search()

2024-10-08 Thread Michael F. Stemper via Python-list
I'm trying to discard lines that include the string "\sout{" (which is TeX, for those who are curious. I have tried: if not re.search("\sout{", line): if not re.search("\sout\{", line): if not re.search("\\sout{", line): if not re.search("\\sout\{", line): But the lines with that string k

Re: Correct syntax for pathological re.search()

2024-10-08 Thread Pieter van Oostrum via Python-list
[email protected] (Stefan Ram) writes: > "Michael F. Stemper" wrote or quoted: > > path = r'C:\Windows\example' + '\\' > You could even omit the '+'. Then the concatenation is done at parsing time instead of run time. -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DA

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-10-11 Thread Dan Ciprus (dciprus) via Python-list
Thank you for the hint ! On Fri, Oct 04, 2024 at 09:17:19AM GMT, Cameron Simpson wrote: On 03Oct2024 22:12, Dan Ciprus (dciprus) wrote: I'd be interested too :-). Untested sketch: def make_thread(target, *a, E=None, **kw): ''' Make a new Event E and Thread T, pass `[E,*a]`

Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-29 Thread Asif Ali Hirekumbi via Python-list
Dear Python Experts, I am working with the Kenna Application's API to retrieve vulnerability data. The API endpoint provides a single, massive JSON file in gzip format, approximately 60 GB in size. Handling such a large dataset in one go is proving to be quite challenging, especially in terms of m

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-29 Thread Abdur-Rahmaan Janhangeer via Python-list
maanJ> Mauritius On Mon, Sep 30, 2024 at 8:00 AM Asif Ali Hirekumbi via Python-list < [email protected]> wrote: > Dear Python Experts, > > I am working with the Kenna Application's API to retrieve vulnerability > data. The API endpoint provides a single, massive JSON

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-29 Thread Asif Ali Hirekumbi via Python-list
> > Kind Regards, > > Abdur-Rahmaan Janhangeer > about <https://compileralchemy.github.io/> | blog > <https://www.pythonkitchen.com> > github <https://github.com/Abdur-RahmaanJ> > Mauritius > > > On Mon, Sep 30, 2024 at 8:00 AM Asif Ali Hireku

[RELEASE] Python 3.14.0 alpha 1 is now available

2024-10-16 Thread Hugo van Kemenade via Python-list
It's now time for a new alpha of a new version of Python! https://www.python.org/downloads/release/python-3140a1/ **This is an early developer preview of Python 3.14** # Major new features of the 3.14 series, compared to 3.13 Python 3.14 is still in development. This release, 3.14.0a1 is the fi

Re: Correct syntax for pathological re.search()

2024-10-18 Thread Peter J. Holzer via Python-list
On 2024-10-12 08:51:57 -0400, Thomas Passin via Python-list wrote: > On 10/12/2024 6:59 AM, Peter J. Holzer via Python-list wrote: > > On 2024-10-11 17:13:07 -0400, AVI GROSS via Python-list wrote: > > > Is there some utility function out there that can be called to sh

Re: Correct syntax for pathological re.search()

2024-10-21 Thread Peter J. Holzer via Python-list
On 2024-10-19 00:15:23 +0200, jak via Python-list wrote: > Peter J. Holzer ha scritto: > > As a trivial example, the regular expressions r"\\sout{" and r"\\sout\{" > > are equivalent (the \ before the { is redundant). Yet > > re.compile(s).pattern preserv

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-10-03 Thread Dan Ciprus (dciprus) via Python-list
I'd be interested too :-). On Thu, Sep 26, 2024 at 03:34:05AM GMT, marc nicole via Python-list wrote: Could you show a python code example of this? On Thu, 26 Sept 2024, 03:08 Cameron Simpson, wrote: On 25Sep2024 22:56, marc nicole wrote: >How to create a per-thread event in Py

Re: Printing UTF-8 mail to terminal

2024-11-05 Thread Peter J. Holzer via Python-list
On 2024-11-04 13:02:21 +0100, Loris Bennett via Python-list wrote: > "Loris Bennett" writes: > > "Loris Bennett" writes: > >> Cameron Simpson writes: > >>> On 01Nov2024 10:10, Loris Bennett wrote: > >>>>as expected. The n

Re: Printing UTF-8 mail to terminal

2024-11-02 Thread Eli the Bearded via Python-list
In comp.lang.python, Gilmeh Serda wrote: > Python 3.12.6 (main, Sep 8 2024, 13:18:56) [GCC 14.2.1 20240805] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> help('modules') > > Please wait a moment while I gather a list of all available modules... > > Ass

Re: Chardet oddity

2024-10-25 Thread Albert-Jan Roskam via Python-list
On Oct 24, 2024 17:51, Roland Mueller via Python-list wrote: ke 23. lokak. 2024 klo 20.11 Albert-Jan Roskam via Python-list ( [email protected]) kirjoitti: >    Today I used chardet.detect in the repl and it returned windows-1252 >    (incorrect, beca

Call for Participation: Python devroom @ FOSDEM 2025

2024-10-28 Thread Marc-Andre Lemburg via Python-list
Call for Participation We are happy to announce that we will again be running a*Python devroom at FOSDEM 2025*. This year's edition will be exclusively in-person, and take place on February 1 and 2, with the Python devroom being held on Sunday, February 2. If you haven’t heard about FOSDE

Chardet oddity

2024-10-23 Thread Albert-Jan Roskam via Python-list
Today I used chardet.detect in the repl and it returned windows-1252 (incorrect, because it later resulted in a UnicodeDecodeError). When I ran chardet as a script (which uses UniversalLineDetector) this returned MacRoman. Isn't charset.detect the correct way? I've used this method many

[RELEASE] Python 3.14.0 alpha 2 is out

2024-11-19 Thread Hugo van Kemenade via Python-list
Alpha 2? But Alpha 1 only just came out! https://www.python.org/downloads/release/python-3140a2/ This is an early developer preview of Python 3.14 Major new features of the 3.14 series, compared to 3.13: Python 3.14 is still in development. This release, 3.14.0a2 is the second of seven planned

Re: How to manage accented characters in mail header?

2025-01-06 Thread Peter J. Holzer via Python-list
On 2025-01-04 19:07:57 +, Chris Green via Python-list wrote: > Stefan Ram wrote: > > Chris Green wrote or quoted: > > >From: =?utf-8?B?U8OpYmFzdGllbiBDcmlnbm9u?= > > > Is there a simple[r] way to extract just the 'real' address between > the <>

Re: No module name mutagen

2025-01-01 Thread Peter J. Holzer via Python-list
On 2024-12-31 15:00:10 -0900, Tim Johnson via Python-list wrote: > being retired for ten years, I get my butt kicked by python dependencies > every time I upgrade ubuntu. (I'm newly on 24.04) now. > > Now, after three weeks on using the following code correctly: > > from

Re: Python List is Not Dead

2024-12-28 Thread Kevin M. Wilson via Python-list
ill be with you: and when you pass through the rivers, they will not sweep over you. When you walk through the fire, you will not be burned: the flames will not set you ablaze."      Isaiah 43:2 On Saturday, December 28, 2024 at 05:37:34 AM MST, Mohammadreza Saveji via Python-list w

Re: Python List is Not Dead

2024-12-30 Thread Erik Max Francis via Python-list
On 12/27/24 00:58, Chris Green via Python-list wrote: Yes, it's the one saving grace of a Discourse forum, you can use it by E-Mail and it behaves quite nicely with a text mode E-Mail client such as mutt so you can keep threads separate, follow sub-threads, etc. Not quite as good as this

Re: it's a shame... python error over error

2024-12-16 Thread Peter J. Holzer via Python-list
On 2024-12-16 08:08:46 +0100, aotto1968 via Python-list wrote: > On 13.12.24 11:36, aotto1968 wrote: > > it's a shame... > > almost every tool I touch that uses "python" in some way has some > > configuration error because apparently a __private__ python

[RELEASE] Python 3.14.0 alpha 3 is out

2024-12-17 Thread Hugo van Kemenade via Python-list
O Alpha 3, O Alpha 3, how lovely are your branches! https://www.python.org/downloads/release/python-3140a3/ This is an early developer preview of Python 3.14. Python 3.14 is still in development. This release, 3.14.0a3, is the third of seven planned alpha releases. Alpha releases are intended t

Re: it's a shame... python error over error

2024-12-14 Thread Peter J. Holzer via Python-list
On 2024-12-13 11:36:01 +0100, aotto1968 via Python-list wrote: > it's a shame... > almost every tool I touch that uses "python" in some way has some > configuration error because apparently a __private__ python installation > __isn't__ properly "understood"

Re: Strategies for avoiding having to use --break-system-packages with pip

2025-01-17 Thread Peter J. Holzer via Python-list
On 2025-01-14 11:32:35 +, Chris Green via Python-list wrote: > Use a virtual environment, what do I have to do then to make using > my program (that uses tkintertable) 'transparent', i.e. I just > want to be able to run the program from the command prompt l

Re: Complete working version of cython Queue example?

2025-01-13 Thread Henry S. Thompson via Python-list
[with link] Henry S. Thompson via Python-list writes: > I've spent several days trying to get this example [1] working, using > Python3.11 and Cython 3.0.11 of Debian. > > I've copied the example files as carefully as I can, renamed some to > avoid a name clash with the

Complete working version of cython Queue example?

2025-01-13 Thread Henry S. Thompson via Python-list
I've spent several days trying to get this example [1] working, using Python3.11 and Cython 3.0.11 of Debian. I've copied the example files as carefully as I can, renamed some to avoid a name clash with the queue.py library, but the Pure Python version throws errors at compile time and although th

<    53   54   55   56   57   58   59   >