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

2022-06-09 Thread Friedrich Rentsch
If you want tables layed out in a framing grid, you might want to take a look at this: https://bitbucket.org/astanin/python-tabulate/pull-requests/31/allow-specifying-float-formats-per-column/diff Frederic On 6/9/22 12:43, Dave wrote: Hi, Before I write my own I wondering if anyone knows

Re: Global VS Local Subroutines

2022-02-10 Thread Friedrich Rentsch
I believe to have observed a difference which also might be worth noting: the imbedded function a() (second example) has access to all of the imbedding function's variables, which might be an efficiency factor with lots of variables. The access is read-only, though. If the inner function

Re: Update a specific element in all a list of N lists

2021-12-19 Thread Friedrich Rentsch
On 12/16/21 3:00 PM, hanan lamaazi wrote: Dear All, I really need your assistance, I have a dataset with 1005000 rows and 25 columns, The main column that I repeatedly use are Time, ID, and Reputation First I sliced the data based on the time, and I append the sliced data in a list called

Re: How to get dynamic data in html (javascript?)

2020-01-13 Thread Friedrich Rentsch
On 1/11/20 2:39 PM, Friedrich Rentsch wrote: Hi all, I'm pretty good at hacking html text. But I have no clue how to get dynamic data like this : "At close: {date} {time}". I would appreciate a starting push to narrow my focus, currently awfully unfocused. Thanks. Freder

How to get dynamic data in html (javascript?)

2020-01-11 Thread Friedrich Rentsch
Hi all, I'm pretty good at hacking html text. But I have no clue how to get dynamic data like this : "At close: {date} {time}". I would appreciate a starting push to narrow my focus, currently awfully unfocused. Thanks. Frederic -- https://mail.python.org/mailman/listinfo/python-list

Re: pre-edit stuff persists in a reloaded a module

2019-10-07 Thread Friedrich Rentsch
On 10/5/19 1:48 PM, Friedrich Rentsch wrote: Hi all, Python 2.7. I habitually work interactively in an Idle window. Occasionally I correct code, reload and find that edits fail to load. I understand that reloading is not guaranteed to reload everything, but I don't understand the exact

Re: pre-edit stuff persists in a reloaded a module

2019-10-05 Thread Friedrich Rentsch
On 10/5/19 2:48 PM, Peter Otten wrote: Friedrich Rentsch wrote: Hi all, Python 2.7. I habitually work interactively in an Idle window. Occasionally I correct code, reload and find that edits fail to load. I understand that reloading is not guaranteed to reload everything, but I don't

pre-edit stuff persists in a reloaded a module

2019-10-05 Thread Friedrich Rentsch
Hi all, Python 2.7. I habitually work interactively in an Idle window. Occasionally I correct code, reload and find that edits fail to load. I understand that reloading is not guaranteed to reload everything, but I don't understand the exact mechanism and would appreciate some illumination.

Re: Regex to extract multiple fields in the same line

2018-06-15 Thread Friedrich Rentsch
take hold. Sorry about that. Frederic Regards, Ganesh On Fri, Jun 15, 2018 at 12:53 PM, Friedrich Rentsch < anthra.nor...@bluewin.ch> wrote: Hi Ganesch. Having proposed a solution to your problem, it would be kind of you to let me know whether it has helped. In case you missed my

Re: Regex to extract multiple fields in the same line

2018-06-13 Thread Friedrich Rentsch
On 06/13/2018 07:32 PM, Ganesh Pal wrote: On Wed, Jun 13, 2018 at 5:59 PM, Rhodri James wrote: On 13/06/18 09:08, Ganesh Pal wrote: Hi Team, I wanted to parse a file and extract few feilds that are present after "=" in a text file . Example , form the below line I need to extract

Re: stock quotes off the web, py style

2018-05-16 Thread Friedrich Rentsch
On 05/16/2018 06:21 PM, Mike McClain wrote: On Wed, May 16, 2018 at 02:33:23PM +0200, Friedrich Rentsch wrote: I didn't know the site you mention. I've been getting quotes from Yahoo daily. The service they discontinued was for up to 50 symbols per page. I now parse a separate page of some

