Re: Difficulties configuring LTO on macOS with clang

2019-07-16 Thread scott
worked properly. I guess llvm-ar just isn’t packaged with macOS? In any case, this problem is solved for me now. Thanks for your help, Scott On Jul 10, 2019, 16:22 -0400, Barry Scott , wrote: > > > > On 10 Jul 2019, at 15:25, Scott Colby wrote: > > > > Unfortunately t

Apache/mod_python & MySQLdb

2005-01-12 Thread scott
AIUI, global variables are supposed to be preserved within each Apache thread/prcoess. However, I'm importing and using MySQLdb within a class in a separate module, which is in turn imported and used within a _function (ie. not "published"). So, AFAICT, it's not supposed to be preseved. But u

help with wxSlider & wxPython

2005-01-17 Thread Scott
WHITE) self.Show(true) self.Center(wxBOTH) def OnAbout(self,e): d= wxMessageDialog( self, "test","About test", wxOK) d.ShowModal() # Shows it d.Destroy() # finally destroy it when finished. def OnExit(self,e): self.Close(true) # Close the frame. app = wxPySimpleApp() frame = MainW

how to use more than 1 __init__ constructor in a class ?

2005-06-22 Thread scott
tia people scott *this is not homework -- http://mail.python.org/mailman/listinfo/python-list

regulars expressions ?

2005-06-28 Thread scott
ent using ',' delimiter but if ',' delimiter is included between '"' please do not split 1st question is : does someone has understood the question ? 2nd question is : does someone has an answer ? thanks people scott -- http://mail.python.org/mailman/listinfo/python-list

Help with C extensions under VC6 / WinXP and Python 2.4

2005-02-16 Thread Scott
e no PC or PCbuild subdirectories in C:\Python24. Where do I find these? Ultimately, what I want to do is interface some Python code with a DLL that controls an A/D board. I expect I'll need to write an extension module to act as a shim between this DLL and the Python code. Scott -- http://

Re: Help with C extensions under VC6 / WinXP and Python 2.4

2005-02-16 Thread Scott
John Machin wrote: > On Wed, 16 Feb 2005 20:57:18 -0500, Scott > <[EMAIL PROTECTED]> wrote: > > >>I've installed Python 2.4 under WinXP and am attempting to >>create an extension module using the steps outlined here: >>http://python.org/doc/2.4/ext/win-c

Matplotlib, py2exe and pytz

2005-02-18 Thread scott
still no joy. Can someone tell me the correct setup.py file to use for including matplotlib with an app using py2exe? Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Matplotlib, py2exe and pytz

2005-02-19 Thread scott
"jar" file in Java. That would make all of these problems fairly trivial, inclusion of dependant libraries would just be a matter of having the appropriate "Python ARchive in a directory in the PYTHON_PATH so that it could be loaded. Thanks for any help on resolving my py2exe problems. Scott Snyder -- http://mail.python.org/mailman/listinfo/python-list

Re: OS X and Tkinter

2005-03-17 Thread scott
Mike Tuller wrote: I have looked everywhere on the net, and can't figure out how to configure python so that Tkinter will work with it. Any help would be appreciated. The following worked for me with OSX version 10.3 and the default python 2.3: http://www.pythonmac.org/wiki/FAQ#head-8838d40d

EasyDialogs module problem with python 2.4.1

2005-04-18 Thread scott
First my setup: I'm using the framework build of Python 2.4.1 ( http://bob.pythonmac.org/archives/2005/03/31/macpython-241-installer/ ) on an ibook G4 running Mac OS 10.3.8. I installed wxPython 2.5.5.1 ( Unicode runtime 2.5.5.1 for the Panther version of Macpython-OSX 2.4 ) ( http://wxpython.org

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread scott
scott wrote: First my setup: I'm using the framework build of Python 2.4.1 ( http://bob.pythonmac.org/archives/2005/03/31/macpython-241-installer/ ) on an ibook G4 running Mac OS 10.3.8. I installed wxPython 2.5.5.1 ( Unicode runtime 2.5.5.1 for the Panther version of Macpython-OSX 2.4 ) (

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread scott
x27;python' in order to see the dialog box. -- scott$ pythonw Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more informati

