Lie wrote:
Why this generates AttributeError, then not?
Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import xml
xml.dom
Traceback (most recent call last):
File "", line 1
How to insert letter "A" on each line (of a very long list of lines)
at position 22, i.e., one space after "LEU", leaving all other
characters at the same position as in the original example:
ATOM 1 N LEU 1 146.615 40.494 103.776 1.00 73.04 1SG 2
In all lines"ATOM" is c
Hallöchen!
Terry Reedy writes:
> [...]
>
> Or the proposal would have to be that 'self' is mandatory for all
> programmers in all languages. I think *that* would be
> pernicious. People are now free to write the more compact 's.sum =
> s.a + s.b + s.c' if they want instead of the 'self' version.
On Jul 25, 5:52 pm, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
> Also, simplejson and python-cjson might not be entirely compatible:
> there's one character that one escapes and the other doesn't, or something.
> --
They also have different interface. simplejson uses load/loads/dump/
dumps, whereas
On Jul 24, 4:11 am, Jordan <[EMAIL PROTECTED]> wrote:
> Of course not.
>
> I just think Explicit is better than Implicit is taken seriously by a
> large segment the Python community as a guiding principle,
Yeah, try telling that to the people who advise writing "if x" instead
of "if x==0", or "if
Francesco Pietra wrote:
> How to insert letter "A" on each line (of a very long list of lines)
> at position 22, i.e., one space after "LEU", leaving all other
> characters at the same position as in the original example:
>
>
> ATOM 1 N LEU 1 146.615 40.494 103.776 1.00 73.04
On Jul 24, 1:41 am, Jordan <[EMAIL PROTECTED]> wrote:
> Except when it comes to Classes. I added some classes to code that had
> previously just been functions, and you know what I did - or rather,
> forgot to do? Put in the 'self'. In front of some of the variable
> accesses, but more noticably, a
On Jul 25, 5:37 pm, "Colin J. Williams" <[EMAIL PROTECTED]> wrote:
> Using >easy_install -v
> -fhttp://code.enthought.com/enstaller/eggs/sourceenthought.traits
>
> The result is:
>
> ...
> many lines
> ...
>
> copyingenthought\traits\ui\tests\shell_editor_test.py
> ->
> build\lib.win32-2.5\enth
Just click and Enjoy the latest Shreya and Asin
SEXY photes also your favorite Heroines...
http://lovegroup341.blogspot.com/
#
ENJOY each moments
--
http://mail.python.org/mailman/listinfo/python-list
> The end result of that is on a 32-bit machine IronPython runs in a
> 32-bit process and on a 64-bit machine it runs in a 64-bit process.
That's probably not exactly true (although I haven't checked).
When you start a .NET .exe program, the operating system needs to decide
whether to create a 3
> (Any recommendations on a flavor of 64 bit of Linux for the Intel
> architecture would be appreciated)
My recommendation is to use Debian or Ubuntu, as that's my personal
preference. As MAL said, any recent distribution that supports AMD64
should be fine (assuming you are not interested in Itani
Carl Banks a écrit :
On Jul 24, 4:11 am, Jordan <[EMAIL PROTECTED]> wrote:
Of course not.
I just think Explicit is better than Implicit is taken seriously by a
large segment the Python community as a guiding principle,
Yeah, try telling that to the people who advise writing "if x" instead
of
On Jul 26, 2:41 pm, "Francesco Pietra" <[EMAIL PROTECTED]> wrote:
> How to insert letter "A" on each line (of a very long list of lines)
> at position 22, i.e., one space after "LEU", leaving all other
> characters at the same position as in the original example:
>
> ATOM 1 N LEU 1
Matthew Fitzgibbons a écrit :
(snip)
As for !=, it seems like there is a technical reason for the behavior.
Remember, there is no default __ne__ method, so the behavior you want
would have to live in the interpreter. If __ne__ isn't defined, it would
have to try to call __eq__ and negate the r
Customized Excel Workbook to Cost All Your Recipes & Menu Items
http://food-drinks.page.tl/
--
http://mail.python.org/mailman/listinfo/python-list
Historical half-timbered house with excellent cuisine in Oberwesel
http://food-drinks.page.tl/
--
http://mail.python.org/mailman/listinfo/python-list
How To Gain Freaky Muscle Mass. As Seen On CNN.
http://food-drinks.page.tl/
--
http://mail.python.org/mailman/listinfo/python-list
I fought with excess belly fat for years until I found this 1 trick.
http://food-drinks.page.tl/
--
http://mail.python.org/mailman/listinfo/python-list
Eccelsa Qualità di Montagna per Rivenditori, Ristoranti e Privati.
http://food-drinks.page.tl/
--
http://mail.python.org/mailman/listinfo/python-list
H!
First I have some random string below.
bla = """
//
with italian regional recipes with italian master chefs
http://food-drinks.page.tl/
--
http://mail.python.org/mailman/listinfo/python-list
Six Elements of Superfruit Success Buy new book of expert insights!
http://food-drinks.page.tl/
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 26, 2:29 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Lie wrote:
> > Why this generates AttributeError, then not?
>
> > Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30)
> > [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
> > Type "help", "copyright", "credits" or "license" for more informati
Terry Reedy <[EMAIL PROTECTED]> writes:
> Nikolaus Rath wrote:
>> Terry Reedy <[EMAIL PROTECTED]> writes:
>>> Torsten Bronger wrote:
Hallöchen!
>>> > And why does this make the implicit insertion of "self" difficult?
I could easily write a preprocessor which does it after all.
>>> class
I am still at the stone age, using scripts (e.g., to insert a string
after a string) of the type
f = open("xxx.pdb", "r")
for line in f:
print line
if "H16Z POPC" in line:
print "TER"
f.close()
That is, I have to learn about modules. In your scripts I am lost
about the filename for t
On Jul 26, 5:03 pm, [EMAIL PROTECTED] wrote:
> H!
>
> First I have some random string below.
>
> bla = """
> //
> var bla = new Blaobject("argh 1a", "argh 2a", "24", 24, 345)
>
> function la( tec )
> {
>
Lie wrote:
If you have any idea what black magic is happening in my computer
right now, I'd appreciate it.
command completion? (no ubuntu within reach right now, so I cannot
check how they've set it up).
try starting python with the "-v" option, so you can see exactly when
the import occu
On Jul 26, 5:42 pm, "Francesco Pietra" <[EMAIL PROTECTED]> wrote:
> I am still at the stone age, using scripts (e.g., to insert a string
> after a string) of the type
>
> f = open("xxx.pdb", "r")
> for line in f:
> print line
> if "H16Z POPC" in line:
> print "TER"
> f.close()
>
> That
Thanks Fredrik,
very nice examples.
André
AMD wrote:
For reading delimited fields in Python, you can use .split string
method.
Yes, that is what I use right now, but I still have to do the
conversion to integers, floats, dates as several separate steps. What
is nice about the scanf functi
Francesco Pietra wrote:
How to insert letter "A" on each line (of a very long list of lines)
at position 22, i.e., one space after "LEU", leaving all other
characters at the same position as in the original example:
ATOM 1 N LEU 1 146.615 40.494 103.776 1.00 73.04 1SG
> In short, the regular expression you used doesn't seem to be an effort
> to solve the problem. In other words, you haven't read the regular
> expression docs:http://docs.python.org/lib/module-re.html. In other
> words, it's useless to talk with you until then.
>
Its a combination
- I don't under
Bruno Desthuilliers a écrit :
(snip)
There are quite a few cases in Python where there are both a specific
magic method *and* a default behaviour based on another magic method if
the specific one is not implemented. Just out of my mind:
s/out of my mind/Off the top of my head/
Pardon my fren
On Sat, 26 Jul 2008 11:08:12 +0200, Nikolaus Rath wrote:
> Terry Reedy <[EMAIL PROTECTED]> writes:
...
>> Because you must prefix self attributes with 'self.'. If you do not use
>> any attributes of the instance of the class you are making the function
>> an instance method of, then it is not real
[EMAIL PROTECTED] wrote:
- For me its hard to learn the re , I will try to search again at
google for examples and do some copy past things.
this might be useful when figuring out how RE:s work:
http://kodos.sourceforge.net/
also, don't forget the following guideline:
"Some people, w
Hi All,
I just ran into an issue with the rstrip method when using it on path
strings.
When executing a function I have a need to strip off a portion of the
current working directory and add on a path to a log file. Initially
this worked great but then I added a branch in SVN which caused the pa
Hallöchen!
Steven D'Aprano writes:
> On Sat, 26 Jul 2008 11:08:12 +0200, Nikolaus Rath wrote:
>
>> [...]
>>
>> so 'self' should *automatically* only be inserted in the function
>> declaration, and *manually* be typed for attributes.
>
>
> That idea might have worked many years ago, but not now.
On 26 jul, 14:25, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > - For me its hard to learn the re , I will try to search again at
> > google for examples and do some copy past things.
>
> this might be useful when figuring out how RE:s work:
>
> http://kodos.sourcefor
On Jul 26, 6:47 am, Matthew Fitzgibbons <[EMAIL PROTECTED]> wrote:
> If you're using wx, there is also wx.lib.plot, which I found to be
> _much_ faster than matplotlib in my application, especially when resizing.
Yes. Matplotlib creates beautiful graphics, but are terribly slow on
large data sets
On Sat, Jul 26, 2008 at 7:59 AM, Tim Cook <[EMAIL PROTECTED]>wrote:
> Hi All,
>
> I just ran into an issue with the rstrip method when using it on path
> strings.
>
> When executing a function I have a need to strip off a portion of the
> current working directory and add on a path to a log file.
Tim Cook wrote:
Hi All,
I just ran into an issue with the rstrip method when using it on path
strings.
When executing a function I have a need to strip off a portion of the
current working directory and add on a path to a log file. Initially
this worked great but then I added a branch in SVN w
On Sat, 26 Jul 2008 14:07:52 +1000
Ben Finney <[EMAIL PROTECTED]> wrote:
> > sys.stdout = n
>
> Re-binds the name 'sys.stdout' to the object already referenced by the
> name 'n'. No objects are changed by this; only bindings of names to
> objects.
I do agree that the object formerly known as
On Sat, 26 Jul 2008 09:45:21 +0200
Torsten Bronger <[EMAIL PROTECTED]> wrote:
> Of course, "self" would have to become a reserved word. You could
> say that this may break some code, but I don't see much freedom
Isn't this a showstopper all by itself?
> removed from the language. After all, bei
Hi all,
I just started using the warnings module in Python 2.5.2. When I
trigger a warning using the default warning options, an entry is created
in a module-level cache so that the warning is ignored in the future.
However, I don't see an easy way to clear or invalidate these
module-level
Hallöchen!
D'Arcy J.M. Cain writes:
> On Sat, 26 Jul 2008 09:45:21 +0200
> Torsten Bronger <[EMAIL PROTECTED]> wrote:
>
>> Of course, "self" would have to become a reserved word. You
>> could say that this may break some code, but I don't see much
>> freedom
>
> Isn't this a showstopper all by i
On Sat, 26 Jul 2008 16:25:18 +0200
Torsten Bronger <[EMAIL PROTECTED]> wrote:
> > Isn't this a showstopper all by itself?
>
> Yes. But I've seen no code that uses some other word. Emacs'
> syntax highlighting even treats it as reserved. So I think that
> other counter-arguments are stronger.
>
Hallöchen!
D'Arcy J.M. Cain writes:
> On Sat, 26 Jul 2008 16:25:18 +0200
> Torsten Bronger <[EMAIL PROTECTED]> wrote:
>
>>> Isn't this a showstopper all by itself?
>>
>> Yes. But I've seen no code that uses some other word. Emacs'
>> syntax highlighting even treats it as reserved. So I think
On 26 Jul., 09:45, Torsten Bronger <[EMAIL PROTECTED]>
wrote:
> Hallöchen!
>
> Terry Reedy writes:
> > [...]
>
> > Or the proposal would have to be that 'self' is mandatory for all
> > programmers in all languages. I think *that* would be
> > pernicious. People are now free to write the more compa
Hallöchen!
Kay Schluehr writes:
> On 26 Jul., 09:45, Torsten Bronger <[EMAIL PROTECTED]>
> wrote:
>>
>> Terry Reedy writes:
>>
>>> [...]
>>>
>>> Or the proposal would have to be that 'self' is mandatory for
>>> all programmers in all languages. I think *that* would be
>>> pernicious. People are
In article <[EMAIL PROTECTED]>,
Jordan <[EMAIL PROTECTED]> wrote:
>
>The point I was trying to make originally was that applying any mantra
>dogmatically, including Explicit is better than implicit, can lead to
>bad results. Perhaps having Practicality beats purity is enough of a
>reminder of that
Martin v. Löwis wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
>> The end result of that is on a 32-bit machine IronPython runs in a
>> 32-bit process and on a 64-bit machine it runs in a 64-bit process.
>
>
> That's probably not exactly true (although I haven't checked).
>
> When you st
Huge Selections at Great Prices The Convenience of OneCart!
http://good-furniture-care.page.tl/
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 26, 8:50 am, bukzor <[EMAIL PROTECTED]> wrote:
> I was trying to change the behaviour of print (tee all output to a
> temp file) by inheriting from file and overwriting sys.stdout, but it
> looks like print uses C-level stuff to do its writes which bypasses
> the python object/inhertiance s
Sorry to come again for the same problem. On commanding:
$ python script.py 2>&1 | tee fileout.pdb
nothing occurred (fileout.pdb was zero byte). The script reads:
f = open("xxx.pdb", "w")
f.write('line = line[:22] + "A" + line[23:]')
f.close()
File xxx.pdb is opened by the command: when I forgo
bukzor wrote:
I have to go into these convulsions to get the directory that the
script is in whenever I need to use relative paths. I was wondering if
you guys have a better way:
...
If you just need the current path (where it is executed) why not use
os.getcwd()
which returns a string of th
bukzor wrote:
from os.path import abspath, realpath
realpath(path.__file__.rstrip("c"))
'/home/bgolemon/python/symlinks/path.py'
realpath(abspath(path.__file__.rstrip("c")))
'/home/bgolemon/python/symlinks/symlinks/path.py'
--
http://mail.python.org/mailman/listinfo/python
On Jul 25, 10:08 pm, bukzor <[EMAIL PROTECTED]> wrote:
> I have to go into these convulsions to get the directory that the
> script is in whenever I need to use relative paths. I was wondering if
> you guys have a better way:
>
> from os.path import dirname, realpath, abspath
> here = dirname(realp
Andrew wrote:
bukzor wrote:
I have to go into these convulsions to get the directory that the
script is in whenever I need to use relative paths. I was wondering if
you guys have a better way:
...
If you just need the current path (where it is executed) why not use
os.getcwd()
which returns
>> The Microsoft .NET commercial framework uses the PE architecture of the
>
> Whats the "Commercial framework" ? I've only come accross 3, the
> standard 32 bit one and 2 64 bit variants.
That's the name of the Microsoft .NET product available for Windows.
There are other implementations as we
On Jul 26, 5:28 pm, [EMAIL PROTECTED] (Aahz) wrote:
> IMO, you made a big mistake in combining your point with two other meaty
> issues (whether method definitions should include self and whether !=
> should use __eq__() as a fallback).
> If solid discussion
> is your goal, I suggest that you wai
hello,
In a program I want to download (updated) files from google code (not
the svn section).
I could find a python script to upload files,
but not for downloading.
Anyone has a hint or a solution ?
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
Hey folks!
There are various web pages that I would like to read using urllib, but
they require login with passwords. Can anyone tell me how to find out
how to do that, both in general and specifically for YouTube.com.
Thankee.
--
http://mail.python.org/mailman/listinfo/python-list
On 25 Jul, 12:35, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote:
>
> But then Intel Itanium is being phased out anyway
Citation needed! ;-)
Paul
--
http://mail.python.org/mailman/listinfo/python-list
On 26 Jul, 06:06, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Paul Boddie wrote:
> > "The problem is that the explicit requirement to have self at the
> > start of every method is something that should be shipped off to the
> > implicit category."
Here, I presume that the author meant "at the start o
On 2008-07-24 18:06, Robert Rawlins wrote:
Chaps,
I'm looking to implement an exit/termination process for an application
which can be triggered by A) a keyboard interrupt or B) termination of the
application as a Daemon using a signal.
I have a whole bunch of tasks I want to perform as
On 2008-07-26 20:30, M.-A. Lemburg wrote:
On 2008-07-24 18:06, Robert Rawlins wrote:
Chaps,
I'm looking to implement an exit/termination process for an application
which can be triggered by A) a keyboard interrupt or B) termination of
the
application as a Daemon using a signal.
I hav
New to Python, and I have some questions on how to best set up a basic
development environment, particular relating to path issues.
Note: I am not root on my development box (which is some flavor of
BSD)
Where should I develop my own modules so as to refer to them in the
standard way. I.E. I wan
satoru wrote:
> As to "sample", it never get assigned to and when you say "append" the
> class variable is changed in place.
> hope my explaination helps.
Sure does, thanks a lot.
Here's an interesting side note: After fixing my "Channel" thingy the
whole project behaved as expected. But there w
Brett Ritter wrote:
New to Python, and I have some questions on how to best set up a basic
development environment, particular relating to path issues.
Note: I am not root on my development box (which is some flavor of
BSD)
Where should I develop my own modules so as to refer to them in the
sta
Martin v. Löwis wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
>> I just tested, I built a default C# forms app using the "AnyCPU"
>> option and it ran as a 64 bit app (no *32 in Task Manager), this is
>> on XP64.
>>
>> I have though installed the AMD64 version of the 2.0 framework and
On Sat, 26 Jul 2008 08:59:15 -0300, Tim Cook wrote:
> Hi All,
>
> I just ran into an issue with the rstrip method when using it on path
> strings.
>
> When executing a function I have a need to strip off a portion of the
> current working directory and add on a path to a log file. Initially
> t
Windows XP SP3
Python 2.5
wx.version() = '2.8.1.1 (msw-unicode)'
--
I have written the following *simplest* implementation of wx.timer I
can think of. No workie. I want an exception, a print statement, or
something.
The wxpython demos all work, but for some reason this isn't. The
demos are
On Jul 26, 2:57 pm, Gary Josack <[EMAIL PROTECTED]> wrote:
> sys.path is a list that will tell you where python is looking. You can
> append to this in your scripts to have python look in a specific
> directory for your own modules.
I can, but that is almost certainly not the standard way to devel
Jive Dadson wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
> Hey folks!
>
> There are various web pages that I would like to read using urllib, but
> they require login with passwords. Can anyone tell me how to find out
> how to do that, both in general and specifically for YouTube.com.
> If, as I wrote, you permit the omission of "self" in method signatures
> defined within class definitions, then you could still insist on
> instance attribute qualification using "self" - exactly as one would
> when writing Java according to certain style guidelines.
I'm not sure exactly what p
> The number of nodes is very large: millions for sure, maybe tens
> of millions. If considering (2), take note of my BOLD text above, which
> means I can't remove nodes as I iterate through them in the main loop.
Since your use of 'node' is pretty vague and I don't have a good sense
of what test
I do this, mabye a no-no?
import os
for root,dirs,files in os.walk(dir) : break
--
http://mail.python.org/mailman/listinfo/python-list
2008/7/26 <[EMAIL PROTECTED]>
> Windows XP SP3
> Python 2.5
> wx.version() = '2.8.1.1 (msw-unicode)'
> --
> I have written the following *simplest* implementation of wx.timer I
> can think of. No workie. I want an exception, a print statement, or
> something.
>
> The wxpython demos all work
Robert,
Many thanks, this has put me on track.
Colin W.
Robert Kern wrote:
On Jul 25, 5:37 pm, "Colin J. Williams" <[EMAIL PROTECTED]> wrote:
Using >easy_install -v
-fhttp://code.enthought.com/enstaller/eggs/sourceenthought.traits
The result is:
...
many lines
...
copyingenthought\trai
On Fri, 25 Jul 2008 16:09:13 -0700, jm.carp wrote:
> I'm writing a tcp client that grabs data from a server at 32hz. But the
> connection drops exactly one minute after it's opened. I can get data
> from the server fine for the first 60s, and then the connection goes
> dead. What's going on?
What
On Sat, 26 Jul 2008 00:49:20 -0700, Richard Levasseur wrote:
> On Jul 25, 5:52 pm, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
>> Also, simplejson and python-cjson might not be entirely compatible:
>> there's one character that one escapes and the other doesn't, or
>> something. --
>
> They also hav
Russ P. wrote:
If, as I wrote, you permit the omission of "self" in method signatures
defined within class definitions, then you could still insist on
instance attribute qualification using "self" - exactly as one would
when writing Java according to certain style guidelines.
I'm not sure exact
Carl Banks wrote:
On Jul 24, 4:11 am, Jordan <[EMAIL PROTECTED]> wrote:
Of course not.
I just think Explicit is better than Implicit is taken seriously by a
large segment the Python community as a guiding principle,
Yeah, try telling that to the people who advise writing "if x" instead
of "
Torsten Bronger wrote:
Hallöchen!
Terry Reedy writes:
[...]
Or the proposal would have to be that 'self' is mandatory for all
programmers in all languages. I think *that* would be
pernicious. People are now free to write the more compact 's.sum =
s.a + s.b + s.c' if they want instead of th
On Jun 30, 4:37 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>
> >Could anyone help me, I'm a python noob and need some help. im trying
> >to find some code that will, given ascreenco-ordinate, will give me
> >thecolourof thatpixelin RGB. i have found a lot about getting th
> > So why not allow something like this?:
>
> > class MyClass:
>
> > def func( , xxx, yyy):
>
> > .xxx = xxx
>
> > local = .yyy
>
> > The "self" argument is replaced with nothing, but a comma is used as a
> > placeholder.
>
> (+1) but why retain the leading comma in
> the argu
Nikolaus Rath wrote:
I think you misunderstood him.
I did, but addressed the below in another post.
> What he wants is to write
> class foo:
def bar(arg):
self.whatever = arg + 1
instead of
class foo:
def bar(self, arg)
self.whatever = arg + 1
so 'self' should *
Torsten Bronger wrote:
Hallöchen!
D'Arcy J.M. Cain writes:
On Sat, 26 Jul 2008 09:45:21 +0200
Torsten Bronger <[EMAIL PROTECTED]> wrote:
Of course, "self" would have to become a reserved word. You
could say that this may break some code, but I don't see much
freedom
Isn't this a showstop
Hallöchen!
Terry Reedy writes:
> Torsten Bronger wrote:
>
>> Terry Reedy writes:
>>
>>> [...]
>>>
>>> Or the proposal would have to be that 'self' is mandatory for
>>> all programmers in all languages. I think *that* would be
>>> pernicious. People are now free to write the more compact 's.sum
>
I am posting ex novo as it became confusing to me. I take the
opportunity to ask advice for a second problem.
FIRST PROBLEM
For file xxx.pdb, insert letter "A" into each line that starts with
"ATOM". "A" should be inserted at position 22, i.e., one space after
"LEU", leaving all other characters a
Paul Boddie wrote:
On 26 Jul, 06:06, Terry Reedy <[EMAIL PROTECTED]> wrote:
Paul Boddie wrote:
"The problem is that the explicit requirement to have self at the
start of every method is something that should be shipped off to the
implicit category."
Here, I presume that the author meant "at
Hallöchen!
Terry Reedy writes:
> Torsten Bronger wrote:
>
>> D'Arcy J.M. Cain writes:
>>
>>> On Sat, 26 Jul 2008 09:45:21 +0200
>>> Torsten Bronger <[EMAIL PROTECTED]> wrote:
>>>
Of course, "self" would have to become a reserved word. You
could say that this may break some code, but I
On Jul 26, 2:33 pm, [EMAIL PROTECTED] wrote:
> Windows XP SP3
> Python 2.5
> wx.version() = '2.8.1.1 (msw-unicode)'
> --
> I have written the following *simplest* implementation of wx.timer I
> can think of. No workie. I want an exception, a print statement, or
> something.
>
> The wxpython
Eric Wertman wrote:
I do this, mabye a no-no?
It is a roundabout way to do multiple assignment:
import os
for root,dirs,files in os.walk(dir) : break
root,dirs,files = os.walk(dir).next #2.x
root,dirs,files = next(os.walk(dir))#3.x
--
http://mail.python.org/mailman/listinfo/python-lis
On Jul 26, 3:13 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> On Jul 26, 2:33 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > Windows XP SP3
> > Python 2.5
> > wx.version() = '2.8.1.1 (msw-unicode)'
> > --
> > I have written the following *simplest* implementation of wx.timer I
> > can think of. No wo
On Jul 26, 5:07 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Whether or not one should write 'if x' or 'if x != 0' [typo corrected]
> depends on whether one means the general 'if x is any non-null object
> for which bool(x) == True' or the specific 'if x is anything other than
> numeric zero'. The
Thanks, Rob! Some of that is beyond my maturity level, but I'll try to
figure it out. If anyone has specific info on about how YouTube does
it, I would appreciate the info.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 2008-07-26 at 17:47 +0200, Francesco Pietra wrote:
> Sorry to come again for the same problem. On commanding:
>
> $ python script.py 2>&1 | tee fileout.pdb
>
> nothing occurred (fileout.pdb was zero byte). The script reads:
>
> f = open("xxx.pdb", "w")
> f.write('line = line[:22] + "A" +
On Jul 26, 4:40�pm, "Francesco Pietra" <[EMAIL PROTECTED]> wrote:
> I am posting ex novo as it became confusing to me. I take the
> opportunity to ask advice for a second problem.
>
> FIRST PROBLEM
> For file xxx.pdb, insert letter "A" into each line that starts with
> "ATOM". "A" should be inserte
In message <[EMAIL PROTECTED]>, AMD wrote:
>> In message <[EMAIL PROTECTED]>, AMD wrote:
>>
>>> Actually it is quite common, it is used for processing of files not for
>>> reading parameters. You can use it whenever you need to read a simple
>>> csv file or fixed format file which contains many l
In message
<[EMAIL PROTECTED]>, Matimus
wrote:
> On Jul 24, 9:32 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
> central.gen.new_zealand> wrote:
>
>> In message
>> <[EMAIL PROTECTED]>,
>> Matimus wrote:
>>
>> > On Jul 24, 2:54 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
>> > central.gen.new_zealand> w
1 - 100 of 134 matches
Mail list logo