Re: Object Reference question

2009-08-21 Thread Simon Forman
On Aug 21, 12:12 pm, josef wrote: > > > I need the object reference name (a,b,c,d) from dk to use as input for > > > a file. > > > You'll have to track that yourself. > > I'm a bit shocked that there isn't a method for catching object > reference names. I think that something like a = MyClass0(nam

Re: TypeError while checking for permissions with os.access() on windows xp

2009-08-21 Thread Simon Forman
On Aug 21, 1:33 pm, ryniek90 wrote: > I've got some code that checks priviliges on two paths: > First - chosen by user > Second - hardcoded home directory represented by **os.getenv('HOME')** - > (os.getenv('HOME') works both on Linux and Windows) > > Here's the code: > " > def __check_set_perm(se

Re: Urllib2 not working

2009-08-22 Thread Simon Forman
On Sat, Aug 22, 2009 at 2:12 PM, Carlos Fabian Ramirez wrote: > Hello, > When I try to open a URL using urllib2.urlopen it returns Name or service > not known. It is not a problem with my Internet I believe, since I have > Internet access on my computer, and I have verified it is not a syntax, or >

Re: Python for professsional Windows GUI apps?

2009-08-26 Thread Simon Brunning
a look at what the resolver boys are up to: <http://www.resolversystems.com/>. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Usefull python tutorial

2009-08-26 Thread Simon Brunning
 a = a or [] Strangely not in the tutorial: <http://docs.python.org/library/stdtypes.html#truth-value-testing>. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on the "csv" library

2009-08-27 Thread Simon Brunning
iously > gives them what they expect rather than forcing them to comply with > The One True Way. When people export to a comma separated value file, they are almost certainly expecting a file containing values separated by comas. If Excel isn't giving them this by default, it's

Re: Usage of main()

2009-09-03 Thread Simon Brunning
g? > And in addition: Can someone please explain why the first version > is so much slower? Access to globals is slower than access to a function's locals. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of Python immutability

2009-09-07 Thread Simon Brunning
are, interned. This will cut down on their number considerably. ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Use python to execute a windows program

2009-09-11 Thread Simon Brunning
hes are very much easier than GUI automation. If none of these options are available, <http://pywinauto.openqa.org/> is probably what you need. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: recommendation for webapp testing?

2009-09-16 Thread Simon Brunning
2009/9/16 Schif Schaf : > > I need to do some basic website testing (log into account, add item to > cart, fill out and submit forms, check out, etc.). What modules would > be good to use for webapp testing like this? <http://code.google.com/p/webdriver/> might be worth a look.

Re: recommendation for webapp testing?

2009-09-17 Thread Simon Brunning
oment, though, you have to pick one or the other. Mechanize is a superb library for its intended purpose - I use it all the time. It's lack of support for pages with JavaScript functionality, though, means it's not very useful at a testing tool for modern web sites. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why use "locals()"

2009-09-18 Thread Simon Forman
have no other way to know what local variables have been set. > > ~Sean The zeroth "rule" of zen is "don't take the rules so seriously". "They're really more like guidelines anyway." Regards, ~simon -- http://mail.python.org/mailman/listinfo/python-list

Re: detmining name during an assignment

2009-09-18 Thread Simon Forman
On Sep 18, 1:00 pm, Jamie Riotto wrote: > I have an app that uses Python scripting. When a user creates a new object: > > objName = newObject() > > I'd like the newObject be able to use objName as its internal name. > So, if a user says: > > cube1 = Cube() > >  A "cube1" object should apear in the

Re: How to improve this code?

2009-09-18 Thread Simon Forman
anks, > Oltmans It's not really relevant to this particular task (since you want to stop after finding an 'e' in match) but whenever you're doing something like this: if e in match: result = True else: result = False You can just assign the result of the boolean express

Re: How to change string or number passed as argument?