Jython run scripts problem (2.2.0a0 on Mac OSX 10.3.8)

2005-04-21 Thread scott
I installed darwinports and did a "sudo port install jython" - scott$ which jython /opt/local/bin/jython - Jython works in interactive mode as shown below: - pyprogs$ cd hotbits/ hotbits$ ls flips50.py jython

[no subject]

2015-06-19 Thread Scott
standard Python distribution. Thank you, Scott James, James Larkin scott.ja...@noblis.org james.lar...@noblis.org https://github.com/scott-howard-james/relate -- https://mail.python.org/mailman/listinfo/python-list

Relation: a new standard (PEP) container?

2015-06-19 Thread Scott
standard Python distribution. Thank you, Scott James, James Larkin scott.ja...@noblis.org james.lar...@noblis.org https://github.com/scott-howard-james/relate -- https://mail.python.org/mailman/listinfo/python-list

Passing a Cookie with httplib

2006-06-28 Thread scott
sponse=conn.getresponse() data=response.read() conn.close() print data except: print "Some stupid error occurred" sys.exit(1) Any help would be greatly appreciated, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing a Cookie with httplib

2006-06-29 Thread scott
elp. I looked through the docs before, but didn't spot this nugget because I was focused on searching for the text "cookie". Obviously, it pays to read... :-) Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing a Cookie with httplib

2006-06-29 Thread scott
I use ClientCookie for that. > >http://wwwsearch.sourceforge.net/ClientCookie/ Thanks Grant. I'll take a look at this solution. Scott -- http://mail.python.org/mailman/listinfo/python-list

Newbie XML SAX Parsing: How do I ignore an invalid token?

2007-01-05 Thread scott
I've got an XML feed from a vendor that is not well-formed, and having them change it is not an option. I'm trying to figure out how to create an error-handler that will ignore the invalid token and continue on. The file is large, so I'd prefer not to put it all in memory or save it off and strip

Re: Newbie XML SAX Parsing: How do I ignore an invalid token?

2007-01-05 Thread scott
t the parser doesn't like. Thanks! Scott Chris Lambacher wrote: > What exactly is invalid about the XML fragment you provided? > It seems to parse correctly with ElementTree: > >>> from xml.etree import ElementTree as ET > >>> e = ET.fromstring(""&

Re: Newbie XML SAX Parsing: How do I ignore an invalid token?

2007-01-07 Thread scott
Thanks, I'll work with the file on the file system, then parse it with SAX. Is there a Pythonic way to read the file and identify any illegal XML characters so I can strip them out? this would keep my program more flexible - if the vendor is going to allow one illegal character in their document,

ezPyCrypto confusion

2005-05-11 Thread scott
in a file for transport on eg a USB drive. key_as_string = k.exportKey() print key_as_string f = open('/Users/scott/pyprogs/the_key.txt', 'w') f.write(key_as_string) f.close() # Now get string representation of k (the key object above) and use it # to create a key object (ke)

Change Geany Syntax Highlighting

2007-06-26 Thread Scott
possible to change the syntax highlighting for Python, so it highlights more and uses more different colours? I really liked the syntax highlighting for Python in kwrite/kate, but did not like the bugs. Your friend, Scott -- http://mail.python.org/mailman/listinfo/python-list

Reversing a string

2007-06-27 Thread Scott
Yeah I know strings == immutable, but question 1 in section 7.14 of "How to think like a computer Scientist" has me trying to reverse one. I've come up with two things, one works almost like it should except that every traversal thru the string I've gotten it to repeat the "list" again. This is

Python compared to other language

2007-05-18 Thread scott
friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty Fawn) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python compared to other language

