AW: Unrecognised Arguments

2018-12-02 Thread Lutz Horn
#x27;–-lang=en since:2015-12-13 until:2016-01-01'] INFO: Querying –-lang=en since:2015-01-01 until:2015-01-19 INFO: Querying –-lang=en since:2015-01-19 until:2015-02-06 ... Take a look at https://github.com/taspinar/twitterscraper#22-the-cli for details. Lutz __

Re: AES Encryption/Decryption

2018-11-02 Thread Lutz Horn
t; > I need to encrypt some strings that will be passed around in URL, and > then also some PII data at rest. Use https://pypi.org/project/cryptography/ Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Enhancement Proposal for List methods

2018-10-22 Thread Lutz Horn
mplement. There is no need to add them to the stdlib. Lutz -- https://mail.python.org/mailman/listinfo/python-list

AW: how to replace line on particular line in file[no need to write it back whole file again]

2018-10-11 Thread Lutz Horn
Try something like this: ``` import sys def replace(lineno, replacement): for i, line in enumerate(sys.stdin.readlines()): if i == lineno: line = replacement print(line.strip()) replace(2, "REPLACEMENT") ``` Von: Python-li

Re: P = (2^N) - Q

2018-09-24 Thread Lutz Horn
Hi, > If P is the set of primes, how do I write a program ... 1. Do you plan to write this in Python? 2. What have you tried so far? 3. Does it work? Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: round

2018-06-07 Thread Lutz Horn
M = np.array([[0, 9],[2, 7]], dtype=int) np.linalg.det(M) -18.004 round(np.linalg.det(M)) np.linalg.det(M) has type numpy.float64, not float. Try this: round(float(np.linalg.det(M))) -18 Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: help me ?

2018-02-26 Thread Lutz Horn
Define 2 lists. ... [...] Help me ! Sounds like homework. Have you tried anything? Does it work? -- https://mail.python.org/mailman/listinfo/python-list

Re: from packaging import version as pack_version ImportError: No module named packaging

2017-10-27 Thread Lutz Horn
On Fri, Oct 27, 2017 at 03:56:39PM +0200, David Gabriel wrote: > from packaging import version as pack_version > ImportError: No module named packaging > > I googled it and I have found so many suggestions regarding updating > 'pip' and installing python-setuptools but all of these did not fix > t

Re: Python noob having a little trouble with strings

2017-10-27 Thread Lutz Horn
it in the Python installation you have available. Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: little help in homework required

2017-06-16 Thread Lutz Horn
8")) The actual encoding does not matter in your case since you only have ASCII. data =x.recv(512) This gives the next error: NameError: name 'x' is not defined What is x supposed to be? Regards Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: help with an error msg please

2017-05-14 Thread Lutz Horn
; #!/usr/bin/env python > > import getopt > > try: > opts, args = getopt.getopt (sys.argv[1:], "t:") > except getopt.error, msg: > raise "Usage: some other way", msg I guess you are using Python 2. In any case you should import sys

Re: [GIS] Keeping only POIs X kms from a trace?