2009-09-20 Thread Simon Forman
. You can return new data objects (like str.lower() etc.. do) or you can wrap them in a namespace (a dict or class instance) or you can pass a list object that contains the string or int or whatever, and your functions can replace the values in the dict/instance/list. HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: What are the naming convention for private member variable, and private and public member function?

2009-09-20 Thread Simon Forman
On Sep 19, 11:33 pm, Peng Yu wrote: > Hi, > > It says inhttp://www.python.org/dev/peps/pep-0008/ > > "    Method Names and Instance Variables > >       Use the function naming rules: lowercase with words separated by >       underscores as necessary to improve readability. > >       Use one leadin

Re: Comparison of parsers in python?

2009-09-20 Thread Simon Forman
On Sep 19, 9:34 pm, Peng Yu wrote: > On Sep 19, 6:05 pm, Robert Kern wrote: > > > Peng Yu wrote: > > > Hi, > > > > I did a google search and found various parser in python that can be > > > used to parse different files in various situation. I don't see a page > > > that summarizes and compares a

Re: How to get the minimum number that can be represented?

2009-09-20 Thread Simon Forman
this case you actually desire to do different things based on the type of the argument. Either use an if statement or you can dispatch on the type using a dict: mins = { float: 2.2250738585072014e-308, int: 0, long: 0, } def f(arg): return mins[type(arg)] (Hint: google for "duck typing".) HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic Form

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 10:46 AM, Victor Subervi wrote: > Hi; > I have a dynamic form in which I do the following: > 1) Request two fields (company name, number of entries). That is sent back > to the form. > 2) If the two fields are not None, the form requests other data. That, too, > is sent bac

Re: Read header and data from a binary file

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 4:30 PM, Jose Rafael Pacheco wrote: > Hello, > > I want to read from a binary file called myaudio.dat > Then I've tried the next code: > > import struct > name = "myaudio.dat" > f = open(name,'rb') > f.seek(0) Don't bother to seek(0) on a file you just opened. > chain = "