Re: stock quotes off the web, py style

2018-05-16 Thread Friedrich Rentsch
On 05/16/2018 02:23 AM, Mike McClain wrote: Initially I got my quotes from a broker daily to plug into a spreadsheet, Then I found Yahoo and wrote a perl script to grab them. When Yahoo quit supplying quotes I found AlphaVantage.co and rewrote the perl script. AlphaVantage.co has

Re: General Purpose Pipeline library?

2017-11-22 Thread Friedrich Rentsch
On 11/22/2017 10:54 AM, Friedrich Rentsch wrote: On 11/21/2017 03:26 PM, Jason wrote: On Monday, November 20, 2017 at 10:49:01 AM UTC-5, Jason wrote: a pipeline can be described as a sequence of functions that are applied to an input with each subsequent function getting the output

Re: General Purpose Pipeline library?

2017-11-22 Thread Friedrich Rentsch
On 11/21/2017 03:26 PM, Jason wrote: On Monday, November 20, 2017 at 10:49:01 AM UTC-5, Jason wrote: a pipeline can be described as a sequence of functions that are applied to an input with each subsequent function getting the output of the preceding function: out =

Re: General Purpose Pipeline library?

2017-11-22 Thread Friedrich Rentsch
On 11/21/2017 03:26 PM, Jason wrote: On Monday, November 20, 2017 at 10:49:01 AM UTC-5, Jason wrote: a pipeline can be described as a sequence of functions that are applied to an input with each subsequent function getting the output of the preceding function: out =

execfile and import not working

2017-09-06 Thread Friedrich Rentsch
Hi, I am setting up Python 2.7 after an upgrade to Ubuntu 16.04, a thorough one, leaving no survivors. Everything is fine, IDLE opens, ready to go. Alas, execfile and import commands don't do my bidding, but hang IDLE. All I can do is kill the process named "python" from a bash terminal. IDLE

Re: Redirecting input of IDLE window