2017-05-08 Thread Lutz Horn
Problem is, files are only country-size, so the number of waypoints is overwhelming (Here's the UK for instance**). How many is 'overwhelming'? Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: packaging python code

2017-05-08 Thread Lutz Horn
Is there any way to pack my .py with all required libraries and create a self running package? Take a look at PyInstaller: * http://www.pyinstaller.org/ * https://pyinstaller.readthedocs.io/en/stable/ Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: Practice Python

2017-05-08 Thread Lutz Horn
Python - Exercise 5 Do you want us to solve these problems for you? The answers here: https://www.youtube.com/watch?v=nwHPM9WNyw8&t=36s A strange way to publish code. Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: Who are the "spacists"?

2017-03-18 Thread Lutz Horn
Python policy of preferring spaces over tabs while allowing both if used consistent is causing any problem. Lutz signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: How to add a built-in library in pyhton

2017-03-17 Thread Lutz Horn
/index.html ? Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: SimpleHTTPServer and CgiHTTPServer in practice

2017-03-16 Thread Lutz Horn
Some Python users have told me that isn't a good idea, but without any specifics. We don't know *why* those people told you not to use these modules. We also don't know your use case. So it is very hard to advise you. Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: integer's methods

2016-08-18 Thread Lutz Horn
CPython's lexical analyzer can't handle a dot after an integer literal so you must add a space in between "123" and ".". Ok, this works: >>> 123 .bit_length() 7 But it looks really strange. Let's use a variable instead of an integer literal. Lutz

Re: integer's methods

2016-08-18 Thread Lutz Horn
Am 08/18/2016 um 02:58 PM schrieb ast: 123.bit_length() SyntaxError: invalid syntax You are not calling a method here because the parser is not finished. The parser thinks you want to write a float with the value 1.bit_length which is not valid Python syntax. Lutz -- https

Re: --> Running shell script with python

2016-08-18 Thread Lutz Horn
]. You can then later kill this process using Popen.kill()[3]. >>> import subprocess >>> p = suprocess.Popen(["sleep", "10]) # sleep 10 seconds >>> p.kill() Lutz [1] https://docs.python.org/3/library/os.html#os.system [2] https://docs.python.org/3/l

Re: Call for Assistance

2016-08-09 Thread Lutz Horn
ocumentation[1]: > This license does not qualify as free, because there are restrictions > on charging money for copies. Thus, we recommend you do not use this > license for documentation. Using the SA variant does not help. Lutz [1] https://www.gnu.org/licenses/license-list.en.html#CC-

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Lutz Horn
e the result without problems. Why the implementors of Python wrote strtobool this way is something I don't know. Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: Call for Assistance

2016-08-09 Thread Lutz Horn
Am 08/09/2016 um 03:52 AM schrieb Charles Ross: The book is being hosted at https://github.com/chivalry/meta-python CC-BY-NC-SA is not a license for free (as in speech) content. Is that what you want? Lutz -- https://emailselfdefense.fsf.org/ -- https://mail.python.org/mailman/listinfo

Re: Float

2016-07-29 Thread Lutz Horn
and not a complex number). It > is the formulaic representation that approximates a real number since computers can't handle handle "real" real numbers which would require infinite precision. Examples are 1.0 3.14159 Lutz [1] https://docs.python.org/3/library/functions.html#flo

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-28 Thread Lutz Horn
makes the process much easier to debug. I think that is a very good idea. JSON is the universal format today and mapping to and from Python is very easy. Lutz -- https://www.lhorn.de/ https://emailselfdefense.fsf.org/de/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Can Python learn from Perl? Perl 5 can now run Perl 6 code

2016-07-28 Thread Lutz Horn
as Perl 5 code. Should Python do something similar? At least for Python 2/3 code? Do you mean something like #!/usr/bin/env python2.7 # here comes Python 3 code should be run using python3, if installed? Why not just put the python3 executable into the hashbang line? Lutz -- https://ww

RE: Question about official API

2016-02-05 Thread Lutz Horn
Hi, > What is the rule for knowing if something is part of the official API? Look into https://docs.python.org/3/library/ Lutz -- https://mail.python.org/mailman/listinfo/python-list

RE: eval( 'import math' )

2016-02-04 Thread Lutz Horn
Hi, >I just discovered that function does not necessarily take the >string input and transfer it to a command to execute. Can you please show us the code you try to execute and tells what result you expect? Lutz -- https://mail.pyth

Re: Python IM server

2014-03-31 Thread Lutz Horn
Hi, I want to develop a instant message server, simply has user and group entity. Is there any better existing open-source one? Take a look at XMPP[0]. There are some Python libraries[1]. [0] https://en.wikipedia.org/wiki/XMPP [1] http://xmpp.org/xmpp-software/libraries/ -- Opt out of gl

Re: Loop Question

2013-06-25 Thread Lutz Horn
Hi, Am 24.06.2013 14:12 schrieb christheco...@gmail.com: username=raw_input("Please enter your username: ") password=raw_input("Please enter your password: ") if username == "john doe" and password == "fopwpo": print "Login Successful" else: print "Please try again" while not usernam

Re: List problem

2012-12-02 Thread Lutz Horn
ty', 'NN'), ('scenario', 'NN'), ('in', > 'IN'), ('the', 'DT'), ('eastern', 'NN'), ('region', 'NN'), (',', ','), ("''", > "'&#

Re: trying to create simple py script

2012-08-09 Thread Lutz Horn
return body else: return 'This is a normal HTTP Post request.' run(host='localhost', port=8080) Lutz -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get my character?

2012-01-26 Thread Lutz Horn
Hi, On Thu, 26 Jan 2012 20:52:48 +0800, contro opinion wrote: how can i get "你好" from 'xc4xe3xbaxc3' ? Please share any results you get from http://stackoverflow.com/questions/9018303/how-to-get-my-character with python-list. Lutz -- http://mail.python.org/mailman/listinfo/python-list

Re: Geodetic functions library GeoDLL 32 Bit and 64 Bit

2011-07-20 Thread Lutz Horn
Hi, do you think this is the right place to advertise proprietary and commercial software? Lutz -- http://mail.python.org/mailman/listinfo/python-list

upcoming Python training in Florida, April 27-29

2010-04-06 Thread Mark Lutz
ation instructions, please visit the class web page: http://learning-python.com/2010-public-classes.html If you are unable to attend in April, our next Sarasota class is already scheduled for July 13-15. Thanks, and we hope to see you at a Python class in Florida soon. --Mark Lutz (lutz at lea

Python training in Florida, April 27-29

2010-03-02 Thread Mark Lutz
in sunny and warm Florida soon. --Mark Lutz at learning-python.com -- http://mail.python.org/mailman/listinfo/python-list

Re: reading from pipe

2010-01-25 Thread Lutz Horn
Hi, Richard Lamboj schrieb: > is there any solution to catch if a pipe has closed? Maybe the signal modul? Since sys.stdin is a file object, you can use sys.stdin.closed to check if it has been closed. Lutz -- http://mail.python.org/mailman/listinfo/python-list

Python training in Florida, January 19-21

2009-12-16 Thread Mark Lutz
lease visit the class web page: http://home.earthlink.net/~python-training/2010-public-classes.html If you are unable to attend in January, our next Sarasota class is already scheduled for April 6-8. Thanks, and we hope to see you at a Python class in sunny and warm Florida soon. --Mark Lutz at P

Re: whitespace in xml output

2009-12-08 Thread Lutz Horn
Hi, wadi wadi wrote: > I am creating some xml output using minidom and saving it to a file > using doc.writexml() Could you please add some code of *how* you add the content "bill catman" to the "Author" element? It seems as if whitespace is an issue here. Lutz

Re: How to test urllib|urllib2-using code?

2009-11-04 Thread Lutz Horn
dule-like-urllib Lutz -- http://mail.python.org/mailman/listinfo/python-list

Re: How to print zero-padded floating point numbers in python 2.6.1

2009-11-04 Thread Lutz Horn
Lorenzo Di Gregorio schrieb: > print '%2.2F' % 3.5 > 3.50 > print '%02.2F' % 3.5 > 3.50 > > How can I get print (in a simple way) to print 03.50? print '%05.2F' % 3.5 Lutz -- http://mail.python.org/mailman/listinfo/python-list

New books: Learning Python, Python Pocket Reference 4th Eds

2009-09-25 Thread Mark Lutz
e Unicode processing, managed attributes, decorators, and metaclasses. For a more detailed description of the changes in the new Learning Python, please see the early draft Preface excerpt: http://www.rmi.net/~lutz/lp4e-preface-preview.html For more details on both books, see O'Reilly's

Pythons in Florida (training next month)

2009-09-21 Thread Mark Lutz
t the class web page: http://home.earthlink.net/~python-training/2009-public-classes.htm If you are unable to attend in October, our next Sarasota class is already scheduled for January 19-21. Thanks, and we hope to see you in sunny Florida soon. --Mark Lutz at Python Training Ser

Florida Python training in October

2009-08-10 Thread Mark Lutz
We're pleased to announce a new venue for our Python classes. Python author and trainer Mark Lutz will be teaching a 3-day Python class on October 20-22, in Sarasota, Florida. Come spend 3 days mastering Python, and enjoy all that Florida and its Gulf Coast have to offer while you're h

Re: gett error message: "TypeError: 'int' object is not callable"

2009-07-09 Thread Lutz Horn
Hi, Nick schrieb: > I've seen a lot of posts on this problem, but none seems to help. Could you please post a sample input file and the exact error message? Thanks Lutz -- Strike Out ⇒ http://www.fourmilab.ch/documents/strikeout -- http://mail.python.org/mailman/listinfo/python-list

Re: Python training in Colorado, January 27-30

2009-01-05 Thread lutz
Yes, my public classes are held only in Colorado today. Most students travel from out-of-town to attend. Per my web page, my classes may be available in a different location later this year (Florida is a strong possibility), but not in Tulsa, unfortunately. Thanks, --Mark Lutz -Original

Python training in Colorado, January 27-30

2009-01-04 Thread Mark Lutz
Python author and trainer Mark Lutz will be teaching a 4-day Python class on January 27-30, in Longmont, Colorado. This is a public training session open to individual enrollments, and covers the same topics and hands-on lab work as the onsite sessions that Mark teaches. The class provides an in

2009 Python class schedule

2008-11-06 Thread Mark Lutz
provide in-depth and hands-on introductions to Python and its common applications, and are based upon the instructor's popular Python books. Thanks for your interest, --Mark Lutz at Python Training -- http://mail.python.org/mailman/listinfo/python-list

Python training in Colorado, October 15-17

2008-09-09 Thread Mark Lutz
Python author and trainer Mark Lutz will be teaching another 3-day Python class at a conference center in Longmont, Colorado, on October 15-17, 2008. This is a public training session open to individual enrollments, and covers the same topics as the 3-day onsite sessions that Mark teaches, with

Re: Problem with variables assigned to variables???

2008-04-29 Thread Lutz Horn
y someway like this: >>> mydict = {'name1':"\"field_a\" LIKE '021'", ... 'name2':"\"field_a\" LIKE '031'", ... 'name3':"\"field_a\" LIKE '041'"} >>> for key, value in mydict.items(): ... print key, value ... name2 "field_a" LIKE '031' name3 "field_a" LIKE '041' name1 "field_a" LIKE '021' Lutz -- Do you want a Google Mail invitation? Just write me an email! -- http://mail.python.org/mailman/listinfo/python-list

Re: sed to python: replace Q

2008-04-29 Thread Lutz Horn
t;>> line = "date process text [ip] more text" >>> re.sub('].*$', '', re.sub('^.*\[', '', line, 1)) 'ip' Lutz -- http://mail.python.org/mailman/listinfo/python-list

Re: computing with characters

2008-04-29 Thread Lutz Horn
or completion, the solution is: >>> chr(ord('a') + 1) 'b' Lutz -- Do you want a Google Mail invitation? Just write me an email! -- http://mail.python.org/mailman/listinfo/python-list

Colorado Python training in May

2008-03-18 Thread Mark Lutz
Python author and trainer Mark Lutz will be teaching another 3-day Python class at a conference center in Longmont, Colorado, on May 14-16, 2008. This is a public training session open to individual enrollments, and covers the same topics as the 3-day onsite sessions that Mark teaches, with hands

Re: Python help for a C++ programmer

2008-01-16 Thread Lutz Horn
2, 3], ["ham", "spam", "eggs"]]] if __name__ == "__main__": responses = [] for input in sourceOfResponses: response = Response(input.name, input.age, input.iData, input.sData) reponses.append(response) L

