#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
__
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
mplement. There is no need to add
them to the stdlib.
Lutz
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
Define 2 lists. ...
[...]
Help me !
Sounds like homework. Have you tried anything? Does it work?
--
https://mail.python.org/mailman/listinfo/python-list
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
it in the Python installation you have available.
Lutz
--
https://mail.python.org/mailman/listinfo/python-list
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
; #!/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
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
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
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
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
/index.html ?
Lutz
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
]. 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
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-
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
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
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
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
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
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
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
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
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
ty', 'NN'), ('scenario', 'NN'), ('in',
> 'IN'), ('the', 'DT'), ('eastern', 'NN'), ('region', 'NN'), (',', ','), ("''",
> "'
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
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
Hi,
do you think this is the right place to advertise proprietary and
commercial software?
Lutz
--
http://mail.python.org/mailman/listinfo/python-list
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
in
sunny and warm Florida soon.
--Mark Lutz at learning-python.com
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
dule-like-urllib
Lutz
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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 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
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 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
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
t;>> line = "date process text [ip] more text"
>>> re.sub('].*$', '', re.sub('^.*\[', '', line, 1))
'ip'
Lutz
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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 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
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 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
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
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
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
-
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
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
for Python to recognize the system1 directory
as an importable module.
Lutz
--
http://mail.python.org/mailman/listinfo/python-list
[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
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
71 matches
Mail list logo