Re: Passing information between modules

2022-11-21 Thread Barry
> On 21 Nov 2022, at 21:23, r...@zedat.fu-berlin.de wrote: > > dn writes: >> Now, at the config stage, take the instructions to define whichever the >> user prefers, and instantiate that class. Then the 'calling-routine' can >> use the instantiated object as an interface to whichever type of

Re: Passing information between modules

2022-11-21 Thread Thomas Passin
On 11/21/2022 12:24 AM, dn wrote: My original question probably was intended to be something    like: "Today, we can add attributes to a module from the    outside. How large is the risk that this will be forbidden    one day, so that all code using this will stop working?". This can happen tod

Re: Passing information between modules

2022-11-20 Thread Chris Angelico
On Mon, 21 Nov 2022 at 16:26, dn wrote: > Am put-off by the 'smell' of subverting/adapting names like print() = > surprise/confusion factor - but I think I understand where you're going. To be fair, redefining the "print" function IS one of the reasons that it's no longer a statement. Though I wo

Re: Passing information between modules

2022-11-20 Thread dn
On 21/11/2022 01.29, Stefan Ram wrote: dn writes: A 'standard' solution is to collect all such configuration-data at the start of the application, into an object (or other data-structure) - I usually call it "env" (an instantiation of "Environment"). Yeah, I had some functions of my librar

Re: Passing information between modules

2022-11-20 Thread Thomas Passin
On 11/21/2022 12:01 AM, dn wrote: On 21/11/2022 12.07, Dan Kolis wrote: If you understand its meaning, it achieves my purpose. If you don't I you're perhaps not a programmer... Ouch! Does the first sentence imply who is the more important person in the interaction? Does the second further th

Re: Passing information between modules

2022-11-20 Thread dn
On 21/11/2022 12.07, Dan Kolis wrote: If you understand its meaning, it achieves my purpose. If you don't I you're perhaps not a programmer... Ouch! Does the first sentence imply who is the more important person in the interaction? Does the second further the idea that anyone/everyone who i

Re: Passing information between modules

2022-11-20 Thread Thomas Passin
On 11/20/2022 4:07 PM, Roel Schroeven wrote: Thomas Passin schreef op 20/11/2022 om 20:33: https://devblogs.microsoft.com/oldnewthing/20050607-00/?p=35413 https://devblogs.microsoft.com/oldnewthing/20101125-00/?p=12203 Now that I think about it, The Old New Thing is also where I got the global

Re: Passing information between modules

2022-11-20 Thread Dan Kolis
Its advice, I don't think the style issue is particularly important. If you understand its meaning, it achieves my purpose. If you don't I you're perhaps not a programmer... I like the abruptness of technical writing as a style, actually. If that is how machine learning ( aka 'A.I.' ) tends to

Re: Passing information between modules

2022-11-20 Thread Chris Angelico
On Mon, 21 Nov 2022 at 09:37, Dan Kolis wrote: > > Using sys.stdout / is simply nonsense. The more I think about it, the more I > realise how bad it is. > > Going on about it endlessly seems pointless. > > If the even mini threading thing is turned on, now what ? some other module > eats the mes

Re: Passing information between modules

2022-11-20 Thread Dan Kolis
Using sys.stdout / is simply nonsense. The more I think about it, the more I realise how bad it is. Going on about it endlessly seems pointless. If the even mini threading thing is turned on, now what ? some other module eats the message intended for a different module ? A state machine with it

Re: Passing information between modules

2022-11-20 Thread Roel Schroeven
Thomas Passin schreef op 20/11/2022 om 20:33: https://devblogs.microsoft.com/oldnewthing/20050607-00/?p=35413 https://devblogs.microsoft.com/oldnewthing/20101125-00/?p=12203 Now that I think about it, The Old New Thing is also where I got the global vs local thing: "Don’t use global state to ma

Re: Passing information between modules

2022-11-20 Thread Thomas Passin
On 11/20/2022 1:50 PM, Roel Schroeven wrote: Stefan Ram schreef op 20/11/2022 om 11:39:    The idea is about parameterizing the behavior of a module.    For example, the module "M" may contain functions that contain    "input.read()" to get input and "output.write()" to write    output. Then one

Re: Passing information between modules