Re: plz help how to print python variable using os.system()

2008-01-16 Thread Lutz Horn
Hi, On Wed, 16 Jan 2008 05:29:08 -0800 (PST), [EMAIL PROTECTED] said: > var = "/home/anonymous" > os.system("echo $var) os.system("echo %s" % var) Lutz -- GnuPG Key: 1024D/6EBDA359 1999-09-20 Key fingerprint = 438D 31FC 9300 CED0 1CDE A19D

Loading an exe icon into a pixmap/bitmap

2007-12-11 Thread ob . lutz
I've been searching for a way to load an icon from an executable into something that I can eventually display either through pygame or pygtk. I've tried the stuff found at http://groups.google.com/group/comp.lang.python/browse_thread/thread/d7f61f270cce368/3ff38c1ced504e43?lnk=gst&q=win32+icon#3ff3

ANN: Learning Python 3rd Edition

2007-10-29 Thread Mark Lutz
from recent Python training sessions. For more details, see O'Reilly's web page: http://www.oreilly.com/catalog/9780596513986/ O'Reilly also has a press release about the book here: http://press.oreilly.com/pub/pr/1843 Thanks, --Mark Lutz -- http://mail.python.org/mailman/listinfo/python-list

Colorado Python training in October

2007-09-03 Thread Mark Lutz
Python author and trainer Mark Lutz will be teaching another 3-day Python class at a conference center in Longmont, Colorado, on October 23-25, 2007. This is a public training session open to individual enrollments, and covers the same topics as the 3-day onsite sessions that Mark teaches, with

Re: class C: vs class C(object):

2007-07-19 Thread Lutz Horn
with old-style classes. Just for the records: the new and preferred style is class C(object): ... Regards Lutz -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV Issues

2007-07-18 Thread Lutz Horn
fg.py']] >>> f.close() >>> headings.append("1/27") >>> rows[0].append("we.py") >>> rows[1].append("gj.py") >>> rows[2].append("fg.py") >>> f = open("/tmp/data.csv", "wb") >>> writer = csv.writer(f) >>> writer.writerow(headings) >>> writer.writerows(rows) >>> f.close() Regards Lutz -- http://mail.python.org/mailman/listinfo/python-list

Python training in Colorado, June 2007

2007-04-19 Thread Mark Lutz
Python author and trainer Mark Lutz will be teaching another 3-day Python class at a conference center in Longmont, Colorado, on June 11-13, 2007. This is a public training session open to individual enrollments, and covers the same topics as the 3-day onsite sessions that Mark teaches, with

logging

2006-12-14 Thread Lutz Steinborn
Hello, I need to log each and only this loglevel to a different file. So for example all INFO to info.log and all ERROR to error.log. And I need a master logfile with all messages. How can I do this ? Any example ? Kindly regards Lutz http://www.4c-wohnen.de http://www.4c-parfum.de -- http

Python training in Colorado, January 2007

2006-12-13 Thread Mark Lutz
Python author and trainer Mark Lutz will be teaching another 3-day Python class at a conference center in Longmont, Colorado, on January 23-25, 2007. This is a public training session open to individual enrollments, and covers the same topics as the 3-day onsite sessions that Mark teaches, with

Re: Mark Lutz Python interview

2006-09-30 Thread Mark Lutz
Fuzzyman wrote: > Mark Lutz wrote: > > Python author and trainer Mark Lutz will be interviewed > > on the radio show Tech Talk this Sunday, October 1st, > > at 6PM Eastern time. He'll be answering questions about > > Python, his books, and his Python training

Mark Lutz Python interview

2006-09-29 Thread Mark Lutz
Python author and trainer Mark Lutz will be interviewed on the radio show Tech Talk this Sunday, October 1st, at 6PM Eastern time. He'll be answering questions about Python, his books, and his Python training services. For more details about the show, see Tech Talk's websi

Colorado Python seminar in November

2006-09-13 Thread Mark Lutz
age of class topics. Like all our public classes, this seminar will be taught by best-selling Python author and trainer Mark Lutz, and is open to individual enrollments. For more details, please see our web page: http://home.earthlink.net/~python-training/public.html --Python Training Services -

Fall Python training seminar in Colorado

2006-07-19 Thread lutz
cs. Like all our public classes, this seminar will be taught by best-selling Python author and trainer Mark Lutz, and is open to individual enrollments. For more details, please see our web page: http://home.earthlink.net/~python-training/public.html Python Training Services -- http://mail.py

Re: SOAPpy and http authentication

2005-08-02 Thread Lutz Horn
ossible to call WSDL.Proxy with a String? Then you could build the URL als http://user:[EMAIL PROTECTED]/somewebservice. This works with SOAPpy.SOAPProxy. Lutz -- http://mail.python.org/mailman/listinfo/python-list

Re: what is __init__.py used for?

2005-07-05 Thread Lutz Horn
for Python to recognize the system1 directory as an importable module. Lutz -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple XML-to-Python conversion

2005-03-17 Thread Lutz Horn
[EMAIL PROTECTED] schrieb: I've been searching high and low for a way to simply convert a small XML configuration file to Python data structures. Take a look at Amara (http://uche.ogbuji.net/tech/4Suite/amara/). Lutz -- pub 1024D/6EBDA359 1999-09-20 Lutz Horn <[EMAIL PROTECTED]> Key

Re: Web framework

2005-03-10 Thread Lutz Horn
Chris <[EMAIL PROTECTED]> wrote: > Does CherryPy require a python installation on the client side? No, it only sends HTML-pages and other media to the client's browser. -- http://mail.python.org/mailman/listinfo/python-list