Re: Searching a large dictionary

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 5:50 PM, Support Desk wrote: > I need help searching a large python dictionary. The dictionary is setup > like so > > Key[{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}] > > Key2[{'item':value,

Re: Searching a large dictionary

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 6:30 PM, Support Desk wrote: > Chris,  Yes that is the correct syntax, thanks > Okay, but correct syntax of what? Help us help you. > On Tue, Sep 22, 2009 at 5:22 PM, Chris Rebert wrote: >> >> On Tue, Sep 22, 2009 at 2:50 PM, Support Desk >> wrote: >> > I need help se

Re: Most "active" coroutine library project?

2009-09-23 Thread Simon Forman
ere any others I've missed? And what would the > consensus be on the which has the most active community behind it? > -- > http://mail.python.org/mailman/listinfo/python-list > Coroutines are built into the language. There's a good talk about them here: http://www.dabeaz.com/coroutines/ HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: arrays in python

2009-09-23 Thread Simon Forman
On Wed, Sep 23, 2009 at 1:14 PM, Rudolf wrote: > Can someone tell me how to allocate single and multidimensional arrays > in python. I looked online and it says to do the following x = > ['1','2','3','4'] > > However, I want a much larger array like a 100 elements, so I cant > possibly do that. I

Re: arrays in python

2009-09-23 Thread Simon Forman
On Wed, Sep 23, 2009 at 1:22 PM, Donn wrote: > On Wednesday 23 September 2009 19:14:20 Rudolf wrote: >> I want to allocate an array and then populate it >> using a for loop. > You don't need to allocate anything, just use the list or dictionary types. > > l=[] #empty list > for x in range(1,50

Re: Most "active" coroutine library project?

2009-09-23 Thread Simon Forman
n programmers call coroutines aren't really the same as > what the programming community at large would call a coroutine. > > Jean-Paul Really? I'm curious as to the differences. (I just skimmed the entry for coroutines in Wikipedia and PEP 342, but I'm not fully enlightened.) Warm regards, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching Dictionary

2009-09-23 Thread Simon Forman
On Wed, Sep 23, 2009 at 2:31 PM, Support Desk wrote: > > i am trying to search a large Python dictionary for a matching value. The > results would need to be structured into a new dictionary with the same > structure. Thanks. > > The structure is like this > > { Key : [{'item':value,'item2':value,

Re: arrays in python

2009-09-23 Thread Simon Forman
On Wed, Sep 23, 2009 at 10:03 PM, AggieDan04 wrote: > On Sep 23, 3:02 pm, Simon Forman wrote: >> On Wed, Sep 23, 2009 at 1:14 PM, Rudolf wrote: >> > Can someone tell me how to allocate single and multidimensional arrays >> > in python. I looked online and it

Re: Regex trouble

2009-09-24 Thread Simon Forman
#x27;877', '888', '713', '866', '011', '001', '281', '800']) long_distance= {} for key1, value1 in x.iteritems(): if key1 == 'dest': if value1[:3] not in local_prefixes: long_distance[key1] = value1 HT

Re: help wanted with list

2009-09-24 Thread Simon Brunning
2009/9/24 Ahmed Shamim : > list = [ 'a', '1', 'b', '2'] > what would be the logic, if I input a to get output 1. Turn it into a dictionary first: >>> mylist = [ 'a', '1', 'b', '2'] >&

Re: iterate over list while changing it

2009-09-24 Thread Simon Forman
ontinue if x == 4: n.append(23) # Increment the index # only if you didn't # delete anything during # this iteration. i += 1 N = range(6) f(N) print N This prints: 0 => 0 1 => 1 2 => 2 3 => 3 3 => 4 4 => 5 5 => 23 [0, 1, 2, 4, 5, 23] HTH, ~Simon > > Thanks for any hints, > Torsten. > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex trouble

2009-09-24 Thread Simon Forman
On Thu, Sep 24, 2009 at 6:31 PM, Rhodri James wrote: > On Thu, 24 Sep 2009 19:45:37 +0100, Simon Forman > wrote: > >> FWIW this problem is too simple (IMHO) for regular expressions. >> Simply carve off the first three digits and check against sets of the >> pr

Re: Most "active" coroutine library project?

2009-09-25 Thread Simon Forman
t; that the main routine has to know ahead of time when > calling a function whether that function might need to yield or > not. You mean a "trampoline" function? I.e. you have to call into your coroutines in a special main function that expects as part of the yielded value(s) the next coroutine to pass control to, and your coroutines all need to yield the next coroutine? ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: CRIMINAL YanQui MARINES Cesar Laurean Regularly RAPE GIRLS Maria Lauterbach and KILL THEM - CIA/Mossad/Jew did 911 - Wikileaks for ever CRIMES of YANQUI Bustards

2010-08-26 Thread Simon Brooke
On Wed, 25 Aug 2010 07:31:03 -0700, Standish P wrote: > ... so you want to render this in TeX ... ? It was very thoughtful of you to repost the whole spammer text for the benefit of those of us who have the spammer killfiled, and consequently would not otherwise have been able to read it. --

Re: Printing the name of a variable

2010-09-10 Thread Simon Brunning
an-my-code-discover-the-name-of-an-object.htm> -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to make a web services in python ???

2010-09-20 Thread Simon Brunning
On 20 September 2010 16:09, Ariel wrote: > Soap web services I think. I think the cool kids would be using <https://fedorahosted.org/suds/>, but for the fact that the cool kids all build REST (<http://oreilly.com/catalog/9780596805838>) rather than SOAP these days. -- Cheers, Si

Re: ctypes

2010-09-23 Thread Simon Brunning
s anyone in this list with experience with this sort of > thing that could point me in the right direction. A good start would be to tell us what you've tried, and what goes wrong when you try it. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: [ctpug] Introducing Kids to Programming: 2 or 3?

2010-09-27 Thread Simon Cross
ndly the software stack involved is quite deep in some places. For example, database support might require porting MySQLdb, then SQLAlchemy, then the web framework and only after that the web application itself. [1] Which should hopefully make it out before 2011. :) Schiavo Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: A question about yield

2010-11-08 Thread Simon Brunning
eeded basis; which is to say, "line-by-line". IIRC, it's somewhere in between. Python will read the file in blocks. If only *looks* like it's reading the file line by line. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Is Eval *always* Evil?

2010-11-10 Thread Simon Mullis
Hi All, I'm writing a Django App to webify a Python script I wrote that parses some big XML docs and summarizes certain data contained within. This app will be used by a closed group of people, all with their own login credentials to the system (backed off to the corp SSO system). I've already got

Re: Is Eval *always* Evil?

2010-11-11 Thread Simon Mullis
On 11 November 2010 09:07, John Nagle wrote: >>> Am 10.11.2010 18:56, schrieb Simon Mullis: >>> Yes, eval is evil, may lead to security issues and it's unnecessary >>> slow, too. > >   If you have to use "eval", use the 2 or 3 argument form with a

Re: parse date/time from a log entry with only strftime (and no regexen)

2010-11-11 Thread Simon Mullis
""" Regex lookup...""" return RegexBuilder.lookup_table[match.group()] > 2009/2/3 andrew cooke >> >> > > ValueError: unconverted data remains:  this is the remainder of the >> > > log >> > > line >> > > that I do not care about >> >> you could catch the ValueError and split at the ':' in the .args >> attribute to find the extra data.  you could then find the extra data >> in the original string, use the index to remove it, and re-parse the >> time. >> >> ugly, but should work. >> andrew >> -- >> http://mail.python.org/mailman/listinfo/python-list > > > > -- > Simon Mullis > _ > si...@mullis.co.uk > -- http://mail.python.org/mailman/listinfo/python-list

RE: Python application launcher (for Python code)

2017-02-20 Thread Simon Ward
as IDLE[2], where this is all integrated into one convenient application. From some of what you said above I suggest taking a look at Jupyter Notebook[3] and/or the underlying iPython[4] shell. [2]: https://docs.python.org/3/library/idle.html [3]: http://jupyter.org/ [4]: https://ipython.org/ Simon -- Sent from Kaiten Mail. Please excuse my brevity. -- https://mail.python.org/mailman/listinfo/python-list

Python benefits over Cobra

2011-04-05 Thread Brendan Simon (eTRIX)
I just came across the Cobra language, which appears to be heavily influenced by Python (and other languages). The pitch sounds great. It's supposed to have: 1. Quick, expressive coding 2. Fast execution 3. Static and dynamic binding 4. Language level support for quality http:/

Python3 "designed right" (was: PYTHONPATH)

2011-04-18 Thread Brendan Simon (eTRIX)
On 19/04/2011 2:15 AM, python-list-requ...@python.org wrote: Subject: Re: PYTHONPATH From: MRAB Date: Mon, 18 Apr 2011 16:31:31 +0100 To: python-list@python.org On 18/04/2011 05:37, harrismh777 wrote: [snip] In retrospect, in many ways this is why I am relatively patient with the Python3 dev

Re: [ANN] Python 2.5.6 Release Candidate 1

2011-04-18 Thread Brendan Simon (eTRIX)
On 19/04/2011 9:05 AM, python-list-requ...@python.org wrote: Am 18.04.2011 09:59, schrieb Werner F. Bruhin: > On 04/17/2011 11:57 PM, "Martin v. Löwis" wrote: >>http://www.python.org/2.5.6 If there is an official release of source (e.g. 2.5.5 and 2.5.6) why aren't binaries produced (

Re: Abandoning Python

2011-05-22 Thread Brendan Simon (eTRIX)
On 23/05/11 7:17 AM, python-list-requ...@python.org wrote: > Subject: > Re: Abandoning Python > From: > John Lee > Date: > Sun, 22 May 2011 21:13:44 + (UTC) > > >> > >> > Have you looked at Falcon (http://www.falconpl.org/)? It seems to have a >> > lot >> > of what you are looking for. > I

Python Linked list?

2005-10-31 Thread Simon Roses Femerling
Hi there!   I'm looking for a linked list class or lib ? Any suggestions ?   Is for a project I'm working on.   Sincerely,   Simon Roses Femerling -- http://mail.python.org/mailman/listinfo/python-list

win32pipe.popen3

2005-08-17 Thread Jakob Simon-Gaarde
nt behaviour of win32pipe.popen2(), win32pipe.popen3() and win32pipe.popen4() would be acceptable for me if I knew a way to test if there was something ready for reading, but I can't see how to do that test, therfore I don't know when to stop reading from output :( Is there a solution for

Re: win32pipe.popen3

2005-08-17 Thread Jakob Simon-Gaarde
Me again. I forgot to mention that readline() in popen2,3 and 4 even locks up the parent-proces though it is called from a thread, so it's a real deadlock. -- http://mail.python.org/mailman/listinfo/python-list

Re: Digest MD5 authentication over using ZSI

2005-09-21 Thread Jakob Simon-Gaarde
er() request._specification = specification res = portType.FindAddress(request) #- Best regards Jakob Simon-Gaarde -- http://mail.python.org/mailman/listinfo/python-list

Two questions: python/Net(c#) and Win Raw sockets?

2005-02-10 Thread Simon Roses Femerling
Hi all,   First Question: Anyone has experience with any of this Python/Net implementations:   - PythonNet - IronPython - Boo   Which is best for using in a c# app for embedding and extending ?   Second Question: I know that python 2.3 _socket.dll was not compile with raw socket support on wi

Anyone have a python socket.pyd that support raw socket for windows?

2004-12-23 Thread Simon Roses Femerling
Hi all,   I got python 2.3 on a XP and win2k. I'm looking for a _socket.pyd that support raw socket (IP_HDRINCL). I did found someone guy that did compile his own _socket (pysockraw) but the web is not working anymore :/   I'm lazy to compile my own :)   Thx, and Merry X-mas!!   S

Help using Thread (or other method)

2016-02-08 Thread Brendan Simon (eTRIX)
Hi. Need some urgent help. I have a python app that uses `select` to wait for data from an arm embedded linux kernel interrupt (every second). The mainloop of the app then grabs data from some memory mapped area, processes it and then does a http post to a server. The problem is the http post c

Help needed to create a Python extension library for an existing shared memory hash table library

2014-03-22 Thread Simon Hardy-Francis
hon. I was wondering if anybody in this group has experience writing extension libraries for Python? Could you help? Or could we collaborate? Thanks and all the best, Simon [1] https://github.com/simonhf/sharedhashfile [2] http://www.quora.com/Inter-Process-Communication-1/Whats-a-good-library-to-s

Re: What is Expressiveness in a Computer Language

2006-06-09 Thread Simon Richard Clarkstone
I know *I* can't be trusted with pointers ;-) , but I know many programmers benefit greatly from them. Of course, knowing that the programmer cannot do something does help the compiler stop you shooting yourself in the foot. -- Simon Richard Clarkstone: [EMAIL PROTECTED]/s?m?n.cl?rkst?n?

Re: scripting browsers from Python

2005-05-31 Thread Olivier Favre-Simon
On Tue, 31 May 2005 00:52:33 -0700, Michele Simionato wrote: > I would like to know what is available for scripting browsers from > Python. > For instance, webbrowser.open let me to perform GET requests, but I > would like > to do POST requests too. I don't want to use urllib to emulate a > browse

Re: scripting browsers from Python

2005-06-01 Thread Olivier Favre-Simon
On Wed, 01 Jun 2005 22:27:44 +, John J. Lee wrote: > Olivier Favre-Simon <[EMAIL PROTECTED]> writes: > >> On Tue, 31 May 2005 00:52:33 -0700, Michele Simionato wrote: >> >> > I would like to know what is available for scripting browsers from >>

RE: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-28 Thread Simon Roses Femerling
Hello Martin, I installed wxpython 2.8 using the installer (wxPython2.8-win32-unicode-2.8.4.0-py25.ex), yeah I assume is the 32 bits version. Is there any 64 version installer or do I need to build myself ? Thanks, SRF -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

RE: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-29 Thread Simon Roses Femerling
de 2007 23:25 To: Simon Roses Femerling Cc: python-list@python.org Subject: Re: Vista 64 + Python2.5 + wxpython 28 issue > Is there any 64 version installer or do I need to build myself ? There are hardly AMD64 versions of *anything* but the base Python distribution. I strongly advise to u

matplotlib Basemap help

2007-05-30 Thread simon . murphy . nz
;m an astronomer) which denotes southern latitudes with a minus sign e.g. -45 deg. Any ideas? Thanks in advance, Simon Murphy -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-01-26 Thread Brendan Simon (eTRIX)
Since it seems the python motto is "Batteries included", then it would seem to me that wxPython is the natural fit as it also has "Batteries included" (e.g. accessibility, native look-n-feel, mature and evolving, can produce simple or complex gui programs, etc, etc)

Re: wxPython in the context of Eclipse

2011-02-20 Thread Brendan Simon (eTRIX)
already done). If I recall correctly, I had to specify the python interpreter to use. It added a whole lot of paths to the PYTHONPATH variable which caused me some grief. I ended up removing them all (or most of them) and it worked fine after that. Cheers, Brendan. -- Brendan Simon

Can't find elements using ElementTree find method

2010-08-31 Thread Brendan Simon (eTRIX)
I am trying to use ElementTree (with Python 2.7) and can't seem to find elements at the top level. The find() and findall() methods seem to find elements within the top level, but not if it the elements are at the top level. How do I find top level elements ?? Here is my code. import xml.et

Re: Can't find elements using ElementTree find method

2010-08-31 Thread Brendan Simon (eTRIX)
, then search for './component', './component/name' and so on. It's a bit ugly, but heaps better than using minidom :) Cheers, Brendan. On 31/08/10 6:57 PM, Nitin Pawar wrote: > Try using getroot() > > I think your root is components so its searching in root

Re: [Python-list] if the else short form

2010-09-29 Thread Brendan Simon (eTRIX)
On 29/09/10 9:20 PM, python-list-requ...@python.org wrote: > Subject: > if the else short form > From: > Tracubik > Date: > 29 Sep 2010 10:42:37 GMT > > To: > python-list@python.org > > > Hi all, > I'm studying PyGTK tutorial and i've found this strange form: > > button = gtk.Button(("False,", "T

Re: Whining about "struct"

2010-10-14 Thread Brendan Simon (eTRIX)
On 14/10/10 5:17 PM, python-list-requ...@python.org wrote: > Subject: > Whining about "struct" > From: > Tim Roberts > Date: > Wed, 13 Oct 2010 21:30:38 -0700 > > To: > python-list@python.org > > > I have a bad memory. I admit it. Because of that, the Python "help" > system is invaluable to me.

Re: OT: Addition of a .= operator

2023-06-09 Thread Simon Ward via Python-list
e 3, in print(math.asin(float(input("Enter a small number: " ^ ValueError: math domain error [1]: https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-pep657 Regards, Simon -- A complex system that works is invariably found to have evolved from a simp

Re: Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
riginal Message --- On Wednesday, 1 November 2023 at 10:09, Simon Connah wrote: > > > Hi, > > I'm building a simple project using smtplib and have a question. I've been > doing unit testing but I'm not sure how to check if an email message is > valid. Usi

Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
someone push me in the right direction please? I just want to find out if a string is a valid email address. Thank you. Simon. signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
> > On 2023-11-01, Simon Connah via Python-list python-list@python.org wrote: > > > I'm building a simple project using smtplib and have a > > question. I've been doing unit testing but I'm not sure how to check > > if an email message is valid. >

Re: Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
> > > On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list > python-list@python.org wrote: > > > Could someone push me in the right direction please? I just want to find > > out if a string is a valid email address. > > > There is only one way to

Re: Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
> > On 2023-11-01, Chris Angelico ros...@gmail.com wrote: > > > On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list > > python-list@python.org wrote: > > > > > Could someone push me in the right direction please? I just want to > > >

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
> > > See https://www.linuxjournal.com/article/9585?page=0,0 > That looks painful to maintain! signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
, > =dn I'm not sure that would be practical. As I'm setting up a mailing list server I don't know if someone in the future is going to need to use one of those aliases and testing manually would be tedious. Simon. signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
> Please re-read. > Discussion is about "closeness". > Thus, what you might expect from email servers and Admins, NOT what you > should do. That part should be quite evident by now! > My apologies for making a mistake. Simon. signature.asc Description: OpenPGP di

Re: Checking if email is valid

2023-11-03 Thread Simon Connah via Python-list
> > > On 11/2/23 00:42, Simon Connah via Python-list wrote: > > > Basically I'm writing unit tests and one of them passess in a string > > with an invalid email address. I need to be able to check the string > > to see if it is a valid email so that the

Re: Checking if email is valid

2023-11-04 Thread Simon Connah via Python-list
t; > What do you mean by 'What do you mean by "obviously invalid"?' > > Have you read the RFC? > > > About reading the RFC, there's this ... but read the comments too ... > > https://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-add

Re: Checking if email is valid

2023-11-04 Thread Simon Connah via Python-list
> > > On 2023-11-02, Simon Connah simon.n.con...@protonmail.com wrote: > > > Valid as in conforms to the standard. Although having looked at the > > standard that might be more difficult than originally planned. > > > Yes. Almost nobody actually impleme

Re: Checking if email is valid

2023-11-06 Thread Simon Connah via Python-list
hell has a landline these days? And not accepting your mobile number in the landline number field is just when I give up. Or having a landline only field that does not accept mobile phones. Simon. signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Building a statically linked Python, and pip

2019-05-07 Thread Simon Michnowicz via Python-list
l pip with a statically built Python? I enabled as many modules as possible in Modules/Setup.local but I could not see any thing for _queue thanks for any help *---Simon Michnowicz * Senior Application Specialist, High-Performance Computing *Research Support Services - eSolutions* *Monash eResearch

The '-c' CLI option removes just the command str.

2020-05-05 Thread Simon Forman via Python-list
-c "import sys; print(sys.argv)" [] Or it leaves them both in: $ python -c "import sys; print(sys.argv)" ['-c', 'import sys; print(sys.argv)'] What do you think? Warm regards, ~Simon -- https://mail.python.org/mailman/listinfo/python-list

Sanitise user input for a script

2024-08-30 Thread Simon Connah via Python-list
could do it either on the website itself or by doing it on the host machine. I'm thinking of using argparse but I'm aware it does not offer any protection itself. If someone has any suggestions I'd appreciated it. If you need more information then please let me know. Simon. signa

Re: Sanitise user input for a script

2024-08-30 Thread Simon Connah via Python-list
On Friday, 30 August 2024 at 21:23, Peter J. Holzer via Python-list wrote: > > > On 2024-08-30 19:18:29 +0000, 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

Re: Sanitise user input for a script

2024-08-30 Thread Simon Connah via Python-list
On Friday, 30 August 2024 at 23:35, Thomas Passin via Python-list wrote: > > > On 8/30/2024 3:18 PM, 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 scrip

<    11   12   13   14   15   16