Problem cmpiling M2Crypto

2005-11-29 Thread Thomas G. Apostolou
Hello all. i am trying to make some win32 binaries of M2Crypto 0.15 What I use is: Python 2.3.3 openssl-0.9.7i swigwin 1.3.27 I have build the openssl binaries and have installed the Swig binary python dir is C:\Program Files\Plone 2\Python openssl dir is c:\openssl Swig dir is c:\swig so I ha

Re: Problem cmpiling M2Crypto

2005-12-01 Thread Thomas G. Apostolou
or macros. building '__m2crypto' extension C:\SWIG\swig.exe -python -ISWIG -I"c:\openssl\include" -o SWIG/_m2crypto.c SWIG/_m2crypto.i SWIG\_lib.i(527): Error: Syntax error in input(1). error: command 'swig.exe' failed with exit status 1 any help would be n

Re: Problem cmpiling M2Crypto

2005-12-01 Thread Thomas G. Apostolou
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas G. Apostolou wrote: > > >> C:\Program Files\Plone 2\Python\lib\distutils\extension.py:128: > > UserWarning: > >> Unknown Extension options: 'swig_opts' &g

Re: Problem cmpiling M2Crypto

2005-12-02 Thread Thomas G. Apostolou
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas G. Apostolou wrote: > > > I still get the error: > > "SWIG/_m2crypto.c(80) : fatal error C1083: Cannot open include file: > > 'Python.h': No such file or di

Re: Problem cmpiling M2Crypto under Plone

2005-12-02 Thread Thomas G. Apostolou
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas G. Apostolou wrote: > > > So what you say is that the Python installed with Plone doesn't have > > Python.h in ./include but Python installers from Python.org do have

Problem patching SimpleXMLRPCServer.py

2005-12-06 Thread Thomas G. Apostolou
access private attribute "%s"' % i ) else: obj = getattr(obj,i) return obj def list_public_methods(obj): """Returns a list of attribute strings, found in the specified object, which represent callable attributes"""

Re: Problem patching SimpleXMLRPCServer.py

2005-12-06 Thread Thomas G. Apostolou
Its ok now, it seems the problem was that i had saved the file in UTF-8 format ??? I got it again and saved it in Greek(ISO) format and it now goes fine "Thomas G. Apostolou" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all, > I use Python

Question about start using ZServerSSL on win box...

2005-12-07 Thread Thomas G. Apostolou
2\Zope\bin" Do i HAVE to reinstall Plone and set it not to run as service? Thank you in advance... Thomas G. Apostolou -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP = Perl Improved

2005-12-09 Thread Thomas G. Marshall
Roedy Green said something like: > On 9 Dec 2005 11:15:16 -0800, "Xah Lee" <[EMAIL PROTECTED]> wrote, quoted > or indirectly quoted someone who said : > >> recently i got a project that involves the use of php. In 2 days, i >> read almost the entirety of the php doc. Finding it a breeze because it

Re: Lisp-likeness

2005-03-15 Thread Thomas A. Russ
you can use simultaneously? The lisp snippet creates new functions each time the addn function is called, so one can interleave calls to the individual functions. -- Thomas A. Russ, USC/Information Sciences Institute -- http://mail.python.org/mailman/listinfo/python-list

Re: if else python

2015-11-25 Thread Thomas 'PointedEars' Lahn
Scott Montreuil wrote: > I have an if statement which seems to run both commands and I cannot > figure out why. (just learning so I may be missing something obvious) Any > ideas? Use a Python IDE and debugger. I recommend PyDev, but YMMV. > while True: > global latit,longt,jlatit,jlongt

Re: Accessing container's methods

2015-12-07 Thread Thomas 'PointedEars' Lahn
Tony van der Hoff wrote: > I have a class A, containing embedded embedded classes, which need to > access methods from A. Let the name of the "embedded class" (which is not embedded at all in your example code) be E. You could either store the information in the E instance upon or after constr

Re: Accessing container's methods

2015-12-07 Thread Thomas 'PointedEars' Lahn
Michael Torrie wrote: > On 12/07/2015 11:10 AM, Tony van der Hoff wrote: >> I have a class A, containing embedded embedded classes, which need to >> access methods from A. >> . >> A highly contrived example, where I'm setting up an outer class in a >> Has-a relationship, containing a number of Act

Re: Brief Code Review Please - Learning Python

