En Fri, 30 Oct 2009 14:50:34 -0300, Sean DiZazzo half.ital...@gmail.com
escribió:
On Oct 29, 10:17 pm, Chris Rebert c...@rebertia.com wrote:
On Thu, Oct 29, 2009 at 9:53 PM, Peng Yu pengyu...@gmail.com wrote:
I don't see a way to avoid walking over directories of certain names
with
En Fri, 30 Oct 2009 20:40:59 -0300, Stef Mientki stef.mien...@gmail.com
escribió:
Robert Kern wrote:
On 2009-10-30 12:19 PM, kj wrote:
How can a module determine the path of the file that defines it?
(Note that this is, in the general case, different from sys.argv[0].)
__file__
but for
I need to integrate shell program with python. I'm wondering if there
is a way get the output of the shell program called by os.system().
Thank you!
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Oct 30, 2009 at 11:09 PM, Peng Yu pengyu...@gmail.com wrote:
I need to integrate shell program with python. I'm wondering if there
is a way get the output of the shell program called by os.system().
You'd probably do better to use the `subprocess` module instead:
Suppose that I have the following directory and files. I want to get
the canonical path of a file, a directory or a symbolic link.
For example, for 'b' below, I want to get its canonical path as
'/private/tmp/abspath/b'.
However, os.path.abspath('b') gives me '/private/tmp/abspath/b', but
What would be your answer if this question is asked to you in an
interview?
a modified version might be:
Where would you use python over C/C++/Java?
(because my resume says I know C/C++/Java)?
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 31, 8:11 am, sk catchyouraak...@gmail.com wrote:
What would be your answer if this question is asked to you in an
interview?
a modified version might be:
Where would you use python over C/C++/Java?
(because my resume says I know C/C++/Java)?
I also know C/C++/Java so...
I'd say
Hi all!
After my earlier feedback request a lot of you responded with constructive
criticism and suggestions.
As a result of that I've changed the text to be based on *Python 3.x* instead of
2.6+, and chapter 1 Getting started has grown from 9 pages to a whopping 11 pages!
I would
On Friday, 30 October 2009 17:28:47 MRAB wrote:
Wouldn't it be clearer if they were called dromedaryCase and
BactrianCase? :-)
Ogden Nash:
The Camel has a single hump-
The Dromedary, two;
Or the other way around-
I'm never sure. - Are You?
- Hendrik
--
In message mailman.2357.1256964121.2807.python-l...@python.org, Dennis Lee
Bieber wrote:
This way regular string interpolation operations (or whatever Python
3.x has replaced it with) are safe to construct the SQL, leaving only
user supplied (or program generated) data values to be passed via
In message 6e603d9c-2be0-449c-9c3c-
bab49e09e...@13g2000prl.googlegroups.com, Carl Banks wrote:
It's not Python that's the issue. The issue is that if you have a
module with a .dll extension, other programs could accidentally try to
load that module instead of the intended dll, if the module
On Sat, 2009-10-31 at 21:32 +1300, Lawrence D'Oliveiro wrote:
Modules will sometimes find
themselves on the path in Windows, so the fact that Windows performs
a
library search on the path is quite significant.
Why is it only Windows is prone to this problem?
I think as someone pointed
notmm uses Python 2.6 and will probably work just fine with Python
3000.
The only reference to notmm that I could find in Google was this thread!
I am free, no matter what rules surround me. If I find them
tolerable, I tolerate them; if I find them too obnoxious, I break
them. I am free
On Oct 30, 11:09 pm, Peng Yu pengyu...@gmail.com wrote:
I need to integrate shell program with python. I'm wondering if there
is a way get the output of the shell program called by os.system().
Thank you!
popen should do what your after. There are several modules that have
a popen method
On Sat, 2009-10-31 at 10:08 +1100, Ben Finney wrote:
The ‘datetime’ module focusses on individual date+time values (and the
periods between them, with the ‘timedelta’ type).
For querying the properties of the calendar, use the ‘calendar’
module.
Yes, it would be nice if the ‘time’,
sk wrote:
What would be your answer if this question is asked to you in an
interview?
a modified version might be:
Where would you use python over C/C++/Java?
(because my resume says I know C/C++/Java)?
I would say where I can, where 'can' is depending on the problem,
already
Albert Hopkins mar...@letterboxes.org writes:
On Sat, 2009-10-31 at 10:08 +1100, Ben Finney wrote:
Yes, it would be nice if the ‘time’, ‘datetime’, and ‘calendar’
modules were all much more unified and consumed a common set of
primitive date+time types. It's a wart, and fixing it would
On Sat, 2009-10-31 at 20:34 +1100, Ben Finney wrote:
Fixing ‘time’, ‘datetime’, and ‘calendar’ was the reason for Python 3?
No, it wasn't.
Or perhaps you mean that any backward-incompatible change was a reason
to have Python 3? Even more firmly no. The extent of changes was
severely limited
Hi,
Running ./configure in the 2.6.4 sources produces the following error:
config.status: error: cannot find input file: Makefile.pre.in
Indeed, such a file is not contained anywhere in the Pakage. Also, I
found this note:
The Unix build and install process is explained clearly in the README
* sk:
[title Why do you use python?]
What would be your answer if this question is asked to you in an
interview?
a modified version might be:
Where would you use python over C/C++/Java?
(because my resume says I know C/C++/Java)?
The C++ FAQ addresses this question here:
url:
Rober Kern wrote
But if you insist, you may be interested in Breve:
http://pypi.python.org/pypi/Breve/
Thanks for that! Viva internal DSLs!
[Sorry -- cut my teeth on lisp]
Is there anything like this for xml?
Well I guess that is a slightly wrong (if not straight stupid) question.
Maybe
Il Wed, 28 Oct 2009 20:04:45 -0700, ryles ha scritto:
On Oct 28, 7:02 pm, mattia ger...@gmail.com wrote:
Now, I would like to know the activity done (e.g. every two seconds) so
I create another thread that checks the queue size (using .qsize()).
Have you any suggestion to improve the code?
On Sat, 2009-10-31 at 03:07 -0700, knipknap wrote:
Hi,
Running ./configure in the 2.6.4 sources produces the following error:
config.status: error: cannot find input file: Makefile.pre.in
Indeed, such a file is not contained anywhere in the Pakage.
Which sources are you referring to?
On 31 Okt., 11:40, Albert Hopkins mar...@letterboxes.org wrote:
Which sources are you referring to? Can you verify the checksums:
17dcac33e4f3adb69a57c2607b6de246 13322131 Python-2.6.4.tgz
fee5408634a54e721a93531aba37f8c1 11249486 Python-2.6.4.tar.bz2
There is a README at the root of
sk a écrit :
What would be your answer if this question is asked to you in an
interview?
a modified version might be:
Where would you use python over C/C++/Java?
As far as I'm concerned, I'd put it the other way round : where would I
use C/C++/Java over Python ?-)
--
In message mailman.2365.1256979069.2807.python-l...@python.org, Albert
Hopkins wrote:
On Sat, 2009-10-31 at 21:32 +1300, Lawrence D'Oliveiro wrote:
In message 6e603d9c-2be0-449c-9c3c-bab49e09e...@13g2000prl.googlegroups.com,
Carl Banks wrote:
Modules will sometimes find themselves on the
On 10/29/09 9:48 PM, kj wrote:
How can one check that a Python script is lexically correct?
You can use a pseudo-static analyzer like pyflakes, pylint or pydoctor.
Or, better, you can avoid wild imports, excessive local or global
namespace manipulation, and break you program in smaller parts
On Oct 31, 1:32 am, Lawrence D'Oliveiro l...@geek-
central.gen.new_zealand wrote:
In message 6e603d9c-2be0-449c-9c3c-
bab49e09e...@13g2000prl.googlegroups.com, Carl Banks wrote:
It's not Python that's the issue. The issue is that if you have a
module with a .dll extension, other programs
Hello,
I've been studying the official tutorial, so far it's been fun, but
today I ran into a problem with the write(). So, I open the file pw
and write hello and read:
f = open(pw, r+)
f.write(hello)
f.read()
But read() returns a bunch of what looks like meta code:
ont': 1,
On Oct 31, 1:32 am, Lawrence D'Oliveiro l...@geek-
central.gen.new_zealand wrote:
In message 6e603d9c-2be0-449c-9c3c-
bab49e09e...@13g2000prl.googlegroups.com, Carl Banks wrote:
It's not Python that's the issue. The issue is that if you have a
module with a .dll extension, other programs
* Zeynel:
Hello,
I've been studying the official tutorial, so far it's been fun, but
today I ran into a problem with the write(). So, I open the file pw
and write hello and read:
f = open(pw, r+)
f.write(hello)
f.read()
But read() returns a bunch of what looks like meta code:
ont': 1,
On Sat, 2009-10-31 at 23:58 +1300, Lawrence D'Oliveiro wrote:
I just checked my Debian installation:
l...@theon:~ find /lib /usr/lib -name \*.so -a -not -name lib\*
-print | wc -l
2950
l...@theon:~ find /lib /usr/lib -name \*.so -print | wc -l
4708
So 63% of the
On Oct 31, 9:23 am, Alf P. Steinbach al...@start.no wrote:
* Zeynel:
Hello,
I've been studying the official tutorial, so far it's been fun, but
today I ran into a problem with the write(). So, I open the file pw
and write hello and read:
f = open(pw, r+)
f.write(hello)
On Oct 31, 11:31 am, Alf P. Steinbach al...@start.no wrote:
* sk:
[title Why do you use python?]
What would be your answer if this question is asked to you in an
interview?
a modified version might be:
Where would you use python over C/C++/Java?
(because my resume says I know
* Zeynel:
On Oct 31, 9:23 am, Alf P. Steinbach al...@start.no wrote:
* Zeynel:
Hello,
I've been studying the official tutorial, so far it's been fun, but
today I ran into a problem with the write(). So, I open the file pw
and write hello and read:
f = open(pw, r+)
f.write(hello)
f.read()
On Oct 31, 9:55 am, Alf P. Steinbach al...@start.no wrote:
* Zeynel:
On Oct 31, 9:23 am, Alf P. Steinbach al...@start.no wrote:
* Zeynel:
Hello,
I've been studying the official tutorial, so far it's been fun, but
today I ran into a problem with the write(). So, I open the file pw
Thanks, Rami, that will work.
V
On Sat, Oct 31, 2009 at 4:54 AM, Albert Hopkins mar...@letterboxes.orgwrote:
On Sat, 2009-10-31 at 20:34 +1100, Ben Finney wrote:
Fixing ‘time’, ‘datetime’, and ‘calendar’ was the reason for Python 3?
No, it wasn't.
Or perhaps you mean that any
* Zeynel:
On Oct 31, 9:55 am, Alf P. Steinbach al...@start.no wrote:
* Zeynel:
On Oct 31, 9:23 am, Alf P. Steinbach al...@start.no wrote:
* Zeynel:
Hello,
I've been studying the official tutorial, so far it's been fun, but
today I ran into a problem with the write(). So, I open the file
Zeynel wrote:
On Oct 31, 9:55 am, Alf P. Steinbach al...@start.no wrote:
* Zeynel:
On Oct 31, 9:23 am, Alf P. Steinbach al...@start.no wrote:
* Zeynel:
Hello,
I've been studying the official tutorial, so far it's been fun, but
today I ran into a problem with the
Hi all,
I have been using the map() function in the multiprocessing module to
parallelize my tasks on a dual core CPU. My tasks are embarrassingly
parallel, shared nothing tasks. In one of my runs, I found that the
this function interleaves execution of two processes over a single
list.
So far
I'm running into an ugly bug, which, IMHO, is really a bug in the
design of Python's module import scheme. Consider the following
directory structure:
ham
|-- __init__.py
|-- re.py
`-- spam.py
...with the following very simple files:
% head ham/*.py
== ham/__init__.py ==
== ham/re.py ==
On Oct 31, 10:40 am, Alf P. Steinbach al...@start.no wrote:
Thanks! This works. But I need to close the file before read and open
it again with r, otherwise I get the garbage again. Can you give me
the link where you got this in documentation:
The mode 'w+' opens and truncates the file to 0
Hi all,
My code is as follows:
path = r'C:/Program Files/testfolder/2.3/test.txt'
if os.path.lexists(path):
print 'Path Exists'
else:
print 'No file found in path - %s' %path
print Popen(path, stdout=PIPE, shell=True).stdout.read()
The output comes as
No file found in path -
On Oct 31, 3:12 pm, kj no.em...@please.post wrote:
I'm running into an ugly bug, which, IMHO, is really a bug in the
design of Python's module import scheme. Consider the following
directory structure:
ham
|-- __init__.py
|-- re.py
`-- spam.py
...with the following very simple files:
On Sat, Oct 31, 2009 at 11:26 AM, koranthala koranth...@gmail.com wrote:
Hi all,
My code is as follows:
path = r'C:/Program Files/testfolder/2.3/test.txt'
if os.path.lexists(path):
print 'Path Exists'
else:
print 'No file found in path - %s' %path
print Popen(path, stdout=PIPE,
kj, 31.10.2009 16:12:
My sin appears to be having the (empty) file ham/re.py. So Python
is confusing it with the re module of the standard library, and
using it when the inspect module tries to import re.
1) it's a bad idea to name your own modules after modules in the stdlib
2) this has been
Does anyone know how to save two-tone images represented as
numpy arrays? I handle grayscale images by converting to
PIL Image objects (mode=L) and then use the PIL save method,
but I cannot make this work with mode=1.
I have tried both boolean arrays and uint8 arrays (mod 2).
In both cases I
I have the following files, which are in the directory 'test'. The
parent directory of 'test' is in $PYTHONPATH. I have 'from A import A'
and 'from B import B' in '__init__.py', because I want to use 'test.A'
and 'test.B' to refer to classes A and B rather than 'test.A.A' and
'test.B.B'.
$ll -g
Lawrence D'Oliveiro wrote:
In message mailman.2357.1256964121.2807.python-l...@python.org, Dennis Lee
Bieber wrote:
This way regular string interpolation operations (or whatever Python
3.x has replaced it with) are safe to construct the SQL, leaving only
user supplied (or program
On 2009-10-31, Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
Idiomatic Python is to use CamelCase for classes.
Can you point me to a discussion on Idiomatic Python, CamelCase and
other matters?
... See PEP 8:
http://www.python.org/dev/peps/pep-0008/
Got it. Thanks.
On 10/31/2009 12:03 AM Peng Yu said...
Suppose that I have the following directory and files. I want to get
the canonical path of a file, a directory or a symbolic link.
For example, for 'b' below, I want to get its canonical path as
'/private/tmp/abspath/b'.
So, why isn't realpath working for
In 4aec591e$0$7629$9b4e6...@newsspool1.arcor-online.net Stefan Behnel
stefan...@behnel.de writes:
kj, 31.10.2009 16:12:
My sin appears to be having the (empty) file ham/re.py. So Python
is confusing it with the re module of the standard library, and
using it when the inspect module tries to
On Oct 31, 6:49 am, Albert Hopkins mar...@letterboxes.org wrote:
OTOH this doesn't happen in Linux because a) programs wanting the
system's crypt library are looking for libcrypt.so and b) Linux doesn't
look in your current directory (by default) for libraries.
One other thing is that linux
On Sat, Oct 31, 2009 at 11:26 AM, Emile van Sebille em...@fenx.com wrote:
On 10/31/2009 12:03 AM Peng Yu said...
Suppose that I have the following directory and files. I want to get
the canonical path of a file, a directory or a symbolic link.
For example, for 'b' below, I want to get its
On Sat, 2009-10-31 at 16:27 +, kj wrote:
2) this has been fixed in Py3
In my post I illustrated that the failure occurs both with Python
2.6 *and* Python 3.0. Did you have a particular version of Python
3 in mind?
I was not able to reproduce with my python3:
$ head ham/*.py
Hendrik van Rooyen wrote:
On Friday, 30 October 2009 17:28:47 MRAB wrote:
Wouldn't it be clearer if they were called dromedaryCase and
BactrianCase? :-)
Ogden Nash:
The Camel has a single hump-
The Dromedary, two;
Or the other way around-
I'm never sure. - Are You?
If you make the first
Peng Yu pengyu...@gmail.com wrote:
I'm wondering if there is a way to make the following two things hold.
Thank you1
1. When I 'import test', I can refer to class A as 'test.A'.
2. When I 'import test.A', I can refer to class A as 'test.A.A' and
class B shall not be imported.
No. Either
On 10/31/2009 10:11 AM Peng Yu said...
My definition of 'realpath' is different from the definition of
'os.path.realpath'. But I'm not short what term I should use to
describe. I use the following example to show what I want.
In my example in the original post,
'/tmp/abspath/b' is a
alex23 wrote:
Terry Reedy tjre...@udel.edu wrote:
alex23 wrote:
You're completely wrong. Immutability has nothing to do with identity,
...
I'm honestly not getting your point here.
Let me try again, a bit differently.
I claim that the second statement, and therefor the first, can be seen
Peng Yu wrote:
On Sat, Oct 31, 2009 at 11:26 AM, Emile van Sebille em...@fenx.com wrote:
On 10/31/2009 12:03 AM Peng Yu said...
Suppose that I have the following directory and files. I want to get
the canonical path of a file, a directory or a symbolic link.
For example, for 'b' below, I want
Zeynel wrote:
On Oct 31, 10:40 am, Alf P. Steinbach al...@start.no wrote:
Thanks! This works. But I need to close the file before read and open
it again with r, otherwise I get the garbage again. Can you give me
the link where you got this in documentation:
The mode 'w+' opens and truncates the
Adam N wrote:
All,
In case people hadn't heard, DARPA just announced what I think is the
coolest competition ever:
http://networkchallenge.darpa.mil/
On December 5, DARPA will raise 10 red weather balloons somewhere in
the US. The first person to get the location of all 10 balloons and
On Sat, Oct 31, 2009 at 1:10 PM, Emile van Sebille em...@fenx.com wrote:
On 10/31/2009 10:11 AM Peng Yu said...
My definition of 'realpath' is different from the definition of
'os.path.realpath'. But I'm not short what term I should use to
describe. I use the following example to show what I
On Oct 29, 2:06 am, Chris Rebert c...@rebertia.com wrote:
On Wed, Oct 28, 2009 at 11:31 PM, codingJoe tracy.monte...@gmail.com wrote:
Hi all!
I am trying to choose the right data structure to do a value lookup
with multiple keys.
I want to lookup data by: key, key,{ values }
My
On Oct 31, 3:11 pm, Terry Reedy tjre...@udel.edu wrote:
Great, thanks.
Zeynel wrote:
On Oct 31, 10:40 am, Alf P. Steinbach al...@start.no wrote:
Thanks! This works. But I need to close the file before read and open
it again with r, otherwise I get the garbage again. Can you give me
the
On Sat, Oct 31, 2009 at 1:46 PM, Terry Reedy tjre...@udel.edu wrote:
Peng Yu wrote:
On Sat, Oct 31, 2009 at 11:26 AM, Emile van Sebille em...@fenx.com
wrote:
On 10/31/2009 12:03 AM Peng Yu said...
Suppose that I have the following directory and files. I want to get
the canonical path of a
In article
bdb4ce25-22ea-4e83-8e73-ae53cd125...@a31g2000yqn.googlegroups.com,
knipknap knipk...@gmail.com wrote:
Huh, looks like the .bz2 package is broken (even though the md5 is
fine). The .gz works fine.
Hmm, the .bz2 from the official download page
On Sat, Oct 31, 2009 at 12:47 PM, Duncan Booth
duncan.bo...@invalid.invalid wrote:
Peng Yu pengyu...@gmail.com wrote:
I'm wondering if there is a way to make the following two things hold.
Thank you1
1. When I 'import test', I can refer to class A as 'test.A'.
2. When I 'import test.A', I
On 2009-10-31 15:31 PM, Peng Yu wrote:
The original problem comes from the maintenance of the package. When A
and B are large classes, it is better to put them in separate files
under the directory 'test' than put them in the file 'test.py'. The
interface 'test.A' is used by end users. However,
On Sat, Oct 31, 2009 at 4:14 PM, Robert Kern robert.k...@gmail.com wrote:
On 2009-10-31 15:31 PM, Peng Yu wrote:
The original problem comes from the maintenance of the package. When A
and B are large classes, it is better to put them in separate files
under the directory 'test' than put them
Albert Hopkins mar...@letterboxes.org writes:
No, I meant cleaning up the standard library in spite of
incompatibilities was one of the goals of Python3 (PEP 3108).
Ah, okay. That PEP is “Standard Library Reorganization”
URL:http://www.python.org/dev/peps/pep-3108/, and is specifically
about
For me a language is a language for the most part, doesn't matter...
Python is a language I choose for any of several reasons:
0.) It is easy to setup dependent packages on both BSD, Linux, and
Windows
1.) Most important things already have a Python binding somewhere
2.) Working in
On Sat, Oct 31, 2009 at 14:48 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 1:46 PM, Terry Reedy tjre...@udel.edu wrote:
Peng Yu wrote:
[ snip ]
I find the following two files that define realpath. But I don't find
'realpath' in os.py. I looked at 'os.py'. But I don't understand how
the
On Sat, Oct 31, 2009 at 16:53 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 4:14 PM, Robert Kern robert.k...@gmail.com wrote:
[ snip ]
I know that multiple classes or functions are typically defined in one
file (i.e. module in python). However, I feel this make the code not
easy to read.
On 2009-10-31 16:53 PM, Peng Yu wrote:
On Sat, Oct 31, 2009 at 4:14 PM, Robert Kernrobert.k...@gmail.com wrote:
On 2009-10-31 15:31 PM, Peng Yu wrote:
The original problem comes from the maintenance of the package. When A
and B are large classes, it is better to put them in separate files
On Sat, Oct 31, 2009 at 5:45 PM, Wolodja Wentland
wentl...@cl.uni-heidelberg.de wrote:
On Sat, Oct 31, 2009 at 16:53 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 4:14 PM, Robert Kern robert.k...@gmail.com wrote:
[ snip ]
I know that multiple classes or functions are typically defined in one
If I have both the directory 'module' and the file 'module.py' in a
directory in $PYTHONPATH, python will import 'module' rather than
'module.py'. I'm wondering what is the design rationale of setting
higher priorities to directories. Is there a way to reverse the
priority?
--
In message mailman.2376.1257005738.2807.python-l...@python.org, Carsten
Haese wrote:
Lawrence D'Oliveiro wrote:
In message mailman.2357.1256964121.2807.python-l...@python.org, Dennis
Lee Bieber wrote:
This way regular string interpolation operations (or whatever Python
3.x has replaced
On 2009-10-31 18:51 PM, Peng Yu wrote:
If I have both the directory 'module' and the file 'module.py' in a
directory in $PYTHONPATH, python will import 'module' rather than
'module.py'. I'm wondering what is the design rationale of setting
higher priorities to directories. Is there a way to
Lawrence D'Oliveiro wrote:
In message mailman.2376.1257005738.2807.python-l...@python.org, Carsten
Haese wrote:
Lawrence D'Oliveiro wrote:
In message mailman.2357.1256964121.2807.python-l...@python.org, Dennis
Lee Bieber wrote:
This way regular string interpolation operations (or
On Sat, Oct 31, 2009 at 7:02 PM, Robert Kern robert.k...@gmail.com wrote:
On 2009-10-31 18:51 PM, Peng Yu wrote:
If I have both the directory 'module' and the file 'module.py' in a
directory in $PYTHONPATH, python will import 'module' rather than
'module.py'. I'm wondering what is the design
On Sat, Oct 31, 2009 at 18:29 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 5:45 PM, Wolodja Wentland
wentl...@cl.uni-heidelberg.de wrote:
On Sat, Oct 31, 2009 at 16:53 -0500, Peng Yu wrote:
Are you serious? Do you *really* put each function in its own file? How
exactly does this enhance
On 2009-10-31 19:16 PM, Peng Yu wrote:
On Sat, Oct 31, 2009 at 7:02 PM, Robert Kernrobert.k...@gmail.com wrote:
On 2009-10-31 18:51 PM, Peng Yu wrote:
If I have both the directory 'module' and the file 'module.py' in a
directory in $PYTHONPATH, python will import 'module' rather than
I'm trying to build a Python MSI installer for Windows using the scripts
provided at Tools\msi\
msi.py runs fine and generates a python-xxx.msi file.
Then, when I run the merge.py script, I get these error messages:
e:\prog\python\py3k\Tools\msi\msilib.py:8: DeprecationWarning: the sets
On 2009-10-31 19:21 PM, Wolodja Wentland wrote:
On Sat, Oct 31, 2009 at 18:29 -0500, Peng Yu wrote:
And I always put a single class in a file.
Why? What do you gain by that?
While it's never a good idea to follow the rule slavishly, it's often a good
idea. Many classes are themselves a
On Sat, 31 Oct 2009 23:58:33 +1300, Lawrence D'Oliveiro wrote:
In message mailman.2365.1256979069.2807.python-l...@python.org, Albert
Hopkins wrote:
On Sat, 2009-10-31 at 21:32 +1300, Lawrence D'Oliveiro wrote:
In message
6e603d9c-2be0-449c-9c3c-bab49e09e...@13g2000prl.googlegroups.com,
On Sat, Oct 31, 2009 at 7:21 PM, Wolodja Wentland
wentl...@cl.uni-heidelberg.de wrote:
On Sat, Oct 31, 2009 at 18:29 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 5:45 PM, Wolodja Wentland
wentl...@cl.uni-heidelberg.de wrote:
On Sat, Oct 31, 2009 at 16:53 -0500, Peng Yu wrote:
Are you
On Sat, 31 Oct 2009 16:27:20 +, kj wrote:
1) it's a bad idea to name your own modules after modules in the stdlib
Obviously, since it leads to the headaches this thread illustrates. But
there is nothing intrisically wrong with it. The fact that it is
problematic in Python is a design
Peng Yu wrote:
On Sat, Oct 31, 2009 at 5:45 PM, Wolodja Wentland
wentl...@cl.uni-heidelberg.de wrote:
On Sat, Oct 31, 2009 at 16:53 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 4:14 PM, Robert Kern robert.k...@gmail.com wrote:
[ snip ]
I know that multiple classes or
On Sat, 31 Oct 2009 18:29:35 -0500, Peng Yu wrote:
If two functions are too long to put in file, I generally put them in
two different files.
If two functions are too long for a single file, the functions are too
big and need to be broken up into ten or thirty sub-functions each!
Ideally, no
On Sat, 31 Oct 2009 20:03:29 -0500, Peng Yu wrote:
If it should ever happen that two functions are too long to put in a
single file you should refactor your code. It is usually a good idea of
breaking problems down into single steps (ie functions) so you never
end up with a 5000 SLOC
On Sat, 31 Oct 2009 16:53:50 -0500, Peng Yu wrote:
I know that multiple classes or functions are typically defined in one
file (i.e. module in python). However, I feel this make the code not
easy to read. Therefore, I insist on one class or function per file (i.e
module in python).
When
I tried to compile Python and Tcl/Tk on Linux using the following
files:
Python-3.1.1.tar.gz
tcl8.5.7-src.tar.gz
Cannot get tkinter to work after compiling installing Tcl/Tk. I get
the following error after compiling Python:
Python build finished, but the necessary bits to build these modules
On Sat, Oct 31, 2009 at 10:03 PM, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
On Sat, 31 Oct 2009 16:53:50 -0500, Peng Yu wrote:
I know that multiple classes or functions are typically defined in one
file (i.e. module in python). However, I feel this make the code not
easy to
On Sat, Oct 31, 2009 at 9:42 PM, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
On Sat, 31 Oct 2009 20:03:29 -0500, Peng Yu wrote:
If it should ever happen that two functions are too long to put in a
single file you should refactor your code. It is usually a good idea of
breaking
Peng Yu wrote:
I have defined 'long' in one of my previous message. I consider a file
long, when it does not fit in one or two screen. Basically, I want to
get a whole picture of the file after glancing of the file.
I think you are going to have to get used to the fact that you have very
On Sat, Oct 31, 2009 at 9:34 PM, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
On Sat, 31 Oct 2009 18:29:35 -0500, Peng Yu wrote:
If two functions are too long to put in file, I generally put them in
two different files.
If two functions are too long for a single file, the
On Sat, Oct 31, 2009 at 9:18 PM, Dave Angel da...@ieee.org wrote:
Peng Yu wrote:
On Sat, Oct 31, 2009 at 5:45 PM, Wolodja Wentland
wentl...@cl.uni-heidelberg.de wrote:
On Sat, Oct 31, 2009 at 16:53 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 4:14 PM, Robert Kern robert.k...@gmail.com
On Sat, Oct 31, 2009 at 10:35 PM, Robert Kern robert.k...@gmail.com wrote:
Peng Yu wrote:
I have defined 'long' in one of my previous message. I consider a file
long, when it does not fit in one or two screen. Basically, I want to
get a whole picture of the file after glancing of the file.
Peng Yu wrote:
On Sat, Oct 31, 2009 at 10:35 PM, Robert Kern robert.k...@gmail.com wrote:
Peng Yu wrote:
I have defined 'long' in one of my previous message. I consider a file
long, when it does not fit in one or two screen. Basically, I want to
get a whole picture of the file after glancing
1 - 100 of 149 matches
Mail list logo