2017-08-15 Thread Friedrich Rentsch
On 08/14/2017 10:47 AM, Friedrich Rentsch wrote: Hi, I work interactively in an IDLE window most of the time and find "help (...)" very useful to summarize things. The display comes up directly (doesn't return a text, which I could edit, assign or store). I suspect that ther

Redirecting input of IDLE window

2017-08-14 Thread Friedrich Rentsch
Hi, I work interactively in an IDLE window most of the time and find "help (...)" very useful to summarize things. The display comes up directly (doesn't return a text, which I could edit, assign or store). I suspect that there are ways to redirect the display, say to a file. Thanks for

Re: Finding the name of an object's source file

2017-06-06 Thread Friedrich Rentsch
On 06/06/2017 03:52 PM, Matt Wheeler wrote: On Tue, 6 Jun 2017 at 11:20 Peter Otten <__pete...@web.de> wrote: import os inspect.getsourcefile(os.path.split) '/usr/lib/python3.4/posixpath.py' And so much more fun than scanning the documentation :) Alternatively, without using inspect, we

Finding the name of an object's source file

2017-06-06 Thread Friedrich Rentsch
Hi all, Developing a project, I have portions that work and should be assembled into a final program. Some parts don't interconnect when they should, because of my lack of rigor in managing versions. So in order to get on, I should next tidy up the mess and the way I can think of to do it is

Re: use regex to search the page one time to get two types of Information

2016-08-19 Thread Friedrich Rentsch
On 08/19/2016 09:02 AM, iMath wrote: I need to use regex to search two types of Information within a web page, while it seems searching the page two times rather than one is much time consuming , is it possible to search the page one time to get two or more types of Information? >>> r =

Re: Scraping email to make invoice

2016-04-24 Thread Friedrich Rentsch
On 04/24/2016 08:58 PM, CM wrote: I would like to write a Pythons script to automate a tedious process and could use some advice. The source content will be an email that has 5-10 PO (purchase order) numbers and information for freelance work done. The target content will be an invoice.

Re: Review Request of Python Code

2016-03-09 Thread Friedrich Rentsch
On 03/09/2016 05:18 AM, subhabangal...@gmail.com wrote: Dear Group, I am trying to write a code for pulling data from MySQL at the backend and annotating words and trying to put the results as separated sentences with each line. The code is generally running fine but I am feeling it may be

Re: Finding Blank Columns in CSV

2015-10-05 Thread Friedrich Rentsch
On 10/05/2015 03:29 PM, Jaydip Chakrabarty wrote: Hello, I have a csv file like this. Name,Surname,Age,Sex abc,def,,M ,ghi,,F jkl,mno,, pqr,,,F I want to find out the blank columns, that is, fields where all the values are blank. Here is my python code. fn = "tmp1.csv" fin = open(fn, 'rb')

Re: Reading \n unescaped from a file

2015-09-06 Thread Friedrich Rentsch
On 09/06/2015 09:51 AM, Peter Otten wrote: Friedrich Rentsch wrote: My response was meant for the list, but went to Peter by mistake. So I repeat it with some delay: On 09/03/2015 04:24 PM, Peter Otten wrote: Friedrich Rentsch wrote: On 09/03/2015 11:24 AM, Peter Otten wrote: Friedrich

Re: Reading \n unescaped from a file

2015-09-04 Thread Friedrich Rentsch
My response was meant for the list, but went to Peter by mistake. So I repeat it with some delay: On 09/03/2015 04:24 PM, Peter Otten wrote: Friedrich Rentsch wrote: On 09/03/2015 11:24 AM, Peter Otten wrote: Friedrich Rentsch wrote: I appreciate your identifying two mistakes. I am curious

Re: Reading \n unescaped from a file

2015-09-03 Thread Friedrich Rentsch
On 09/03/2015 11:24 AM, Peter Otten wrote: Friedrich Rentsch wrote: On 09/02/2015 04:03 AM, Rob Hills wrote: Hi, I am developing code (Python 3.4) that transforms text data from one format to another. As part of the process, I had a set of hard-coded str.replace(...) functions that I

Re: Reading \n unescaped from a file

2015-09-03 Thread Friedrich Rentsch
On 09/03/2015 06:12 PM, Rob Hills wrote: Hi Friedrich, On 03/09/15 16:40, Friedrich Rentsch wrote: On 09/02/2015 04:03 AM, Rob Hills wrote: Hi, I am developing code (Python 3.4) that transforms text data from one format to another. As part of the process, I had a set of hard-coded

Re: Reading \n unescaped from a file

2015-09-03 Thread Friedrich Rentsch
On 09/02/2015 04:03 AM, Rob Hills wrote: Hi, I am developing code (Python 3.4) that transforms text data from one format to another. As part of the process, I had a set of hard-coded str.replace(...) functions that I used to clean up the incoming text into the desired output format,

Re: How to model government organization hierarchies so that the list can expand and compress

2015-08-14 Thread Friedrich Rentsch
On 08/13/2015 09:10 PM, Alex Glaros wrote: It's like the desktop folder/directory model where you can create unlimited folders and put folders within other folders. Instead of folders, I want to use government organizations. Example: Let user create agency names: Air Force, Marines, Navy,

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-07 Thread Friedrich Rentsch
On 08/06/2015 03:21 AM, Rustom Mody wrote: On Thursday, August 6, 2015 at 6:36:56 AM UTC+5:30, Terry Reedy wrote: There have been discussions, such as today on Idle-sig , about who uses Idle and who we should design it for. If you use Idle in any way, or know of or teach classes using Idle,

Re: Extract email address from Java script in html source using python

2015-05-24 Thread Friedrich Rentsch
On 05/23/2015 04:15 PM, savitha devi wrote: What I exactly want is the java script is in the html code. I am trying for a regular expression to find the email address embedded with in the java script. On Sat, May 23, 2015 at 2:31 PM, Chris Angelico ros...@gmail.com wrote: On Sat, May 23,