2015-12-07 Thread Thomas 'PointedEars' Lahn
Joel Goldstick wrote: > On Sun, Dec 6, 2015 at 12:21 PM, wrote: >> * Same question as right above but with the if tests on lines 5-8. >> * I've also used ( ) around the if tests, but I'm not sure if this is >> good Python style or not. >> >> 1 def measure_string(desired_text, >> 2

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-08 Thread Thomas 'PointedEars' Lahn
Anthony Papillion wrote: > -BEGIN PGP SIGNED MESSAGE- Please don’t do that again. > I have a TON of email (years) stored in my Thunderbird. My backup > strategy for the last few years has been to periodically dump it all > in a tar file, encrypt that tar file, and move it up to the cloud

Re: Accessing container's methods

2015-12-08 Thread Thomas 'PointedEars' Lahn
Erik wrote: Please fix, Erik #75656. > On 07/12/15 18:10, Tony van der Hoff wrote: >> A highly contrived example, where I'm setting up an outer class in a >> Has-a relationship, containing a number of Actors. The inner class needs >> to access a method of the outer class; here the method get_

Re: Accessing container's methods

2015-12-08 Thread Thomas 'PointedEars' Lahn
Vincent Vande Vyvre wrote: > Le 08/12/2015 20:02, Thomas 'PointedEars' Lahn a écrit : >> Erik wrote: >>> Amongst other things, you can't put the object into multiple containers >> You can. Quickhack: ^ >> class Child: >>

Re: Accessing container's methods

2015-12-08 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > On 08/12/2015 19:02, Thomas 'PointedEars' Lahn wrote: >> Erik wrote: >> >> Please fix, Erik #75656. > > Please fix what? You are not ready for the answer yet. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bit

Re: filter a list of strings

2015-12-08 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > On 03/12/2015 01:15, [email protected] wrote: >> I would like to know how this could be done more elegant/pythonic. >> >> I have a big list (over 10.000 items) with strings (each 100 to 300 >> chars long) and want to filter them. >> >> list = . >> […] > > targets = ['Ba

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-10 Thread Thomas 'PointedEars' Lahn
Michael Torrie wrote: > It's good to know I can configure Thunderbird to use maildir for local > storage. I'll have to make the change here. Will make my backups a lot > easier and faster. But see also . Not all of those bugs have been resolved/fi

Re: cannot open file with non-ASCII filename

2015-12-14 Thread Thomas 'PointedEars' Lahn
Ulli Horlacher wrote: > Laura Creighton wrote: >> Given that Ulli is in Germany, latin-1 is likely to work fine for him. > > For me, but not for my users. We have people from about 100 nations at our > university. > […] > The problem is the input of these filenames. Why do you have to use msvcr

Installing PyCharm on Windows (was: issues)

2015-12-19 Thread Thomas 'PointedEars' Lahn
Anna Szaharcsuk wrote: > I was trying to install PyCharm, but didn't worked and needed interpreter. > the computer advised to install the python for windows. Not “the python for windows” (that would be some species of snake), but _Python_ for _Windows_, the programming language interpreter. Jus

Re: Installing PyCharm on Windows

2015-12-20 Thread Thomas 'PointedEars' Lahn
Josef Pktd wrote: ^^ I doubt that is your real name. > On Saturday, December 19, 2015 at 1:32:27 PM UTC-5, Thomas 'PointedEars' > Lahn wrote: >> Have you tried to install Python ≥ 3.4.4rc1 on Windows XP? If yes, it >> cannot work; you need Python < 3

Ignore error with non-zero exit status (was: How to ignore error with anon-zero exit status)

2015-12-20 Thread Thomas 'PointedEars' Lahn
Ganesh Pal wrote: > def run_scanner(): > """ > Mount /filesystems and run scanner > """ > for cmd in [" mount /filesystems ", " scanner_start"]: > try: > out, err, ret = run(cmd, timeout=3600) > if ret != 0: > logging.error("Can

Re: Ignore error with non-zero exit status

2015-12-20 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Mon, Dec 21, 2015 at 8:22 AM, Thomas 'PointedEars' Lahn > wrote: It is supposed to be an attribution *line*, _not_ an attribution novel. Also, the “(was: …)” part is to be removed from the Subject header field value to complete the change of sub

Re: Ignore error with non-zero exit status

2015-12-20 Thread Thomas 'PointedEars' Lahn
Ganesh Pal wrote: [repaired Subject, restored attribution] > Thomas 'PointedEars' Lahn wrote: >> Most simple solution for this: Do not use a loop. More "complicated" >> solution: Use an “if” statement. > > I want to stick on to loop and try modify

Re: Ignore error with non-zero exit status

2015-12-20 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Mon, Dec 21, 2015 at 9:46 AM, Thomas 'PointedEars' Lahn > wrote: >>> Percent formatting isn't going away. There's no need to tell people to >>> abandon it in favour of .format(), unless they actually need a feature >>

Re: Ignore error with non-zero exit status

2015-12-21 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > On 21/12/2015 07:51, Thomas 'PointedEars' Lahn wrote: >> Chris Angelico wrote: >>> But it's been clearly stated that .format is not going to do away with >>> percent formatting, and all language of "new-style formatting&quo

Re: Ignore error with non-zero exit status

2015-12-21 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Tue, Dec 22, 2015 at 12:19 AM, Thomas 'PointedEars' Lahn > wrote: >> Mark Lawrence wrote: >>> On 21/12/2015 07:51, Thomas 'PointedEars' Lahn wrote: >>>> Chris Angelico wrote: >>>>> But it's be

Re: Ignore error with non-zero exit status

2015-12-21 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > […] Thomas 'PointedEars' Lahn […] wrote: >> Chris Angelico wrote: >>> […] Thomas 'PointedEars' Lahn […] wrote: >>>> Mark Lawrence wrote: >>>>> On 21/12/2015 07:51, Thomas 'PointedEars' Lahn wr

Re: Meaning and purpose of the Subject field

2015-12-21 Thread Thomas 'PointedEars' Lahn
Jon Ribbens wrote: > On 2015-12-21, Ian Kelly wrote: >> I can't specifically recall if I've used any MUA other than Gmail that >> even attempts threading email messages. > > Also: Thunderbird, The Bat!, Eudora, Gnus, Outlook, Outlook Express, > Pegasus Mail, Pine, Apple Mail, Windows Live Mail,

Re: match point

2015-12-22 Thread Thomas 'PointedEars' Lahn
Thierry wrote: > Reading the docs about regular expressions, I am under the impression > that calling > re.match(pattern, string) > is exactly the same as > re.search(r'\A'+pattern, string) Correct. > Same for fullmatch, that amounts to > re.search(r'\A'+pattern+r'\Z', string) Correct. > The

Re: Ignore error with non-zero exit status

2015-12-22 Thread Thomas 'PointedEars' Lahn
Terry Reedy wrote: > On 12/21/2015 9:05 AM, Thomas 'PointedEars' Lahn wrote: >> Chris Angelico wrote: >>> On Tue, Dec 22, 2015 at 12:19 AM, Thomas 'PointedEars' Lahn >>> wrote: >>>> Mark Lawrence wrote: >>>>> On 21/1

Re: Meaning and purpose of the Subject field

2015-12-22 Thread Thomas 'PointedEars' Lahn
Random832 wrote: > This makes sense for the change from "old" to "new (was: old)", > which nobody was advocating against (after all, there's semantic > content - they wouldn't have changed the subject line if they > didn't consider it a new discussion topic), but I think there is > a reasonable ar

Re: Trailing zeros of 100!

2016-01-02 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > Please don't top post, it's extremely annoying when trying to follow > long threads. As are full quotes. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail. -- https://mail.python.org/mailman/listinfo/python-list

Re: We will be moving to GitHub

2016-01-04 Thread Thomas 'PointedEars' Lahn
Marko Rauhamaa wrote: > Well, Git and Mercurial are not all that bad as long as only a single > person is working on the repository at any given time and you have a > strictly linear version history. I cannot confirm your observations(?) for Git. There was a time when three of four people of ou

Re: Why is there difference between cmd line and .py file?

2016-01-05 Thread Thomas 'PointedEars' Lahn
Joel Goldstick wrote: > On Tue, Jan 5, 2016 at 3:45 PM, Robert wrote: >> import numpy as np >> >> In [154]: np.sum(expectation_A)[0] >> […] >> IndexError: invalid index to scalar variable. > > I've not used numpy, but you should print expectation_A to see what's in > it. It may be empty, causin

Re: Why is there difference between cmd line and .py file?

2016-01-05 Thread Thomas 'PointedEars' Lahn
Robert wrote: > I just wonder that the cmd line function sum may be different from the > .py file used. One is numpy package, the other is a general one. Then, > how can I further make it clear for this guess? Among other things: print(sum.__doc__) -- PointedEars Twitter: @PointedEars2 Please

Re: create Email with multiple HTML blocks embedded

2016-01-05 Thread Thomas 'PointedEars' Lahn
[email protected] wrote: Please either do not use Google Groups and configure your newsreader accordingly (recommended), or use Google Groups to subscribe to the newsgroup so that you can specify your real name. > body = MIMEMultipart('multipart') Obviously there is redu

Re: licenses

2016-01-10 Thread Thomas 'PointedEars' Lahn
Ben Finney wrote: > "Martinez, Jorge Alberto (GE Aviation)" […] writes: >> We develop applications here with Python and I want to know if there's >> issues by using. We use NumPy, PyDaqMx, Py Visa > > Those are all free software: meaning, every recipient has freedom to > execute, modify, and/or r

Re: python

2016-01-11 Thread Thomas 'PointedEars' Lahn
Sean Melville wrote: >> On 11 Jan 2016, at 20:33, Cameron Simpson wrote: >>> On 11Jan2016 19:17, Sean Melville wrote: >>> I've downloaded python 3.5.1 but when I try and open it always says that >>> I have to either uninstall it, repair it or modify it. However, I've >>> tried all of them and it

Re: create Email with multiple HTML blocks embedded

2016-01-31 Thread Thomas 'PointedEars' Lahn
[email protected] wrote: > Following your suggestions, I now have code that looks like the below. > I get the same result. First HTML is displayed in body of email and > second shows up as an attachment. Works as designed. The message structure is correct now, but there is no plain-text pa

Re: create Email with multiple HTML blocks embedded

2016-01-31 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: > See RFC 5233 and RTFM for details. RFC _5322_ (“Internet Message Format”) <http://tools.ietf.org/html/rfc5322> -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail. -- https://mail.python.org/mail

Re: carry **arguments through different scopes/functions

2016-01-31 Thread Thomas 'PointedEars' Lahn
Terry Reedy wrote: > On 1/31/2016 7:19 AM, [email protected] wrote: >> I am not sure what the problem is here, so I don't really know how I >> should call the subject for that question. Please offer a better >> subject. >> >> The code below is a extrem simplified example of the original one. But >

Re: Make a unique filesystem path, without creating the file

2016-02-14 Thread Thomas 'PointedEars' Lahn
Ben Finney wrote: > How should a program generate a unique filesystem path and *not* create > the filesystem entry? The Python documentation suggests that it should not. > The ‘tempfile.mktemp’ function is strongly deprecated, and rightly so > https://docs.python.org/3/library/tempfile.html#tem

Re: Make a unique filesystem path, without creating the file

2016-02-15 Thread Thomas 'PointedEars' Lahn
Gregory Ewing wrote: > Ben Finney wrote: >> One valid filesystem path each time it's accessed. That is, behaviour >> equivalent to ‘tempfile.mktemp’. >> >> My question is because the standard library clearly has this useful >> functionality implemented, but simultaneously warns strongly against i

Photon mass (was: [Still off-top] Physics)

2016-03-05 Thread Thomas 'PointedEars' Lahn
Oscar Benjamin wrote: > On 5 March 2016 at 02:51, Gregory Ewing > wrote: >>> The masslessness of photons comes from an extrapolation >>> that leads to a divide by infinity: strictly speaking it's just >>> undefined. >> >> No, it's not. The total energy of a particle is given by >> >>E**2 ==

Photon mass (was: [Still off-top] Physics)

2016-03-05 Thread Thomas 'PointedEars' Lahn
Gene Heskett wrote: > I've never heard of a massless photon, That is unfortunate as it should be common knowledge by now. > and they do exert a push on the surface they are reflected from, […] Photons exert a force on surfaces because they carry *momentum* or, as it had been understood in term

Re: Simple exercise

2016-03-10 Thread Thomas 'PointedEars' Lahn
Rodrick Brown wrote: > […] > if m: > if m.group(1) not in od.keys(): > od[m.group(1)] = int(m.group(2)) > else: > od[m.group(1)] += int(od.get(m.group(1),0)) > […] This program logic appears to be wrong as you are not adding the value that you just read to the dic

Re: Simple exercise

2016-03-10 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: > key = m.group(1) > value = int(m.group(1)) value = int(m.group(2)) > if key not in od: > od[key] = value > else: > od[key] += value -- PointedEars Twitter: @Poin

Re: Simple exercise

2016-03-10 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: [ > key = m.group(1) > value = int(m.group(2)) > > if key not in od: > od[key] = value > else: > od[key] += value > > But there is probably an even more pythonic way to

Re: Simple exercise

2016-03-10 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: > od = OrderedDict() This is pointless, then. > […] > od = OrderedDict(map(lambda item: (item[0], 0), items)) > for item in items: od[item[0]] += item[1] -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bi

Re: Descriptors vs Property

2016-03-12 Thread Thomas 'PointedEars' Lahn
Veek. M wrote: > Veek. M wrote: >> class TypedProperty(object): >> def __init__(self,name,type,default=None): >> self.name = "_" + name >> self.type = type >> self.default = default if default else type() >> >> def __get__(self,instance,cls): >> return geta

Re: The Cost of Dynamism

2016-03-12 Thread Thomas 'PointedEars' Lahn
Marko Rauhamaa wrote: > […] HTML markup is all ASCII. Wrong. I am creating HTML documents whose source code contains Unicode characters every day. Also, the two of you fail to differentiate between US-ASCII, a 7-bit character encoding, and 8-bit or longer encodings which can *also* encode ch

Re: The Cost of Dynamism

2016-03-12 Thread Thomas 'PointedEars' Lahn
Marko Rauhamaa wrote: > […] all keyboards can produce ASCII and no keyboard can produce all of > Unicode. Both claims are wrong. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail. -- https://mail.python.org/mailman/listinfo/python-list

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-12 Thread Thomas 'PointedEars' Lahn
BartC wrote: > On 12/03/2016 12:13, Marko Rauhamaa wrote: >> Why, look at the *English* page on Hillary Clinton: >> >> Hillary Diane Rodham Clinton /ˈhɪləri daɪˈæn ˈrɒdəm ˈklɪntən/ (born >> October 26, 1947) is an American politician. >> https://en.wikipedia.org/wiki/Hillary_Clinton> >

Re: Descriptors vs Property

2016-03-13 Thread Thomas 'PointedEars' Lahn
Veek. M wrote: > Thomas 'PointedEars' Lahn wrote: >>> I haven't read the descriptor protocol as yet. >> You should. You should also trim your quotations to the relevant >> minimum, and post using your real name. > > I don't take advice from p

Re: Descriptors vs Property

2016-03-13 Thread Thomas 'PointedEars' Lahn
Veek. M wrote: > > http://www.thecodingforums.com/threads/examples-of-ecmascipt-written-by-thomas-lahn.937812/ > > Examples of ECMAScipt written by Thomas Lahn > > Thomas is the forums best known critic of everyone else's attempts at >

Re: Descriptors vs Property

2016-03-13 Thread Thomas 'PointedEars' Lahn
Veek. M wrote: > Thomas 'PointedEars' Lahn wrote: >>>> Nobility lies in action, not in name. >>>> —Surak > > Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad > to say I like/trust Ned a bit so *huggles* to you,

Re: issue w/ python 3.5.7

2016-03-13 Thread Thomas 'PointedEars' Lahn
[email protected] wrote: > We would like to get the procedure to launch the software "python.exe". > The only options we have acsess are: modify, repair and uninstall. […] -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte kein

Re: The Cost of Dynamism

2016-03-13 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Sun, Mar 13, 2016 at 6:24 AM, Thomas 'PointedEars' Lahn > wrote: >> Marko Rauhamaa wrote: >>> […] HTML markup is all ASCII. >> >> Wrong. I am creating HTML documents whose source code contains Unicode >> charact

Re: The Cost of Dynamism

2016-03-13 Thread Thomas 'PointedEars' Lahn
BartC wrote: > On 12/03/2016 19:26, Thomas 'PointedEars' Lahn wrote: >> BartC wrote: >>> On 12/03/2016 12:13, Marko Rauhamaa wrote: >>>> Why, look at the *English* page on Hillary Clinton: >>>> >>>> Hillary Diane Rodham Cli

Re: Python Advanced Help

2016-03-15 Thread Thomas 'PointedEars' Lahn
Luke Charlton wrote: > Okay, So basically I created a python script around 1 year ago to grab an > explain_plan from a Greenplum system (Normal SQL) and change it around and > explain each step/section, the thing is, I've came back to the python code > and I don't understand anything of what it's

Re: Obfuscating Python code

2016-03-15 Thread Thomas 'PointedEars' Lahn
Ben Finney wrote: > Swanand Pashankar writes: >> Embedding a Python file in C code works, but it exposes your Python >> script. Didn't find any free fool-proof way to obfuscate Python code >> either. > > What exactly is it you want to prevent? Why do you think obfuscating the > code will achieve

Re: Obfuscating Python code

2016-03-15 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Wed, Mar 16, 2016 at 5:59 AM, Thomas 'PointedEars' Lahn > wrote: >> That said, not distributing the source code of a program as well (or at >> least making it available to users in some way) strikes me as unpythonic >> since Python is

Re: WP-A: A New URL Shortener

2016-03-15 Thread Thomas 'PointedEars' Lahn
Vinicius Mesel wrote: > I'm a 16 year old Python Programmer that wanted to do something different. > But, like we know, ideas are quite difficult to find. > So I decided to develop a URL Shortener to help the Python community out > and share my coding knowledge, and today the project was launched

Re: WP-A: A New URL Shortener

2016-03-15 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Wed, Mar 16, 2016 at 9:53 AM, Thomas 'PointedEars' Lahn > wrote: Attribution *line*, _not_ attribution novel. >> […] I cannot be sure because I have not thought this through, but with

Re: WP-A: A New URL Shortener

2016-03-15 Thread Thomas 'PointedEars' Lahn
Rick Johnson wrote: > On Tuesday, March 15, 2016 at 5:54:46 PM UTC-5, Thomas 'PointedEars' Lahn > wrote: >> Vinicius Mesel wrote: >> > I'm a 16 year old Python Programmer that wanted to do >> > something different. But, like we know, ideas are quite &g

Re: WP-A: A New URL Shortener

2016-03-15 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Wed, Mar 16, 2016 at 10:38 AM, Thomas 'PointedEars' Lahn > wrote: >> Chris Angelico wrote: >>> On Wed, Mar 16, 2016 at 9:53 AM, Thomas 'PointedEars' Lahn >>> wrote: >>>> […] I ca

Re: Descriptors vs Property

2016-03-15 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > Please ignore 'PointedEars', Please ignore Mark Lawrence unless he has something on-topic to say. How does that feel, Mark? > every month or so for some weird reason The reason being obviously that the people to whose postings I happen to post a follow-up to do not post

Re: WP-A: A New URL Shortener

2016-03-15 Thread Thomas 'PointedEars' Lahn
Gene Heskett wrote: > On Tuesday 15 March 2016 19:55:52 Chris Angelico wrote: >> On Wed, Mar 16, 2016 at 10:38 AM, Thomas 'PointedEars' Lahn >> > And as for second-level domains, consider for example “t.c” instead >> > of “twitter.com” as part of the short U

Re: WP-A: A New URL Shortener

2016-03-19 Thread Thomas 'PointedEars' Lahn
Rick Johnson wrote: > On Thursday, March 17, 2016 at 1:28:05 PM UTC-5, Thomas 'PointedEars' Lahn > wrote: > >> BTW and JFTR, this thread has gone *way* off topic. > Who cares? Python-list is not a "strictly moderated group". [rant]

Re: WP-A: A New URL Shortener

2016-03-19 Thread Thomas 'PointedEars' Lahn
Rick Johnson wrote: > On Thursday, March 17, 2016 at 4:15:37 PM UTC-5, Thomas 'PointedEars' Lahn > wrote: >> Get a life, *please*. > > Well, you see *Thomas*, the problem is, this *IS* my life! I couldn't > remove myself from this life anymore than you could

Re: WP-A: A New URL Shortener

2016-03-19 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > In some cases, the correct solution would be a short URL at a domain > that the provider controls. But that's no different from running your > own shortener service - it still has the extra indirection and > consequent risks. So for a lot of people, a public shortener is ju

Re: WP-A: A New URL Shortener

2016-03-19 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Fri, Mar 18, 2016 at 10:17 AM, Thomas 'PointedEars' Lahn > wrote: >> Daniel Wilcox wrote: >>> Cool thanks, highly recommended to use an ORM to deter easy SQL >>> injections. >> >> That is to crack a nut with a sl

Re: WP-A: A New URL Shortener

2016-03-19 Thread Thomas 'PointedEars' Lahn
Daniel Wilcox wrote: > Cool thanks, highly recommended to use an ORM to deter easy SQL > injections. That is to crack a nut with a sledgehammer. SQL injection can be easily and more efficiently prevented with prepared statements. While an Object- Relational Mapper (ORM) can use those, and the

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-25 Thread Thomas 'PointedEars' Lahn
[email protected] wrote: > Occasionally I have to make forays into Javascript, can anyone > recommend a place similar to this list where Javascript questions can > be asked? The trouble is that there are very many usenet Javascript > lists and it's difficult to guess which one[es] might be good. The

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-25 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > […] It is so blatantly obvious that he knows precisely nothing about > Python, but still the moderators on this list let him get away with it. This is a mailing list? It is moderated? *Seriously*? -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine

Re: WP-A: A New URL Shortener

2016-03-25 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > […] Thomas 'PointedEars' Lahn […] wrote: >> Chris Angelico wrote: >>> […] Thomas 'PointedEars' Lahn […] wrote: >>>> Daniel Wilcox wrote: >>>>> Cool thanks, highly recommended to use an ORM to deter easy SQL

Re: WP-A: A New URL Shortener

2016-03-25 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Sat, Mar 26, 2016 at 8:28 AM, Thomas 'PointedEars' Lahn > wrote: >> Chris Angelico wrote: >>> […] Thomas 'PointedEars' Lahn […] wrote: >>>> Chris Angelico wrote: >>>>> […] Thomas 'PointedEars

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-25 Thread Thomas 'PointedEars' Lahn
Ned Batchelder wrote: > Chris, I apologize for Thomas. How dare you to speak for me, and *again* the rest of the subscribers? There is nothing to apologize for when I am *helping* someone by giving them useful information. You can apologize for your own presumptous behavior instead. &

Re: WP-A: A New URL Shortener

2016-03-25 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Sat, Mar 26, 2016 at 9:25 AM, Thomas 'PointedEars' Lahn > wrote: Attribution line, not attribution novel. >> Chris Angelico wrote: >>> On Sat, Mar 26, 2016 at 8:28 AM, Thomas 'PointedEars' Lahn >>> wrote: >>&g

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-25 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Sat, Mar 26, 2016 at 12:36 PM, Thomas 'PointedEars' Lahn > wrote: >>> Thomas is not typical of the Python community. We are mostly nice >>> people. >>> :) >> >> You do not even know me. I *am* a nice person, if on

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > On 24/03/2016 20:53, [email protected] wrote: >> I use Python wherever I can and find this list (as a usenet group via >> gmane) an invaluable help at times. >> >> Occasionally I have to make forays into Javascript, can anyone >> recommend a place similar to this list where Java

Re: How to fix those errors?

2014-11-16 Thread Thomas 'PointedEars' Lahn
Abdul Abdul wrote: > from PIL import Image > import os You should only import the methods that you use. > for inputfile in filelist > outputfile = os.path.splitext(inputfile)[0]+".jpg" > if inputfile != outputfile: > try: > Image.open(inputfile).save(outputfile)

Re: What does this line of code mean?

2014-11-16 Thread Thomas 'PointedEars' Lahn
Abdul Abdul wrote: > I just came across the following line of code: > > outputfile = os.path.splitext(infile)[0] + ".jpg" > > Can you kindly explain to me what those parts mean? RTFM: An Python IDE like PyDev w

Re: How to fix those errors?

2014-11-16 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: > Abdul Abdul wrote: >> from PIL import Image >> import os > […] >> for inputfile in filelist >> outputfile = os.path.splitext(inputfile)[0]+".jpg" >> […] > > Define “filelist” which needs to

Re: Classes - converting external function to class's method.

2014-12-14 Thread Thomas 'PointedEars' Lahn
Ivan Evstegneev wrote: > I have stuck a bit with this example(took this one from the book). > > Here are a description steps of what I've done till now: > > > Step 1 - creating an empty namespace: > class rec: pass IMHO that is not actually creating a namespace; it is just declaring/def

Re: Classes - converting external function to class's method.

2014-12-14 Thread Thomas 'PointedEars' Lahn
Terry Reedy wrote: > On 12/14/2014 6:15 PM, Thomas 'PointedEars' Lahn wrote: >> Ivan Evstegneev wrote: >>> I have stuck a bit with this example(took this one from the book). >>> >>> Here are a description steps of what I've done til

Re: How to import sqlite3 in my python3.4 successfully?

2014-12-14 Thread Thomas 'PointedEars' Lahn
sir wrote: ^^^ Please fix. > There are two python version in my debian7, one is python2.7 the system > default version, the other is python3.4 which compiled to install this > way. > > | apt-get update > apt-get upgrade > apt-get install build-essential > wget http://www.python.org/ftp/

Re: extracting numbers with decimal places from a string

2015-01-11 Thread Thomas 'PointedEars' Lahn
Joel Goldstick wrote: > my_list = "1.23, 2.4, 3.123".split(",") > > that will give you ['1.23', '2.4', '3.123'] No, it gives | $ python | Python 2.7.9 (default, Dec 11 2014, 08:58:12) | [GCC 4.9.2] on linux2 | Type "help", "copyright", "credits" or "license" for more information. | >>> my_list

Re: extracting numbers with decimal places from a string

2015-01-11 Thread Thomas 'PointedEars' Lahn
Store Makhzan wrote: > I have this script which can calculate the total of numbers given in a > string […] > total = 0 > for c in '0123456789': >total += int(c) > print total > > […] > How should I modify this script to find the total of if the numbers given > in the string form have decimal

Re: extracting numbers with decimal places from a string

2015-01-11 Thread Thomas 'PointedEars' Lahn
Joel Goldstick wrote: > Thomas 'PointedEars' Lahn wrote: >> Joel Goldstick wrote: >>> my_list = "1.23, 2.4, 3.123".split(",") >>> >>> that will give you ['1.23', '2.4', '3.123'] >> >>

Re: extracting numbers with decimal places from a string

2015-01-11 Thread Thomas 'PointedEars' Lahn
Joel Goldstick wrote: > On Sun, Jan 11, 2015 at 6:12 PM, Thomas 'PointedEars' Lahn > wrote: >> Joel Goldstick wrote: >>> Am I missing something. >>^ >> […] >> You are missing a leading space character because in the string

Re: extracting numbers with decimal places from a string

2015-01-11 Thread Thomas 'PointedEars' Lahn
Peter Otten wrote: > Thomas 'PointedEars' Lahn wrote: >> […] But float() is always necessary for computing the sum and suffices >> indeed together with s.split() if s is just a comma-separated list of >> numeric strings with optional whitespace leading and tra

Re: extracting numbers with decimal places from a string

2015-01-11 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > On 11/01/2015 23:07, Thomas 'PointedEars' Lahn wrote: >> I thought I had more than a fair grasp of regular expressions, but I am >> puzzled by >> >> | $ python3 >> | Python 3.4.2 (default, Dec 27 2014, 13:16:08) >> | [GC

Re: Python 3 regex woes (parsing ISC DHCPD config)

2015-01-13 Thread Thomas 'PointedEars' Lahn
Jason Bailey wrote: > My script first reads the DHCPD configuration file into memory - > variable "filebody". It then utilizes the re module to find the > configuration details for the wanted "shared network". > > The config file might look something like this: > > ##

Re: Python 3 regex woes (parsing ISC DHCPD config)

2015-01-13 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: > Jason Bailey wrote: >> shared-network My-Network-MOHE { >>[…] { >> >> I compile my regex: >> m = re.compile(r"^(shared\-network (" + re.escape(shared_network) + r") >> \{((\n|.|\r\n)*?)(^\}))&

Re: Python 3 regex?

2015-01-14 Thread Thomas 'PointedEars' Lahn
[email protected] wrote: > Le mardi 13 janvier 2015 03:53:43 UTC+1, Rick Johnson a écrit : >> [...] >> you should find Python's "text processing Nirvana" >> [...] > > I recommend, you write a "small" application I recommend you get a real name and do not post using the troll and spam- infested

Re: what would be the regular expression for null byte present in a string

2015-01-14 Thread Thomas 'PointedEars' Lahn
Shambhu Rajak wrote: > I have a string that I get as an output of a command as: > '\x01\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x0010232ae8944a\x02\x00\x00\x00\x00\x00\x00\x00\n' > > I want to fetch '10232ae8944a' from the above string. > > I want to find a re pattern that could replace all the

<    29   30   31   32   33   34   35   36   37   38   >