2007-05-18 Thread scott
Thank you everyone for your help. I will make sure to check the archives, something I should have done first :) -- Your friend, Scott Sent to you from a 100% Linux computer using Kubuntu Version 7.04 (Feisty Fawn) -- http://mail.python.org/mailman/listinfo/python-list

Re: [Bulk] Re: Python compared to other language

2007-05-19 Thread scott
chives and found some good suggestions for books/tutorials. -- Your friend, Scott Sent to you from a 100% Linux computer using Kubuntu Version 7.04 (Feisty Fawn) -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questions

2007-05-24 Thread scott
look at "Dive into Python" as well as the other books > you all > mentioned. I put "Dive into Python" on my palm. Is it a good 2nd book to go through? -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty Fawn) -- http://mail.python.org/mailman/listinfo/python-list

threads, mutual exclusion, and lists

2007-08-15 Thread Scott
, Scott -- http://mail.python.org/mailman/listinfo/python-list

Newbie Question about sequence multiplication

2007-04-04 Thread Scott
; ' * sentence + ' |' TypeError: can't multiply sequence by non-int of type 'str' Why can't I get it to do what it's supposed to do? What am I missing/misunderstanding? Very simply all its supposed to do is something like this (now bear with me formati

Re: Newbie Question about sequence multiplication

2007-04-06 Thread Scott
Thanks to everyone that respondedI would never have figured that out. 7stud, Your suggestion is being considered lol, as there are a lot more bits of code in that book that I can't get running correctly. Any other books you'd, or anyone for that matter, would recommend as required reading?

pop() clarification

2007-04-11 Thread Scott
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element of a list and return its value: Now I know list is a bad name, but for the sake of arguement lets as

Re: Hellow World:)

2007-04-11 Thread Scott
The author of that book is qouted as saying: ''Note: My more recent book, Beginning Python is an expanded and revised version of this book.'' That qoute can be found at http://hetland.org/writing/practical-python/ However, from my personal experience some of the codes in beginning python have so

Question About Creating Lists

2007-04-12 Thread Scott
I'm sorry if most of my question's seem "petty", but as I've said before, I need to know the petty just because I need to know. This question is more along the lines of just having you guys either agree or disgree with me, and if disagreeing to give the reasoning behind it, to further my unders

Lists and Tuples and Much More

2007-04-12 Thread Scott
I'm going to start grouping all my questions in one post as this is my second today, and sorta makes me feel dumb to keep having to bother you all with trivial questions. I'll just seperate my questions with:

Re: Question About Creating Lists

2007-04-12 Thread Scott
> Please forgo the psychological self analysis from your future posts. Unfortunately I can't, that's how I am, love it or leave it. But if your going to be condescending about it, please leave your future replies in your outbox. Now don't take that as I don't appreciate your reply. I just d

Re: Lists and Tuples and Much More

2007-04-13 Thread Scott
"7stud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Yes. Tuples are immutable - once created, they can't change. > > Just to explain that statement a little better. If you do this: > > > t = (1, 2, ["red", "white"]) > t[2].append("purple") > print t#(1, 2, ['red', 'white',

Re: Question About Creating Lists

2007-04-13 Thread Scott
> And that's a really sideways way to take a swipe at someone while > pretending to be too high-minded to do it (plus see James's comments about > other possible explanations). If you kiddies would take this fight out > into the playground perhaps the rest of the class can continue. It wasn't m

Re: Python 3 and my Mac (Leopard)

2008-12-27 Thread scott
Dan wrote: Wanted to learn python, got Mark Summerfield's new book "Programming in Python 3". Having a hard time getting python 3 and IDLE working on my Mac with Leopard. The mac "resources" on the python.org site seem a bit out of date, and don't really mention python 3. Are there any resou

Remote control of firefox (mozilla) from a python program

