Adam Funk writes:
> I'm trying to write an instance of email.message.Message, whose body
> contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
> again.)
>
> reply = email.message.Message()
> reply.set_charset('utf-8')
> ... # set various headers
> reply.set_paylo
iverson.z...@gmail.com writes:
> ...
> I have tried uncountable number of methods (e.g. explicit, implicit wait) but
> the stale error still persists as it seems to stays stale as long as it is
> staled.
>
> Have anyone come up with a solution to this and what is the best way to deal
> with DOM
On Tuesday 08 December 2015 14:30, Vincent Davis wrote:
> If I have a string that is python code, for example
> mycode = "print('hello world')"
> myresult = "hello world"
> How can a "manually" build a unittest (doctest) and test I get myresult
Not easily. Effectively, you would have to re-invent
Based on your responses, it is my understanding that process-state might offer
some efficiency benefits, but it is typically not a driving factor. If I
misunderstand, please advise. Thanks
--
https://mail.python.org/mailman/listinfo/python-list
On 2015-12-08 08:40, Chris Angelico wrote:
> One advantage of this kind of setup is that your URLs don't depend
> on your back end. I could replace all this with a Ruby on Rails
> site, and nobody would notice the difference. I could put together
> something using Node.js to replace the Ruby site,
On Tue, Dec 8, 2015 at 2:11 PM, Tim Chase wrote:
> On 2015-12-08 10:09, Chris Angelico wrote:
>> All three are very different.
>>
>> 1) Process state.
>>
>> You start up a Python program, and it sits there waiting for a
>> request. You give it a request, and get back a response; it goes
>> back to
On 2015-12-08 10:09, Chris Angelico wrote:
> All three are very different.
>
> 1) Process state.
>
> You start up a Python program, and it sits there waiting for a
> request. You give it a request, and get back a response; it goes
> back to waiting for a request. If you change a global variable,
If I have a string that is python code, for example
mycode = "print('hello world')"
myresult = "hello world"
How can a "manually" build a unittest (doctest) and test I get myresult
I have attempted to build a doctest but that is not working.
e = doctest.Example(source="print('hello world')/n", wan
On Tue, Dec 8, 2015 at 12:00 PM, wrote:
> Ah, I was confused that process state somehow allowed Python to support
> per-connection state without using sessions (which lead me to ask about
> websockets). I guess Python could do it without storing the session ID in a
> file or database and inst
On Tue, Dec 8, 2015 at 1:36 PM, Erik wrote:
> So, you can write your class's iterator to do anything that makes sense when
> someone says "for i in myclassinstance:".
>
> If your class is a subclass of a class ("is-a") that already has a defined
> iterator (such as a list or a dict) and the behavi
On 08/12/15 01:50, Robert wrote:
One example, see below please, is in the above mentioned link. I don't see
the purpose of the example.
OK, so there are two parts to this.
The first, is "how do I iterate over something". The answer to that is
using "for" or using "iter()" followed by zero or
On Monday, December 7, 2015 at 8:39:48 PM UTC-5, Robert wrote:
> On Monday, December 7, 2015 at 8:32:30 PM UTC-5, Robert wrote:
> > On Monday, December 7, 2015 at 8:14:46 PM UTC-5, Robin Koch wrote:
> > > Am 08.12.2015 um 02:05 schrieb Robert:
> > > > Hi,
> > > > When I learn for loop with below li
Hi Robert,
On 08/12/15 01:39, Robert wrote:
I don't find a way to show __next__ yet.
Can we explicitly get the iterator for a list?
Thanks,
Excuse me. I find it as the following:
xx.__iter__().next
Out[16]:
xx.__iter__().next()
Out[17]: 1
Robin has told you how things work under the hood
On Monday, December 7, 2015 at 8:32:30 PM UTC-5, Robert wrote:
> On Monday, December 7, 2015 at 8:14:46 PM UTC-5, Robin Koch wrote:
> > Am 08.12.2015 um 02:05 schrieb Robert:
> > > Hi,
> > > When I learn for loop with below link:
> > >
> > > http://www.shutupandship.com/2012/01/understanding-python
On Monday, December 7, 2015 at 8:14:46 PM UTC-5, Robin Koch wrote:
> Am 08.12.2015 um 02:05 schrieb Robert:
> > Hi,
> > When I learn for loop with below link:
> >
> > http://www.shutupandship.com/2012/01/understanding-python-iterables-and.html
> >
> > it has such explanation:
> >
> > \
> >
Am 08.12.2015 um 02:05 schrieb Robert:
Hi,
When I learn for loop with below link:
http://www.shutupandship.com/2012/01/understanding-python-iterables-and.html
it has such explanation:
\
for loop under the hood
First let's look at the for loop under the hood. When Python executes the
Hi,
When I learn for loop with below link:
http://www.shutupandship.com/2012/01/understanding-python-iterables-and.html
it has such explanation:
\
for loop under the hood
First let's look at the for loop under the hood. When Python executes the
for loop, it first invokes the __iter__()
Ah, I was confused that process state somehow allowed Python to support
per-connection state without using sessions (which lead me to ask about
websockets). I guess Python could do it without storing the session ID in a
file or database and instead in process state (i.e. application memory,
ri
On Dec 5, 2015 10:21 AM, "BartC" wrote:
>
>
> The latter is not the same. Some of the differences are:
>
> * ++ and -- are often inside inside expressions and return values (unlike
x+=1 in Python)
>
> * x++ and x-- return the /current/ value of x, unlike x+=1 even if it
were to return a val
Hi Tony,
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_name.
Generally, an object should not ne
On 07Dec2015 14:27, villasc...@gmail.com wrote:
In regards to Chris's statement: "It openly and honestly does NOT reset its
state between page requests"
With PHP, I have sessions to preserve state. I have a feeling that this is
significantly different. Yes? How? Does this somehow relate to
On Mon, Dec 7, 2015 at 3:27 PM, wrote:
> Thank you all!
>
> Okay, the concept of a WSGI along with a framework provides insight on my
> main questions.
>
> In regards to Chris's statement: "It openly and honestly does NOT reset its
> state between page requests"
>
> With PHP, I have sessions to
On Tue, Dec 8, 2015 at 9:27 AM, wrote:
> In regards to Chris's statement: "It openly and honestly does NOT reset its
> state between page requests"
>
> With PHP, I have sessions to preserve state. I have a feeling that this is
> significantly different. Yes? How? Does this somehow relate to
Thank you all!
Okay, the concept of a WSGI along with a framework provides insight on my main
questions.
In regards to Chris's statement: "It openly and honestly does NOT reset its
state between page requests"
With PHP, I have sessions to preserve state. I have a feeling that this is
signifi
On Tue, Dec 8, 2015 at 8:59 AM, Ian Kelly wrote:
> On Mon, Dec 7, 2015 at 2:40 PM, Chris Angelico wrote:
>> So that's a quick potted summary of why the URLs don't reflect the
>> language used. Python is event-driven, but instead of defining events
>> at the file level, the way PHP does, they're d
On Tue, Dec 8, 2015 at 8:38 AM, Terry Reedy wrote:
>>def list_actors( self ):
>> h=[]
>> for n in self.actors:
>>h.append( n.get_name() )
>> return h
>
>
> return list(self.actors) # or perhaps even faster
> return self.actors[:]
Not identical semantics. This is a use-
On Mon, Dec 7, 2015 at 2:40 PM, Chris Angelico wrote:
> So that's a quick potted summary of why the URLs don't reflect the
> language used. Python is event-driven, but instead of defining events
> at the file level, the way PHP does, they're defined at the function
> level. Of course, if you *want
On Tue, Dec 8, 2015 at 8:21 AM, wrote:
> Per https://wiki.python.org/moin/PythonVsPhp, "The vast majority of Python
> Web applications are run in a separate process. This has some important
> implications."
>
> From a PHP background, guess I just don't understand the concept of "separate
> pro
On 12/7/2015 4:07 PM, villasc...@gmail.com wrote:
Hello all! Just started getting into Python, and am very excited about the
prospect.
I am struggling on some general concepts. My past experience with server-side code is
mostly limited to PHP and websites. I have some file called "whatever.
On Tue, Dec 8, 2015 at 8:07 AM, wrote:
> I am struggling on some general concepts. My past experience with
> server-side code is mostly limited to PHP and websites. I have some file
> called "whatever.php", the browser accesses it, and PHP parses it and returns
> HTML, JSON, etc. Every now
On 12/7/2015 1:10 PM, Tony van der Hoff wrote:
Hi,
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 Actors. The inner class needs
to acces
On Mon, Dec 7, 2015 at 2:07 PM, wrote:
> Hello all! Just started getting into Python, and am very excited about the
> prospect.
>
> I am struggling on some general concepts. My past experience with
> server-side code is mostly limited to PHP and websites. I have some file
> called "whatever
On 07Dec2015 13:07, villasc...@gmail.com wrote:
Hello all! Just started getting into Python, and am very excited about the
prospect.
I am struggling on some general concepts. My past experience with server-side code is
mostly limited to PHP and websites. I have some file called "whatever.p
Right after I sent my first post, I realized I did not include the following:
Per https://wiki.python.org/moin/PythonVsPhp, "The vast majority of Python Web
applications are run in a separate process. This has some important
implications."
>From a PHP background, guess I just don't understand t
Hello all! Just started getting into Python, and am very excited about the
prospect.
I am struggling on some general concepts. My past experience with server-side
code is mostly limited to PHP and websites. I have some file called
"whatever.php", the browser accesses it, and PHP parses it an
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
On Mon, Dec 7, 2015 at 11:10 AM, Tony van der Hoff wrote:
> Hi,
>
> 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 Actors. The inn
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
Tony van der Hoff wrote:
> Hi,
>
> 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 Actors. The inner class needs
> to access a met
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
On 12/07/2015 11:10 AM, Tony van der Hoff wrote:
> Hi,
>
> 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 Actors. The inner clas
Tony van der Hoff wrote:
> Hi,
>
> 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 Actors. The inner class needs
> to access a m
Hi,
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 Actors. The inner class needs
to access a method of the outer class; here the meth
On Sun, Dec 6, 2015 at 5:16 PM, Steven D'Aprano wrote:
> Oh, I can make one guess... if you're using Windows XP, I'm afraid that
> Python 3.5 is not supported. You'll have to either downgrade to Python 3.4,
> or upgrade to Windows 7 or higher, or another operating system.
For the sake of accuracy
On 12/7/2015 12:15 PM, Anupam Mediratta wrote:
Hello,
I have to use python 3.5 in my use case and one of the packages I use
(gensim), in turn uses smart_open (https://github.com/piskvorky/smart_open/)
smart_open depends on boto and boto fails on my machine running ubuntu
15.10.
So in order for
In a message of Mon, 07 Dec 2015 22:45:44 +0530, Anupam Mediratta writes:
>Hello,
>
>I have to use python 3.5 in my use case and one of the packages I use
>(gensim), in turn uses smart_open (https://github.com/piskvorky/smart_open/)
>
>smart_open depends on boto and boto fails on my machine running
On 12/7/2015 9:57 AM, Adam Funk wrote:
I'm trying to write an instance of email.message.Message, whose body
contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
again.)
The email package was rewritten for, I believe, 3.3. I believe it
should handle unicode email encoded as ut
Hello,
I have to use python 3.5 in my use case and one of the packages I use
(gensim), in turn uses smart_open (https://github.com/piskvorky/smart_open/)
smart_open depends on boto and boto fails on my machine running ubuntu
15.10.
So in order for me to be able to run gensim, I need to be able t
In a message of Mon, 07 Dec 2015 00:32:37 +, lalith writes:
>Dear sir.
>
>I was using Python2.7 and i move to Python3.5.
>I face big trouble with installing software packages, i need in my
>development.
>
>Lalith
>--
>https://mail.python.org/mailman/listinfo/python-list
Do you want to instal
In a message of Sun, 06 Dec 2015 20:44:03 +, "John Robinson" writes:
>When I run the installer (python-3.5.0.exe [win32]) I see this:
>
>
>
>
>
>
>
>There seems to be "hidden" buttons as clicking in the middle of this dialog
>box does continue the process.
>
>However, when complete, and I st
On 2015-12-07, Adam Funk wrote:
> I'm trying to write an instance of email.message.Message, whose body
> contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
> again.)
>
> reply = email.message.Message()
> reply.set_charset('utf-8')
> ... # set various headers
> re
In a message of Mon, 07 Dec 2015 10:51:10 -0200, jorge.conr...@cptec.inpe.br wr
ites:
>
>
>Hi,
>
>I'm changing from the IDL to PYTHON. I would like know how can I define
>the size of the window plot in Python. On IDL I define the size of area
>plot by:
>
>
>window,1,xsize=1000,ysize=1000
>
>
>It
I'm trying to write an instance of email.message.Message, whose body
contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
again.)
reply = email.message.Message()
reply.set_charset('utf-8')
... # set various headers
reply.set_payload('\n'.join(body_lines) + '\n')
On 2015-12-04, Oscar Benjamin wrote:
> Or you can use fileinput which is designed to be exactly this kind of
> context manager and to be used in this way. Although fileinput is slightly
> awkward in defaulting to reading stdin.
That default is what I specifically like about fileinput --- it's a
n
When I run the installer (python-3.5.0.exe [win32]) I see this:
There seems to be "hidden" buttons as clicking in the middle of this dialog
box does continue the process.
However, when complete, and I start python, I get an error saying its not a
valid win32 application.
So, I uninstall
Dear sir.
I was using Python2.7 and i move to Python3.5.
I face big trouble with installing software packages, i need in my
development.
Lalith
--
https://mail.python.org/mailman/listinfo/python-list
Hi everyone!
It's been brought to my attention that I misworded something in the release
notes and it slipped through the cracks. In the NEWS I said:
> This is the last Twisted release where Python 2.6 is supported, on any
> platform.
However, I meant that this is the first Twisted release to
Hi,
I'm changing from the IDL to PYTHON. I would like know how can I define
the size of the window plot in Python. On IDL I define the size of area
plot by:
window,1,xsize=1000,ysize=1000
It is possible define the size of the window before my data is plotted.
Conrado
--
https://mail.pyt
On Sun, 6 Dec 2015 at 23:11 Quivis wrote:
> On Fri, 04 Dec 2015 13:07:38 -0500, D'Arcy J.M. Cain wrote:
>
> > I thought that going to Python 3.4 would solve my Unicode issues but it
> > seems I still don't understand this stuff. Here is my script.
> >
> > #! /usr/bin/python3 # -*- coding: UTF-8
I'm new to Python and programming. Been learning it for 3 weeks now but have
had lot of obstacles along the way. I found some of your insights very useful
as a starter but I have come across many more complicated challenges that
aren't very intuitive.
For example,I'm trying to scrap this web(vi
60 matches
Mail list logo