Rance Hall wrote:
Ok so I know what I am doing is deprecated (or at least poor form) but
the replacement must be awkward cause I'm not getting it.
[...]
message = "Bah."
if test:
message = message + " Humbug!"
It's not deprecated, nor is it poor form. However, it can be abused, or
perhap
Dear all,
I tried concatenating string variables with multiple strings and have the
file handle write the statement into a file. I don't know why I always get
the type error: must be string or read-only character buffer, not seq error.
I tried casting the whole new concatenated string using str(),
It's saying one of your variables is not a string. Is one of them a sequence?
Perhaps Mir-seq? If so, you need to come up with a way to build a string from
this object. You can call the str method and pass in your object or you can
explicitly create a string from the data in the object.
---
List,
I've been messing with metaclasses. I thought I understood them until I ran
into this. (See code below.) I was expecting the generated class, 'Foo' to have
an 'x' class-level attribute, as forced upon it by the metaclass 'DracoMeta'
at creation. Unfortunately, it doesn't and I don't know why
On Mon, Apr 18, 2011 at 9:50 PM, Marc Tompkins wrote:
> On Mon, Apr 18, 2011 at 6:53 PM, Rance Hall wrote:
>
>>
>> I'm going to go ahead and use this format even though it is deprecated
>> and then later when we upgrade it I can fix it.
>>
> And there you have your answer.
>
>> A list might make
How can I add a directory to PYTHONPATH? Using Ubuntu 10.04.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Tue, Apr 19, 2011 at 9:49 AM, mes...@juno.com wrote:
> How can I add a directory to PYTHONPATH? Using Ubuntu 10.04.
>
> ___
> Tutor maillist - Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listi
On 19-Apr-11 06:44, Rance Hall wrote:
On Mon, Apr 18, 2011 at 9:50 PM, Marc Tompkins wrote:
On Mon, Apr 18, 2011 at 6:53 PM, Rance Hall wrote:
I think you misunderstood me, I simply meant that the print "
".join(message) has to parse through each word in order to get any
output, I didn't me
On 19-Apr-11 06:49, mes...@juno.com wrote:
How can I add a directory to PYTHONPATH? Using Ubuntu 10.04.
That's an environment variable, so it depends on your shell. If
PYTHONPATH already exists, you can add your directory to it (with colons
between the names of directories). But you probab
Hello,
I would need to control a powerpoint file from python. I have
installed the win32com library for python, then i used makepy to
create a powerpoint-specific library.
The things i need to do are pretty basic: open a file, create a new
slide, place a picture and a comment to the picture.
The
Modulok wrote:
> List,
>
> I've been messing with metaclasses. I thought I understood them until I
> ran into this. (See code below.) I was expecting the generated class,
> 'Foo' to have an 'x' class-level attribute, as forced upon it by the
> metaclass 'DracoMeta' at creation. Unfortunately, it
Kann Vearasilp wrote:
> I tried concatenating string variables with multiple strings and have the
> file handle write the statement into a file. I don't know why I always get
> the type error: must be string or read-only character buffer, not seq
> error. I tried casting the whole new concatenated
On 19/04/2011 15:53, Pierre Barthelemy wrote:
The problem i have is that, often, while the script is running, the
powerpoint file would already be open. In this case, my script would
open it anew, and make the modifications in the newly opened file.
To prevent that problem, i need to be able to l
Thanks Peter,
That just fixes my problem. : )
Kann
On Tue, Apr 19, 2011 at 5:29 PM, Peter Otten <__pete...@web.de> wrote:
> Kann Vearasilp wrote:
>
>> I tried concatenating string variables with multiple strings and have the
>> file handle write the statement into a file. I don't know why I alwa
Forgot to send to group. Grrr.
-- Forwarded message --
From: Marc Tompkins
Date: Tue, Apr 19, 2011 at 10:01 AM
Subject: Re: [Tutor] working with strings in python3
To: Rance Hall
On Tue, Apr 19, 2011 at 6:44 AM, Rance Hall wrote:
> > Bottom line: Python is not BASIC. In BA
Rance Hall wrote:
On Mon, Apr 18, 2011 at 9:50 PM, Marc Tompkins wrote:
On Mon, Apr 18, 2011 at 6:53 PM, Rance Hall wrote:
I'm going to go ahead and use this format even though it is deprecated
and then later when we upgrade it I can fix it.
And there you have your answer.
A list might m
Rance Hall wrote:
Variables are variable, that's why we call them variable.
Constants are constant, and that's why we call them constant.
And Python has neither variables nor constants in the sense that (say)
Pascal, C or Fortran have, even though we often use the same words.
The difference
I've been noticing that in all the example codes I have seen, when someone
creates container, x, inside of a frame or other container class, y, they
always seem to create an instance of wx.Panel first and then use that
instance as the parent class of container x. I have been just placing 'self'
in
wx.Panel provides better cross-platform reliability, so it's fairly standard
practice to go with a Panel in a Frame, and place the buttons, etc. on the
panel.
On Tue, Apr 19, 2011 at 11:59 AM, Eric Stevens wrote:
> I've been noticing that in all the example codes I have seen, when someone
> cre
And presumably cleans up the leftover object with the value of 42 when it
changes to point at the 43 object?
Or does it leave all changes in memory until the program exits?
Bodsda.
Sorry for top posting, my phone won't let me change it
Sent from my BlackBerry® wireless device
-Original Me
On Tue, Apr 19, 2011 at 3:32 PM, wrote:
> And presumably cleans up the leftover object with the value of 42 when it
> changes to point at the 43 object?
>
> Or does it leave all changes in memory until the program exits?
>
> Bodsda.
> Sorry for top posting, my phone won't let me change it
> Sent
"Rance Hall" wrote
Ok so I know what I am doing is deprecated
I'm not aware of string concatenation being deprecated.
Ols string formatting is deprecated in the sense that the new
string format() method will replace it, but I don't even
expect to see that any time soon - too much old code
use
On Tue, Apr 19, 2011 at 2:37 PM, Joel Goldstick wrote:
>
> On Tue, Apr 19, 2011 at 3:32 PM, wrote:
>
>> And presumably cleans up the leftover object with the value of 42 when it
>> changes to point at the 43 object?
>>
>> Or does it leave all changes in memory until the program exits?
>>
>
> If a
"Rance Hall" wrote
String formatting doesn't work for me in this case
as the message is sort of dynamic.
I don;t understand that, string formatting is probably
the most dynamic way of constructing strings
there is, its designed for dynamic data! If your data
is really dynamic the only two wa
"Rance Hall" wrote
Variables are variable, that's why we call them variable.
Yes, but Programming variables(*) are variable in the sense
that they can represent different values over time. That is
not the same as requiring the values themselves to change.
The idea of immutable strings var
"Eric Stevens" wrote
I've been noticing that in all the example codes I have seen, when
someone
creates container, x, inside of a frame or other container class,
y, they
always seem to create an instance of wx.Panel first
You got an answer this time, but you will probably get better result
Joel Goldstick wrote:
If a value has no name bound to it, python figures that out and destroys it
Not quite... if there is no name, or any other reference, then the
garbage collector will destroy it. But it doesn't have to be a name:
anonymous objects can live inside lists, or dicts, or sets
bod...@googlemail.com wrote:
And presumably cleans up the leftover object with the value of 42 when it
changes to point at the 43 object?
In principle, yes, the garbage collector will destroy the no-longer used
object 42 once nothing is pointing to it any more.
But in practice, Python cache
28 matches
Mail list logo