2008-11-10 Thread Scott
I have a requirement to control a firefox web browser from an external python program. The python program running under linux from a command shell needs to first find all open firefox web browser windows read the URL currently displayed in each web browser and if the URL matches a particular regul

passing a variable argument list to a function

2008-08-12 Thread Scott
or example, if I call foo(1,2,3,4) then it calls bar((1,2,3,4)). It passes a tuple rather than expanding the argument list back out. I suspect there's a simple bit of syntax that I'm missing -- can anyone give me a hand? Thanks Scott -- http://mail.python.org/mailman/listinfo/python-list

getting full exception information from an xmlrpc server

2008-08-13 Thread Scott
I need to see the whole trace so I can figure out what the problem is. Is there an easy way to do this? Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: passing a variable argument list to a function

2008-08-13 Thread Scott
> Yeah. It's so easy and obvious that you are going to bang your head > against the wall. :) The single star does not only collect all arguments > in a function definition. It also expands a sequence as arguments. Thanks Christian, that worked perfectly! Scott -- http://mail.pyth

creating a similar object from an derived class

2008-09-03 Thread Scott
so that it automatically creates objects of the derived class, so that I don't have to continue to redefine create_another() ? For example, I tried the following: def create_another() return self.type()() but it did not work. Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

mod_python and PHP sharing same session

2006-04-03 Thread Scott
. Has anyone attermpted what I am trying to perform and if so a short snippet of code or explanation of how to interface to PHP session via mod_python would be great. I am not an experiecne PHP users but have used mod_python extensively. Scott -- http://mail.python.org/mailman/listinfo/python-list

Fundamental Function Question (beginner)

2010-01-11 Thread Scott
When creating a function is there any difference between putting everything under the "def" or not? Here I created a function called CscoPortNum to convert the network port number field in a Cisco syslog string from a an ascii name back into its numeric form if required. Does it matter at all that

Re: Fundamental Function Question (beginner)

2010-01-11 Thread Scott
On Jan 11, 1:50 pm, Phlip wrote: > MRAB wrote: > > Scott wrote: > >> for prtnmS in open(portfpth): > >>     prtnmS = prtnmS.rstrip() > > There's nothing wrong with building dicts or other lookup tables outside > > a function in order to avoid re-creatin

Re: Fundamental Function Question (beginner)

2010-01-11 Thread Scott
> There's nothing wrong with building dicts or other lookup tables outside > a function in order to avoid re-creating them every time the function is > called. Brilliant! I didn't think of that. I guess I accidentally did it right this time as I query that dictionary quite a few times from the fun

Using String for new List name

2009-09-28 Thread Scott
I am new to Python but I have studied hard and written a fairly big (to me) script/program. I have solved all of my problems by Googling but this one has got me stumped. I want to check a string for a substring and if it exists I want to create a new, empty list using that substring as the name of

Re: Using String for new List name