2022-11-20 Thread dn
On 21/11/2022 01.03, Stefan Ram wrote: dn writes: In some respects we have the (OP) problem because Python does not have "interfaces" as a formal component of the language. What one can do today is, class my_interface( metaclass=abc.ABCMeta ): """This interface ...""" @abc.abst

Re: Passing information between modules

2022-11-20 Thread Roel Schroeven
Stefan Ram schreef op 20/11/2022 om 11:39: The idea is about parameterizing the behavior of a module. For example, the module "M" may contain functions that contain "input.read()" to get input and "output.write()" to write output. Then one would write code like (the following is no

Re: Passing information between modules

2022-11-20 Thread Dan Kolis
It's certainly not an "incredibly bad idea", it is a mildly bad idea however. Why be stuck with maybe's and just text strings ? Functions as "first class operators" and object oriented languages are a natural pair with a bit of heavy thinking. The problem is... there is nobody giving you a 3

Re: Passing information between modules

2022-11-20 Thread Avi Gross
, Stefan Ram wrote: > >>> Can I use "sys.argv" to pass information between modules > >>>as follows? > >>> > >>>in module A: > >>> > >>> import sys > >>> sys.argv.append( "Hi there!" ) > >&

Re: Passing information between modules

2022-11-19 Thread Dan Kolis
In a module mostly for this purpose; ( big program means many modules aka files ): -- globalIdeas.py -- # Empty object maker ( M T ) ...

Re: Passing information between modules

2022-11-19 Thread Cameron Simpson
On 18Nov2022 10:53, Stefan Ram wrote: Can I use "sys.argv" to pass information between modules as follows? [...] Stefan, it looks like most of the replies take the form: yes you can do that but it is probably a bad idea. Could you outline the larger situation where you want

Re: Passing information between modules

2022-11-19 Thread Thomas Passin
On 11/19/2022 3:46 PM, Michael F. Stemper wrote: On 18/11/2022 04.53, Stefan Ram wrote:    Can I use "sys.argv" to pass information between modules    as follows?    in module A: import sys sys.argv.append( "Hi there!" )    in module B: import sys message = sys.argv[ -1

Re: Passing information between modules

2022-11-19 Thread Thomas Passin
On 11/19/2022 4:28 PM, Thomas Passin wrote: On 11/19/2022 3:46 PM, Michael F. Stemper wrote: On 18/11/2022 04.53, Stefan Ram wrote:    Can I use "sys.argv" to pass information between modules    as follows?    in module A: import sys sys.argv.append( "Hi there!" )   

Re: Passing information between modules

2022-11-19 Thread Michael F. Stemper
On 18/11/2022 04.53, Stefan Ram wrote: Can I use "sys.argv" to pass information between modules as follows? in module A: import sys sys.argv.append( "Hi there!" ) in module B: import sys message = sys.argv[ -1 ] I just tried and it appears that one ca

Re: Passing information between modules

2022-11-19 Thread dn
On 18/11/2022 23.53, Stefan Ram wrote: Can I use "sys.argv" to pass information between modules as follows? in module A: import sys sys.argv.append( "Hi there!" ) in module B: import sys message = sys.argv[ -1 ] . "sys.argv" is sai

Re: Passing information between modules

2022-11-18 Thread Axy via Python-list
On 18/11/2022 10:53, Stefan Ram wrote: Can I use "sys.argv" to pass information between modules as follows? in module A: import sys sys.argv.append( "Hi there!" ) in module B: import sys message = sys.argv[ -1 ] This idea has a couple of flaws so ca

Re: Passing information between modules

2022-11-18 Thread Thomas Passin
On 11/18/2022 10:19 AM, Tobiah wrote: On 11/18/22 02:53, Stefan Ram wrote:    Can I use "sys.argv" to pass information between modules    as follows?    in module A: import sys sys.argv.append( "Hi there!" )    in module B: import sys message = sys.argv[ -1 ] Kind

Re: Passing information between modules

2022-11-18 Thread Tobiah
On 11/18/22 02:53, Stefan Ram wrote: Can I use "sys.argv" to pass information between modules as follows? in module A: import sys sys.argv.append( "Hi there!" ) in module B: import sys message = sys.argv[ -1 ] Kind of seems like a code smell. I think you

Re: Information about slow execution notebook

2022-11-01 Thread Barry Scott
Reminder do not attach screen shots, they are striped in this mailing list. Cut-n-paste full error message information. Barry > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Information about slow execution notebook

2022-11-01 Thread nhlanhlah198506
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 -- https://mail.python.org/mailman/listinfo/python-list

Re: Information about Dying kernel

2022-08-08 Thread D'Arcy Cain
On 2022-08-07 21:38, Paul Bryan wrote: Have you tried turning it off and back on again? Thank you, Roy. -- D'Arcy J.M. Cain Vybe Networks Inc. A unit of Excelsior Solutions Corporation - Propelling Business Forward http://www.VybeNetworks.com/ IM:da...@vybenetworks.com VoIP: sip:da...@vybenetw

Re: Information about Dying kernel

2022-08-07 Thread Paul Bryan
Have you tried turning it off and back on again? On Sun, 2022-08-07 at 18:59 +0200, nhlanhlah198506 wrote: > Greetings What can I do if my computer said my kernels has died Thank > you Sent from my Galaxy -- https://mail.python.org/mailman/listinfo/python-list

Information about Dying kernel

2022-08-07 Thread nhlanhlah198506
Greetings What can I do if my computer said my kernels has died Thank you Sent from my Galaxy -- https://mail.python.org/mailman/listinfo/python-list

Re: Information about updating my python notebook

2022-07-25 Thread Dennis Lee Bieber
On Sat, 23 Jul 2022 18:16:20 +0200, nhlanhlah198506 declaimed the following: >Can I update my python account Sent from my Galaxy WHAT Python account? -- Wulfraed Dennis Lee Bieber AF6VN wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.fre

Re: Information about updating my python notebook

2022-07-23 Thread dn
On 24/07/2022 04.16, nhlanhlah198506 wrote: > Can I update my python account Sent from my Galaxy How did you install Python, and on which OpSys? In what respect to you want to "update"? What do you mean by "notebook" - and "account"? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/

Information about updating my python notebook

2022-07-23 Thread nhlanhlah198506
Can I update my python account Sent from my Galaxy -- https://mail.python.org/mailman/listinfo/python-list

Re: Advanced ways to get object information from within python

2021-12-23 Thread Alan Gauld
On 23/12/2021 11:01, Julius Hamilton wrote: > Lastly, the "help" function. > > I find "help" to similarly be a situation of information overload. I assume you know that you can target help() to the specific attribute or function you need not just the top level c

Re: Advanced ways to get object information from within python

2021-12-23 Thread Robert Latest via Python-list
Julius Hamilton wrote: > dir(scrapy) shows this: > > ['Field', 'FormRequest', 'Item', 'Request', 'Selector', 'Spider', > '__all__', '__builtins__', '__cached__', '__doc__', '__file__', > '__loader__', '__name__', '__package__', '__path__', '__spec__', > '__version__', '_txv', 'exceptions', 'http',

Re: Advanced ways to get object information from within python

2021-12-23 Thread Dieter Maurer
Julius Hamilton wrote at 2021-12-23 12:01 +0100: >I would like to significantly increase my abilities to find the information >I am seeking about any Python object I am using from within Python. I find >this to be a really essential skill set. After reading documentation, it >really

Advanced ways to get object information from within python

2021-12-23 Thread Julius Hamilton
Hello, I would like to significantly increase my abilities to find the information I am seeking about any Python object I am using from within Python. I find this to be a really essential skill set. After reading documentation, it really helps to get under the hood at the command line and start

RE: How do I pull the updated information from a tkinter form?

2020-08-31 Thread Steve
pull the updated information from a tkinter form? Steve wrote: > OK, I was closer than I thought. > > Two weeks ago, the concept of tkinter and these forms were totally new > to me as well as, about two days ago, python list was totally new > too. I somehow thought that "wi

RE: How do I pull the updated information from a tkinter form?

2020-08-31 Thread Peter Otten
Steve wrote: > OK, I was closer than I thought. > > Two weeks ago, the concept of tkinter and these forms were totally new to > me > as well as, about two days ago, python list was totally new too. I > somehow thought that "window.mainloop()" was supposed to be the last entry > in the function,

RE: How do I pull the updated information from a tkinter form?

2020-08-30 Thread Steve
st 30, 2020 1:55 PM To: python-list@python.org Subject: Re: How do I pull the updated information from a tkinter form? Steve wrote: > #What I cannot seem to do is to pull the adjusted #information from > the form into variables, or a #list/array, so that can be used for the > update to the f

Re: How do I pull the updated information from a tkinter form?

2020-08-30 Thread Peter Otten
Steve wrote: > #What I cannot seem to do is to pull the adjusted > #information from the form into variables, or a > #list/array, so that can be used for the update to the file. The updated data is in the StringVar-s, which, fortunately, you have available in a list ;) S

How do I pull the updated information from a tkinter form?

2020-08-30 Thread Steve
# With this program, I can read the information from # Specifications.txt file and display it on a form. # The user can then update/modify the fields. This is # all working fine and beeautifully... # # I now need to reverse the process and replace the # adjusted lines of data back into the

RE: How do I left-justify the information in the labels?

2020-08-30 Thread Steve
- From: Python-list On Behalf Of Peter Otten Sent: Sunday, August 30, 2020 10:32 AM To: python-list@python.org Subject: Re: How do I left-justify the information in the labels? Steve wrote: > How do I left-justify the information in the labels? > SVRlabel = ttk.La

Re: How do I left-justify the information in the labels?

2020-08-30 Thread Peter Otten
Steve wrote: > How do I left-justify the information in the labels? > SVRlabel = ttk.Label(window, text = SpecLine + " "*5) > SVRlabel.grid(column = 1, row = x) The text in the labels already is left-justified -- but the labels themselves are centered in

How do I left-justify the information in the labels?

2020-08-30 Thread Steve
for lineItem in range(len(ThisList)): SpecLine, Spec = GetLineByItem(ThisList[y]) OldSpec = Spec NewSpec = " " SVRlabel = ttk.Label(window, text = SpecLine + " "*5) SVRlabel.grid(column = 1, row = x) NewSpec = tk

Re: creating a csv from information I have printed to screen

2020-05-22 Thread Ciarán Hudson
This has helped a lot; cleaner output, keeping tbl format and creating a csv but the csv is not being populated. Any idea what I am doing wrong? import requests import csv, sys from bs4 import BeautifulSoup cookies = { 'ApplicationGatewayAffinity': '1d2ad8ab214d1293a4e31bcd161589fa82a54a

Re: creating a csv from information I have printed to screen

2020-05-22 Thread Peter Otten
Ciarán Hudson wrote: > This has helped a lot; cleaner output, keeping tbl format and creating a > csv but the csv is not being populated. Any idea what I am doing wrong? > writer = csv.writer(sys.stdout) > writer.writerow([ > 'Arriving From' > 'Airline', > 'Scheduled to arrive', 'Late

Re: creating a csv from information I have printed to screen

2020-05-22 Thread Peter Otten
Ciarán Hudson wrote: > How do I edit the code below to create a csv file which includes the > information I have printed at the bottom? > > I'm pulling arrival data from an airport website and printing out only the > flight info. I want to save that flight info to a CSV fil

creating a csv from information I have printed to screen

2020-05-21 Thread Ciarán Hudson
How do I edit the code below to create a csv file which includes the information I have printed at the bottom? I'm pulling arrival data from an airport website and printing out only the flight info. I want to save that flight info to a CSV file. import requests from bs4 import Beautifu

Re: Python in Blender. Writing information to a file.

2019-08-09 Thread Cameron Simpson
On 09Aug2019 20:53, Paul St George wrote: I almost understand. Are you saying I should change the first line of code to something like: |outstream = with open(path to my file,'w') # this is invalid syntax| and then delete the outstream.close() No, you should do what Peter wrote: with open

Re: Re: Python in Blender. Writing information to a file.

2019-08-09 Thread Paul St George
On 09/08/2019 15:59, Rhodri James wrote: On 09/08/2019 14:54, Paul St George wrote: On 09/08/2019 04:09, Cameron Simpson wrote: On 08Aug2019 22:42, Paul St George wrote: On 08/08/2019 10:18, Peter Otten wrote: The print() function has a keyword-only file argument. So: with open(..., "w") a

Re: Python in Blender. Writing information to a file.

2019-08-09 Thread Rhodri James
On 09/08/2019 14:54, Paul St George wrote: On 09/08/2019 04:09, Cameron Simpson wrote: On 08Aug2019 22:42, Paul St George wrote: On 08/08/2019 10:18, Peter Otten wrote: The print() function has a keyword-only file argument. So: with open(..., "w") as outstream:     print("Focal length:", bpy

Re: Python in Blender. Writing information to a file.

2019-08-09 Thread Paul St George
On 09/08/2019 04:09, Cameron Simpson wrote: On 08Aug2019 22:42, Paul St George wrote: On 08/08/2019 10:18, Peter Otten wrote: The print() function has a keyword-only file argument. So: with open(..., "w") as outstream:     print("Focal length:", bpy.context.object.data.lens, file=outstream)

Re: Python in Blender. Writing information to a file.

2019-08-08 Thread Cameron Simpson
On 08Aug2019 22:42, Paul St George wrote: On 08/08/2019 10:18, Peter Otten wrote: The print() function has a keyword-only file argument. So: with open(..., "w") as outstream: print("Focal length:", bpy.context.object.data.lens, file=outstream) [...] That worked perfectly. outstream = o

Re: Re: Python in Blender. Writing information to a file.

2019-08-08 Thread Paul St George
],"\nPlane rotation Z:",bpy.data.objects["Plane"].rotation_euler[2])| ---Plane rotation X: 0.0 ---Plane rotation Y: 0.0 ---Plane rotation Z: 0.0 My question: How do I write all the results to a file? I have tried file.write but can only write one argument at a time. Is there a b

Re: Python in Blender. Writing information to a file.

2019-08-08 Thread Peter Otten
s to a file? I have tried file.write but > can only write one argument at a time. Is there a better way to open a > file, write the collected information to it and then close the file? > The print() function has a keyword-only file argument. So: with open(..., "w") as outstrea

Python in Blender. Writing information to a file.

2019-08-08 Thread Paul St George
;Plane"].rotation_euler[2])| ---Plane rotation X: 0.0 ---Plane rotation Y: 0.0 ---Plane rotation Z: 0.0 My question: How do I write all the results to a file? I have tried file.write but can only write one argument at a time. Is there a better way to open a file, write the collected information

Re: Python Information Form

2018-08-19 Thread dieter
Suman Mupparapu writes: > Working on a creating a small information form ..and encountering issues > when trying to edit the details using Python Flask and MYSQL DB. > > Placed the code below for your reference. Please help to fix this issue. > Let me know if you need any other

Re: Python Information Form

2018-08-19 Thread MRAB
On 2018-08-19 15:41, Suman Mupparapu wrote: Hi Team, I am newbie to Python and glad to be part of the team. Sorry for starting with a help. Working on a creating a small information form ..and encountering issues when trying to edit the details using Python Flask and MYSQL DB. Placed the code

Python Information Form

2018-08-19 Thread Suman Mupparapu
Hi Team, I am newbie to Python and glad to be part of the team. Sorry for starting with a help. Working on a creating a small information form ..and encountering issues when trying to edit the details using Python Flask and MYSQL DB. Placed the code below for your reference. Please help to fix

Re: macOS specific - reading calendar information

2018-03-15 Thread Ned Deily
On 2018-03-15 03:58, Christian Gollwitzer wrote: > Am 15.03.18 um 08:32 schrieb Jan Erik Moström: >> I would like to read what calendar events I have on a range of days. I >> would like to get the data from whatever storage Calendar use, in my >> personal case I sync to iCloud. [...] > The native s

Re: macOS specific - reading calendar information

2018-03-15 Thread Christian Gollwitzer
Am 15.03.18 um 08:32 schrieb Jan Erik Moström: I would like to read what calendar events I have on a range of days. I would like to get the data from whatever storage Calendar use, in my personal case I sync to iCloud. An example would be something along these lines x = getcalendarevents('201

Re: macOS specific - reading calendar information

2018-03-15 Thread Jan Erik Moström
On 14 Mar 2018, at 21:40, Larry Martell wrote: I've been trying to find some example of how to read calendar info on macOS but I haven't found anything ... I'm probably just bad at searching !! What I want to do is to read calendar info for a date range. Does anyone know of an example of ho

Re: macOS specific - reading calendar information

2018-03-14 Thread Larry Martell
On Wed, Mar 14, 2018 at 4:31 PM, Jan Erik Moström wrote: > I've been trying to find some example of how to read calendar info on macOS > but I haven't found anything ... I'm probably just bad at searching !! > > What I want to do is to read calendar info for a date range. Does anyone > know of an

macOS specific - reading calendar information

2018-03-14 Thread Jan Erik Moström
I've been trying to find some example of how to read calendar info on macOS but I haven't found anything ... I'm probably just bad at searching !! What I want to do is to read calendar info for a date range. Does anyone know of an example of how to do this? = jem -- https://mail.python.org/m

Test bank and Solutions Manual for ACCOUNTING INFORMATION SYSTEMS 2nd Edition,2nd e,2e by Richardson,Janie Chang Vern Odmark,Rod E. Smith

2017-11-10 Thread smtbportal
Dear Students, To get Test bank and Solutions Manual for ACCOUNTING INFORMATION SYSTEMS 2nd Edition,2nd e,2e by Richardson,Janie Chang Vern Odmark,Rod E. Smith Contact us 24/7 at smtbportal @ gmail dot com, smtbportal @ hotmail . com Please DO NOT POST/REPLY HERE, just email us at smtbportal

Specialization for learning python from university of Michigan school of information

2017-11-04 Thread fatma . fars33
https://youtu.be/eblAxa5iO24. The video is just an introduction for a course on https://studyscienceblog.wordpress.com/2017/10/28/university-of-mitchigan-s-courses -- https://mail.python.org/mailman/listinfo/python-list

Re: Merge pdf files using information from two files

2017-09-08 Thread dieter
not be easy: PDF is a page layout oriented format, not a format to facilitate the processing of general structural data (such as e.g. XML). You could use a package like "pdfminer" to get at the text content of a PDF file. You will then need specialized code (developed by yourself) to reconstruct

Re: Merge pdf files using information from two files

2017-09-08 Thread Christopher Reimer
> On Sep 8, 2017, at 1:21 PM, accessnew...@gmail.com wrote: > Ideas as to how to accomplish this? Export your spreadsheets as Comma Separated Values (CSV) files and use the CSV module to read/write those files. https://docs.python.org/3/library/csv.html Chris R. -- https://mail.python.org/m

Merge pdf files using information from two files

2017-09-08 Thread accessnewbie
I have two files (right now they are spreadsheets but I can export them to any format). File1 has StoreID (unique) in one column and a pdf map location in the second column. (Names not really sequenced numerically) 1 C:/maps/map1.pdf 2 C:/maps/map2.pdf 3 C:/maps/map3.pdf 4 C:/m

Re: how to get partition information of a hard disk with python

2017-07-07 Thread Tim Chase
Strange. The OP's message didn't make it here, but I'm seeing multiple replies > On Wednesday, September 22, 2010 at 4:01:04 AM UTC+5:30, Hellmut > Weber wrote: > > Hi list, > > I'm looking for a possibility to access the partiton inforamtion > > of a hard disk of my computer from within a python

Re: how to get partition information of a hard disk with python

2017-07-07 Thread Tim Golden
odule 'parted' but didn't see any possibility to get the desired information. Is there any reasonable documentation for the parted module? Any idea is appreciated ;-) import os os.system("fdisk -l") #you will get information about your hdd,partition psutil is usually

Re: how to get partition information of a hard disk with python

2017-07-06 Thread palashkhaire92
didn't see any possibility to > get the desired information. > Is there any reasonable documentation for the parted module? > > Any idea is appreciated ;-) > > TIA > > Hellmut > > -- > Dr. Hellmut Weber m...@hellmutweber.de > Degenfeldstraße 2

Re: Obtain Ceritificate Information from Invalid or Self-Signed Certificate in Python

2017-04-03 Thread dieter
Kenneth Buckler writes: > I'm working on a Python 2.7.13 (Win x64) script to verify SSL certificates, > and alert for problems. Specifically, I'm looking to return the date the > cert expires or did expire. However, I'm running into an issue where the > script will ret

Obtain Ceritificate Information from Invalid or Self-Signed Certificate in Python

2017-04-03 Thread Kenneth Buckler
I'm working on a Python 2.7.13 (Win x64) script to verify SSL certificates, and alert for problems. Specifically, I'm looking to return the date the cert expires or did expire. However, I'm running into an issue where the script will return information only if the certificate is

Re: PLEASE READ - information on (Case 58158) [RELEASE] Python 3.6.0 is released!

2016-12-23 Thread NHS Digital - Digital Communications
contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly

A comparatively efficient software for embedding secret information bits into nataural language texts

2016-12-15 Thread Mok-Kong Shen
WORDLISTTEXTSTEGANOGRAPHY is a new software (employing an extensive English word list) which, while performing linguistic steganography, also involves pseudo-random separation of the word list into two sublists (for denoting 0 and 1 bits) that are dependent on dynamic session-key materials, thus

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

2016-08-20 Thread iMath
On Friday, August 19, 2016 at 9:45:08 PM UTC+8, Friedrich Rentsch wrote: > 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 > &

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

2016-08-20 Thread iMath
On Friday, August 19, 2016 at 9:19:22 PM UTC+8, Chris Angelico wrote: > On Fri, Aug 19, 2016 at 11:13 PM, iMath wrote: > > 1. searching the page two times rather than one is a little bit time > > consuming . > > Have you measured that? If not, ignore it. You're searching a web > page; if you're

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? >&

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

2016-08-19 Thread Chris Angelico
On Fri, Aug 19, 2016 at 11:13 PM, iMath wrote: > 1. searching the page two times rather than one is a little bit time > consuming . Have you measured that? If not, ignore it. You're searching a web page; if you're downloading that before you search it, chances are very good that you spend far mo

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

2016-08-19 Thread iMath
1. searching the page two times rather than one is a little bit time consuming . 2. starting the second search from the first match.endpos does reduce the time consuming . 3. how to combine both patterns into one regex? while using the special | regex operator only matches one regex not both --

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

2016-08-19 Thread Peter Otten
iMath wrote: > I need to use regex to search two types of Information within a web page, Did you try specialised tools like BeautifulSoup? > while it seems searching the page two times rather than one is much time > consuming It "seems"? Try it and only "fix" it

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

2016-08-19 Thread iMath
each regex only has one matched result in the web page -- https://mail.python.org/mailman/listinfo/python-list

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

2016-08-19 Thread iMath
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? -- https://mail.python.org/mailman/listinfo/python

How to extract error information after failing to call Py_initialize()

2016-06-29 Thread Tu Marshal
Hello Experts, I sent my issue to Python help email list. Matt from that list suggested me to ask help from "Python list". The link described how to get error information from Python after Python is initialized. It didn't meet my requirement. http://mateusz.loskot.net/posts/20

Re: Convert list to another form but providing same information

2016-03-22 Thread anantguptadbl
On Tuesday, March 22, 2016 at 12:01:10 AM UTC+5:30, Maurice wrote: > Just figured why: > > If I type this on the kernel: > > weirdList = [[0]*3]*5 > > weirdList > Out[257]: [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]] > > weirdList[0][0] = 1 > > weirdList > Out[259]: [[1, 0, 0], [1,

Re: Convert list to another form but providing same information

2016-03-22 Thread Steven D'Aprano
On Tue, 22 Mar 2016 12:35 pm, Paul Rubin wrote: > Maurice writes: >> I have a list such [6,19,19,21,21,21] >> Therefore the resulting list should be: >> [0,0,0,0,0,0,1,0,0,0...,2,0,3,0...0] > > Rather than a sparse list you'd typically want a dictionary (untested): > > from collections import

Re: Convert list to another form but providing same information

2016-03-21 Thread Steven D'Aprano
On Tuesday 22 March 2016 11:31, Ben Bacarisse wrote: > Ian Kelly writes: > >> On Mon, Mar 21, 2016 at 2:03 PM, Ben Bacarisse >> wrote: >>> For experts here: why can't I write a lambda that has a statement in it >>> (actually I wanted two: lambda l, i: l[i] += 1; return l)? >> >> https://docs.py

Re: Convert list to another form but providing same information

2016-03-21 Thread Paul Rubin
Maurice writes: > I have a list such [6,19,19,21,21,21] > Therefore the resulting list should be: > [0,0,0,0,0,0,1,0,0,0...,2,0,3,0...0] Rather than a sparse list you'd typically want a dictionary (untested): from collections import defaultdict the_list = [0,0,0,0,0,0,1,0,0,0...,2,0,3,0...0]

Re: Convert list to another form but providing same information

2016-03-21 Thread Chris Angelico
On Tue, Mar 22, 2016 at 11:31 AM, Ben Bacarisse wrote: > However, the explanation ("because Python’s syntactic framework can't > handle statements nested inside expressions") seemed, at first, to be > saying you can't because you can't! But the term "syntactic framework" > hints that it's not rea

Re: Convert list to another form but providing same information

2016-03-21 Thread Ben Bacarisse
Ian Kelly writes: > On Mon, Mar 21, 2016 at 2:03 PM, Ben Bacarisse wrote: >> For experts here: why can't I write a lambda that has a statement in it >> (actually I wanted two: lambda l, i: l[i] += 1; return l)? > > https://docs.python.org/3/faq/design.html#why-can-t-lambda-expressions-contain-st

Re: Convert list to another form but providing same information

2016-03-21 Thread Steven D'Aprano
On Tue, 22 Mar 2016 05:26 am, Maurice wrote: > I have a list such [6,19,19,21,21,21] (FYI this is the item of a certain > key in the dictionary) > > And I need to convert it to a list of 32 elements (meaning days of the > month however first element ie index 0 or day zero has no meaning - > keepi

Re: Convert list to another form but providing same information

2016-03-21 Thread Ian Kelly
On Mon, Mar 21, 2016 at 2:12 PM, Ian Kelly wrote: > On Mon, Mar 21, 2016 at 2:03 PM, Ben Bacarisse wrote: >> For experts here: why can't I write a lambda that has a statement in it >> (actually I wanted two: lambda l, i: l[i] += 1; return l)? > > https://docs.python.org/3/faq/design.html#why-can-

Re: Convert list to another form but providing same information

2016-03-21 Thread Ian Kelly
On Mon, Mar 21, 2016 at 2:03 PM, Ben Bacarisse wrote: > For experts here: why can't I write a lambda that has a statement in it > (actually I wanted two: lambda l, i: l[i] += 1; return l)? https://docs.python.org/3/faq/design.html#why-can-t-lambda-expressions-contain-statements -- https://mail.p

Re: Convert list to another form but providing same information

2016-03-21 Thread Ben Bacarisse
Maurice writes: > Hello, hope everything is okay. I think someone might have dealt with > a similar issue I'm having. > > Basically I wanna do the following: > > I have a list such [6,19,19,21,21,21] (FYI this is the item of a >certain key in the dictionary) > > And I need to convert it to a list

Re: Convert list to another form but providing same information

2016-03-21 Thread Mark Lawrence
On 21/03/2016 18:30, Maurice wrote: Just figured why: If I type this on the kernel: weirdList = [[0]*3]*5 weirdList Out[257]: [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]] weirdList[0][0] = 1 weirdList Out[259]: [[1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0]] All first ele

Re: Convert list to another form but providing same information

2016-03-21 Thread Peter Otten
Maurice wrote: > Hello, hope everything is okay. I think someone might have dealt with a > similar issue I'm having. > > Basically I wanna do the following: > > I have a list such [6,19,19,21,21,21] (FYI this is the item of a certain > key in the dictionary) > > And I need to convert it to a li

Re: Convert list to another form but providing same information

2016-03-21 Thread Mark Lawrence
On 21/03/2016 18:26, Maurice wrote: Hello, hope everything is okay. I think someone might have dealt with a similar issue I'm having. Basically I wanna do the following: I have a list such [6,19,19,21,21,21] (FYI this is the item of a certain key in the dictionary) And I need to convert it t

Re: Convert list to another form but providing same information

2016-03-21 Thread Maurice
Just figured why: If I type this on the kernel: weirdList = [[0]*3]*5 weirdList Out[257]: [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]] weirdList[0][0] = 1 weirdList Out[259]: [[1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0]] All first elements of the sublists also changes. I

  1   2   3   4   5   6   7   >