2009-09-28 Thread Scott
Thank you fine folks for getting back with your answers! So down the road I do dictname[line42].append("new stuff"). (or [var] if I'm looping through the dict) This is cool and should do the trick! -Scott Freemire disclosure - Ok, I'm new to *any* language. I've been te

Re: Using String for new List name

2009-09-28 Thread Scott
> That should actually be dictname["line42"].append("new stuff").  Notice > the quotes around line42. > > Good luck!  Python is a fine language, I hope you like it. > > ~Ethan~ Doh. I sent it before my type, fail, fix cycle had taken place. Got it. Thanks again all! -- http://mail.python.org/mai

Re: Using String for new List name

2009-09-28 Thread Scott
On Sep 28, 2:00 pm, Dave Angel wrote: > Scott wrote: > > Thank you fine folks for getting back with your answers! > > > So down the road I do dictname[line42].append("new stuff"). (or [var] > > if I'm looping through the dict) > > Nope, you still haven

How to sort a list of strings on a substring

2009-10-05 Thread Scott
I create a list of logs called LogList. Here is a sample: LogList = ["inbound tcp office 192.168.0.125 inside 10.1.0.91 88", "inbound tcp office 192.168.0.220 inside 10.1.0.31 2967", "inbound udp lab 172.24.0.110 inside 10.1.0.6 161", "inbound udp office 192.168.0.220 inside 10.1.0.13 53"] I want

Re: How to sort a list of strings on a substring

2009-10-05 Thread Scott
On Oct 5, 6:05 pm, MRAB wrote: > Scott wrote: > > I create a list of logs called LogList. Here is a sample: > > > LogList = > > ["inbound tcp office 192.168.0.125 inside 10.1.0.91 88", > > "inbound tcp office 192.168.0.220 inside 10.1.0.31 2967",

Sharing a program I wrote

2010-05-04 Thread Scott
ust want anyone who might need a little networking/security tool like this to be able to find it. Any advice? Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Sharing a program I wrote

2010-05-04 Thread Scott
just post a link. Is that well received on this forum? Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

Help running Windows programs from Python

2010-05-07 Thread Scott
again. And then there is this whole idea of "wrappers." Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

Allocating memory to pass back via ctypes callback function

2009-06-18 Thread Scott
memory location address? # would this be the correct next thing to do? pointer_c_char_p.contents = c_char_p(py_string) # return 0 Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Allocating memory to pass back via ctypes callback function

2009-06-19 Thread Scott
I think I found the answer to my own question. Can anyone spot any issues with the following solution? The application I'm writing will be hitting these callbacks pretty heavily so I'm nervous about mucking up the memory management and creating one of those bugs that passes undetected through test

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Paul Scott
On 10/07/2013 14:22, Chris Angelico wrote: Either that or it's funny only to other Australians. ChrisA As a South African, I found it funny too, but then again, we often get confused. -- http://mail.python.org/mailman/listinfo/python-list

Re: Linux shell to python

2012-07-30 Thread Barry Scott
lspci gets all its information from the files in /sys/bus/pci/devices. You can use os.listdir() to list all the files in the folder and then open the files you want to get the data you need. And of course you can write list comprehensions on as many lines as it take to make the code maintainable.

Re: Linux shell to python

2012-07-31 Thread Barry Scott
On 30 Jul 2012, at 23:56, Dan Stromberg wrote: > > On Mon, Jul 30, 2012 at 9:26 PM, Barry Scott wrote: > lspci gets all its information from the files in /sys/bus/pci/devices. > > You can use os.listdir() to list all the files in the folder and then open > the files y

Re: Python does not take up available physical memory

2012-10-22 Thread Barry Scott
On 21 Oct 2012, at 15:14, Pradipto Banerjee wrote: > I tried this on a different PC with 12 GB RAM. As expected, this time, > reading the data was no issue. I noticed that for large files, Python takes > up 2.5x size in memory compared to size on disk, for the case when each line > in the fil

Re: Missing something obvious with python-requests

2013-01-03 Thread Barry Scott
The shipped python library code does not work. See http://bugs.python.org/issue7291 for patches. Barry On 3 Jan 2013, at 18:53, Ray Cote wrote: > Hello List: > > I seem to be missing something obvious in terms of using proxies with the > requests module. > I'm using requests 1.4 and Python

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-03 Thread Barry Scott
On 2 Jan 2013, at 08:01, Victor Hooi wrote: > Hi, > > I'm using pysvn to checkout a specific revision based on date - pysvn will > only accept a date in terms of seconds since the epoch. > > I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to > seconds since epoch. >

Re: Forcing Python to detect DocumentRoot

2013-01-19 Thread Barry Scott
On 16 Jan 2013, at 13:51, Ferrous Cranus wrote: > When trying to open an html template within Python script i use a relative > path to say go one folder back and open index.html > > f = open( '../' + page ) > > How to say the same thing in an absolute way by forcing Python to detect > Docume

Re: python: HTTP connections through a proxy server requiring authentication

2013-01-28 Thread Barry Scott
The shipped python library code does not work. See http://bugs.python.org/issue7291 for patches. Barry -- http://mail.python.org/mailman/listinfo/python-list

python25.dll

2012-03-04 Thread Scott V
states "python25.dll" will not load or does not exist. > I have removed Python from my system to stop this error. > Anything else I can do? This is XP system. > Scott *I loaded version 3.2, so not sure why the python25 was in there. ___ Ama

pygame.Rect question

2012-04-08 Thread Scott Siegler
It is really confusing me when I am doing some collision algorithms. Any help? Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: How to call and execute C code in Python?

2012-05-16 Thread Barry Scott
There are many choices rather then raw python C API calls. Boost, PyCXX and ctypes are worth investigating. PyCXX requires you code in C++ but hides lots of the issues of using the Python API from you. It also supports python 2 and 3. Barry - PyCXX maintainer -- http://mail.python.org/mailma

Help doing it the "python way"

2012-05-24 Thread Scott Siegler
Hello, I am an experienced programmer but a beginner to python. As such, I can figure out a way to code most algorithms using more "C" style syntax. I am doing something now that I am sure is a more python way but i can't quite get it right. I was hoping someone might help. So I have a list

Re: How to import Webkit and object in Official Python (not MacPorts python) without X11.

2012-05-26 Thread Barry Scott
On 26 May 2012, at 14:31, Mr.T Beppu wrote: > I think that I will make a browser in Official Python (not MacPorts Python). > What should I do in order to install Webkit for Official Python (not MacPorts > Python) ? > from tokyo Japan. > -- > http://mail.python.org/mailman/listinfo/python-list

pygame: transparency question

2012-05-29 Thread Scott Siegler
Hello, I have a surface that I load an image onto. During a collision I would like to clear out the images of both surfaces that collided and show the score. Is there a function call to clear a surface with an image? One way I was thinking was to fill the surface with a color and then set tha

Re: opening a file

2011-06-19 Thread Paul Scott
On Mon, 2011-06-20 at 08:14 +0200, Florencio Cano wrote: > > This works: > > infile=open('/foo/bar/prog/py_modules/this_is_a_test','r') > > > > This doesn't: > > infile=open('~/prog/py_modules/this_is_a_test','r') > > > > Can't I work with files using Unix expressions? > > You can use the glob mod

OSX application built with py2app can't see bundled PySide module?

2011-09-01 Thread Aaron Scott
I'm trying to deploy a Python app on OSX that was built with PySide. py2app packages it without issue, copying and linking a lot of PySide and Qt files in the process. But then, when I try to run the built app, I get this error: Traceback (most recent call last): File "/Users/sequence/Desktop

Re: tail

2022-05-08 Thread Barry Scott
> On 7 May 2022, at 14:40, Stefan Ram wrote: > > Marco Sulla writes: >> So there's no way to reliably read lines in reverse in text mode using >> seek and read, but the only option is readlines? > > I think, CPython is based on C. I don't know whether > Python's seek function directly call

Re: tail

2022-05-08 Thread Barry Scott
> On 7 May 2022, at 22:31, Chris Angelico wrote: > > On Sun, 8 May 2022 at 07:19, Stefan Ram wrote: >> >> MRAB writes: >>> On 2022-05-07 19:47, Stefan Ram wrote: >> ... def encoding( name ): path = pathlib.Path( name ) for encoding in( "utf_8", "latin_1", "cp1252" ):

Re: tail

2022-05-08 Thread Barry Scott
> On 8 May 2022, at 17:05, Marco Sulla wrote: > > I think I've _almost_ found a simpler, general way: > > import os > > _lf = "\n" > _cr = "\r" > > def tail(filepath, n=10, newline=None, encoding=None, chunk_size=100): >n_chunk_size = n * chunk_size Why use tiny chunks? You can read 4K

Re: How to test characters of a string

2022-06-08 Thread Barry Scott
> On 7 Jun 2022, at 23:24, Dave wrote: > > Yes, it was probably just a typeo on my part. > > I’ve now fixed the majority of cases but still got two strings that look > identical but fail to match, this time (again by 10cc), “I’m Mandy Fly Me”. > > I’m putting money on it being a utf8 problem

Re: How to replace characters in a string?

2022-06-08 Thread Barry Scott
> On 8 Jun 2022, at 18:01, Dave wrote: > > Hi, > > This is a tool I’m using on my own files to save me time. Basically or most > of the tracks were imported with different version iTunes over the years. > There are two problems: > > 1. File System characters are replaced (you can’t have ‘

Re: Logging into single file from multiple modules in python when TimedRotatingFileHandler is used

2022-06-22 Thread Barry Scott
> On 22 Jun 2022, at 11:06, Lars Liedtke wrote: > > Could be unrelated and only a part of a solution, but if you are on a unixoid > system, you could use logrotate, instead of TimedRotatingFileHandler. > logfrotate ensures that the logging service does not realize, its logs have > been rota

Re: Subtract n months from datetime [Why?]

2022-06-22 Thread Barry Scott
> On 22 Jun 2022, at 17:59, Paulo da Silva > wrote: > > Às 05:29 de 21/06/22, Paulo da Silva escreveu: > > As a general response to some comments ... > > Suppose we need to delete records from a database older than ... > Today, it's usual to specify days. For example you have to keep some go

Re: Building on Windows

2022-07-02 Thread Barry Scott
> On 2 Jul 2022, at 15:41, Sam Ezeh wrote: > > To add to this, my process was > > 1. Setup the VM > 2. Install Git > 3. Clone CPython > 4. Run `PCbuild\build.bat -d -e` > 5. Notice the error, then install visual studio community 2022 Try running this: call "C:\Program Files\Microsoft Visual

Re: Python 3.9 pidfd_open

2022-07-08 Thread Barry Scott
> On 5 Jul 2022, at 19:47, Weatherby,Gerard wrote: > > python introduced os.pidfd_open(), which works as documented. > > My development environment, PyCharm, complains about it being undefined. > > Should it be in > https://raw.githubusercontent.com/python/cpython/3.9/Lib/os.py ? When face

script folder is empty

2022-07-17 Thread Scott Baer
rr>pip --version 'pip' is not recognized as an internal or external command, operable program or batch file. I've done some troubleshooting, and nothing is in the C:\Program Files\Python310\Scripts folder. I"m not a noob.. but obviously, I missing something.. I doubt

Re: Simple TCP proxy

2022-07-30 Thread Barry Scott
Morten, As Chris remarked you need to learn a number of networking, python, system performance and other skills to turn your project into production code. Using threads does not scale very well. Its uses a lot of memory and raises CPU used just to do the context switches. Also the GIL means tha

Re: why I cannot to install packages?

2022-09-15 Thread Barry Scott
> On 15 Sep 2022, at 12:31, ⁨נתי שטרן⁩ <⁨nsh...@gmail.com⁩> wrote: > > [image: image.png] Images are stripped; please copy the text of the error you are seeing and post that. Barry > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/p

Re: Python 3.9.14

2022-09-15 Thread Barry Scott
> On 14 Sep 2022, at 14:03, ⁨אורי⁩ <⁨u...@speedy.net⁩> wrote: > > Hi, > > Python 3.9.14 has been released on Sept. 6, 2022. As I can see written on > https://www.python.org/downloads/release/python-3914/: > > According to the release calendar specified in PEP 596, Python 3.9 is now > in the "s

Re: Changing 'Scripts/*.exe'

2022-10-03 Thread Barry Scott
> On 1 Oct 2022, at 16:50, Gisle Vanem via Python-list > wrote: > > Hello list. > > I'm moved my old Python27 installation from > f:\ProgramFiler\Python27 ( == 'ProgramFiles') > to > f:\gv\Python27 The design of Windows installed software makes this hard to do without a lot of knowledge

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-24 Thread Barry Scott
> On 8 Oct 2022, at 11:50, Weatherby,Gerard wrote: > > Logging does support passing a callable, if indirectly. It only calls __str__ > on the object passed if debugging is enabled. > > class Defer: > > def __init__(self,fn): > self.fn = fn > > def __str__(self): > r

Re: Any PyQt developers here?

2022-10-25 Thread Barry Scott
There is an active PyQt mailing list that has lots of helpful and knowledgeable people on it. https://www.riverbankcomputing.com/mailman/listinfo/pyqt Barry > On 25 Oct 2022, at 18:03, DFS wrote: > > Having problems with removeRow() on a QTableView object. > > After calling removeRow(), the

Re: UTF-8 and latin1

2022-10-25 Thread Barry Scott
> On 25 Oct 2022, at 11:16, Stefan Ram wrote: > > r...@zedat.fu-berlin.de (Stefan Ram) writes: >> You can let Python guess the encoding of a file. >> def encoding_of( name ): >> path = pathlib.Path( name ) >> for encoding in( "utf_8", "cp1252", "latin_1" ): >> try: >> with path.open( encoding=e

Re: Information about slow execution notebook

2022-11-01 Thread Barry Scott
> On 1 Nov 2022, at 16:08, nhlanhlah198506 wrote: > > I wish to know why sometimes my notebook won't execute my program And VS code > won't connect to kernels. Thank you Nhlanhla Ndwandwe Sent from my Galaxy You need to provide details on what you do and what happens. Reminder do not attach

Re: How to manage python shebang on mixed systems?

2022-11-07 Thread Barry Scott
> On 7 Nov 2022, at 09:28, Chris Green wrote: > > Chris Green wrote: >>> 3: with your pseudo "python3" script in place, make all the scripts use >>> the "#!/usr/bin/env python3" shebang suggested above. >>> >> Yes, that sounds a good plan to me, thanks Cameron. >> > Doesn't '#!/usr/bin/env

Re: Python 3.11.0 installation and Tkinter does not work

2022-11-23 Thread Barry Scott
> On 23 Nov 2022, at 06:31, Stefan Ram wrote: > > darkst...@o2online.de writes: >> I want learn python for 4 weeks and have problems, installing Tkinter. If I= >> installed 3.11.0 for my windows 8.1 from python.org and type > > Ok, so you already installed from python.org. I wonder a > littl

Re: NEO6 GPS with Py PICO with micropython

2022-11-30 Thread Barry Scott
> On 30 Nov 2022, at 10:58, KK CHN wrote: > > List, > > Just commented the // gpsModule.readline() in the while loop, ( > refer the link > https://microcontrollerslab.com/neo-6m-gps-module-raspberry-pi-pico-micropython/ > ) > > > while True: # gpsModule.readline() // This line comm

Re: Does one have to use curses to read single characters from keyboard?

2022-12-11 Thread Barry Scott
> On 11 Dec 2022, at 18:50, Chris Green wrote: > > My solution in the end was copied from one I found that was much > simpler and straightforward than most. I meant to post this earlier > but it got lost somewhere:- > >import sys, termios, tty ># ># ># Read a single character

Re: Possible re bug

2022-12-29 Thread Barry Scott
Please please fix you email client so that your replies stay with the emails you are replying to. Barry On 28/12/2022 19:09, Stefan Ram wrote: Alexander Richert writes: |print(re.findall(".*","pattern")) |yields ['pattern',''] which is not what I was expecting. The asterisk is "greedy", so

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Barry Scott
On 04/01/2023 02:26, Chris Angelico wrote: Reading/writing the FD is the same as using stdout (technically you'd write to fd 1 and read from fd 0), but yes, can use /dev/tty to reach for the console directly. I think the logic is more like checking that stdin is a tty then using the tty it to

  1   2   3   4   5   6   7   8   9   10   >