Re: Python Pop Quiz

2007-06-02 Thread Marc 'BlackJack' Rintsch
++ is better than C, agree or disagree? (four word maximum) STL compile error diagnostics. So do you agree or disagree!? ;-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: strange PyLint configuration

2007-06-01 Thread Marc 'BlackJack' Rintsch
Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

RE: c[:]()

2007-06-01 Thread Marc 'BlackJack' Rintsch
), sequence) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

RE: c[:]()

2007-06-01 Thread Marc 'BlackJack' Rintsch
syntactic sugar for: ``obj.__getitem__(slice(None)).__call__()`` and you want a change in the implementation of `list.__getitem__()` and `tuple.__getitem__()`. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

RE: c[:]()

2007-05-31 Thread Marc 'BlackJack' Rintsch
for every function in functions: call that function very closely while a list comprehension or your perlish line noise is much more magic to explain and harder to remember. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Python memory handling

2007-05-31 Thread Marc 'BlackJack' Rintsch
this memory ?! AFAIK not. But why is this important as long as the memory consumption doesn't grow constantly? The virtual memory management of the operating system usually takes care that only actually used memory is in physical RAM. Ciao, Marc 'BlackJack' Rintsch -- http

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread Marc 'BlackJack' Rintsch
' and 'ar': 1. B = Shift + B = 2 key strokes. 2. _b = Shift + - and b = 3 key strokes. At least on my keyboard + layout. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: file reading by record separator (not line by line)

2007-05-31 Thread Marc 'BlackJack' Rintsch
line_11 line_12 line_13 ... name2 ... line_21 line_22 splitlines() for record in iter_records(source): print 'Start of record...' for line in record: print ':', line Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: WEATHER PROGRAMMING IN PYTHON

2007-05-31 Thread Marc 'BlackJack' Rintsch
weather reports or forecasts and use the BeautifulSoup module to scrape the information you need. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in optparse documentation

2007-05-28 Thread Marc 'BlackJack' Rintsch
are reading documentation for Python 2.5 and expect everything in it to work in older versions too? Pick the right documentation from http://www.python.org/doc/versions/ Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Can python create a dictionary from a list comprehension?

2007-05-28 Thread Marc 'BlackJack' Rintsch
an unnecessary list of `None`\s is build and thrown away for no reason other than to have a one liner. This is not Perl! ;-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: totally lost newbie

2007-05-27 Thread Marc 'BlackJack' Rintsch
: def key_func(item): return (len(item), item) data = ['viking', 'spam', 'parrot', 'ham', 'eric'] data.sort(key=key_func) print data Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: totally lost newbie

2007-05-27 Thread Marc 'BlackJack' Rintsch
to struggle with your solution if he's still running 2.3. It's available in 2.4 but I don't know when it was introduced. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Amount of Data

2007-05-26 Thread Marc 'BlackJack' Rintsch
or an object DB like zodb or Durus are databases too. Maybe you should try it and measure before claiming it's going to be too slow and spend time to implement something like a database yourself. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: Struggling again 'map'

2007-05-26 Thread Marc 'BlackJack' Rintsch
and the resulting behavior is IMHO a very ugly thing and has not much to to with the semantics expected from a `map()` function. The `None` is not the default fill value but a placeholder for the identity function. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo

Re: just a bug (was: xml.dom.minidom: how to preserve CRLF's inside CDATA?)

2007-05-25 Thread Marc 'BlackJack' Rintsch
the grammar of CDATA in your link above). Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a file and resuming reading.

2007-05-25 Thread Marc 'BlackJack' Rintsch
! for line_nr, line in enumerate(f): # Do something with `line_nr` and `line`. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Amount of Data

2007-05-25 Thread Marc 'BlackJack' Rintsch
memory or will it fail? What about putting the data into a database? If the keys are strings the `shelve` module might be a solution. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: of destructors, open files and garbage collection

2007-05-24 Thread Marc 'BlackJack' Rintsch
it will be called. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: how to use imaageop.scale

2007-05-23 Thread Marc 'BlackJack' Rintsch
Imaging Library (PIL) here? What have you tried and in which way did it fail? What about the `resize()` method on image objects? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: too much memory use

2007-05-22 Thread Marc 'BlackJack' Rintsch
like SQLite or maybe an object database like zodb or Durus. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: re.compile for names

2007-05-21 Thread Marc 'BlackJack' Rintsch
'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Python compared to other language

2007-05-21 Thread Marc 'BlackJack' Rintsch
typed or untyped? Strongly typed. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: TIFF to PDF

2007-05-20 Thread Marc 'BlackJack' Rintsch
tiff and `tiff2pdf` to convert it into PDF. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: regex matching question

2007-05-19 Thread Marc 'BlackJack' Rintsch
be good enough:: r'(\d+,\d+/){5}\d+,\d+' Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: Joining Lists

2007-05-17 Thread Marc 'BlackJack' Rintsch
though. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Marc 'BlackJack' Rintsch
, but there are not just programming professionals out there. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute commands from file

2007-05-16 Thread Marc 'BlackJack' Rintsch
. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Stefan Behnel wrote: René Fleschenberg wrote: Marc 'BlackJack' Rintsch schrieb: There are potential users of Python who don't know much english or no english at all. This includes kids, old people, people from countries that have letters that are not that easy

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Marc 'BlackJack' Rintsch
]: b = 5.0 In [77]: a == b Out[77]: True In [78]: f(a) == f(b) Out[78]: False And `f()` doesn't even use something like `random()` or `time()` here. ;-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to choose between python and java

2007-05-15 Thread Marc 'BlackJack' Rintsch
will be supported for some time parallel to 3.x, so there is enough time to migrate. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Marc 'BlackJack' Rintsch
and concepts looks strange in both, pure english and mixed local language and english. But the latter is easier to map to the specifications and language of the end users. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Marc 'BlackJack' Rintsch
'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Storing and searching nodes of a tree

2007-05-15 Thread Marc 'BlackJack' Rintsch
): while path: result = tree.get(path) if result is not None: return result path = path[:-1] raise KeyError('path not on tree') Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Storing and searching nodes of a tree

2007-05-15 Thread Marc 'BlackJack' Rintsch
'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Marc 'BlackJack' Rintsch
case for code with non-ASCII identifiers. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing part of string

2007-05-14 Thread Marc 'BlackJack' Rintsch
(prefix) Out[5]: True In [6]: longname = longname[len(prefix):] In [7]: longname Out[7]: 'N_Bs' Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-14 Thread Marc 'BlackJack' Rintsch
. :-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-14 Thread Marc 'BlackJack' Rintsch
omegas in the mathematical symbols area too. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-14 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Michel Claveau wrote: And Il1 O0 ? Hm, we should ban digits from identifier names. :-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Marc 'BlackJack' Rintsch
. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Finally started on python..

2007-05-12 Thread Marc 'BlackJack' Rintsch
() # Puts some entries into `something`. for entry in something: print entry Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: how to refer to partial list, slice is too slow?

2007-05-11 Thread Marc 'BlackJack' Rintsch
parser1(data): chunk = data.next() # ... parser2(data) def parser2(data): chunk = data.next() # ... parser3(data) # ... def main(): # Read or create data. # ... parser1(iter_chunks(data, 100)) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org

Re: replacing string in xml file--revisited

2007-05-10 Thread Marc 'BlackJack' Rintsch
that doesn't!? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Minor bug in tempfile module (possibly __doc__ error)

2007-05-10 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], James T. Dennis wrote: Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: In [EMAIL PROTECTED], James T. Dennis wrote: You can change it by simply assigning to the name: In [15]: tempfile.template = 'spam' In [16]: tempfile.template Out[16]: 'spam' I know

Re: trouble with generators

2007-05-10 Thread Marc 'BlackJack' Rintsch
records(self): for a in Gen.records(self, A()): Here you create an instance of `A` and pass that *instance* and not the *class*. If you would pass the class here, you must create objects in `Gen.records()`. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman

Re: Minor bug in tempfile module (possibly __doc__ error)

2007-05-09 Thread Marc 'BlackJack' Rintsch
in that other namespace? Is it a closure? (Or like a closure?) Where is this particular aspect of the import/namespace semantics documented? You *can* change it, but it is not used by the code in that module. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: error in the if, elif, else statement ?

2007-05-09 Thread Marc 'BlackJack' Rintsch
written ``raise SomeError`` or ``assert False`` instead of all those useless ``else: pass``. If this branch is taken, obviously `lGwU` is not bound. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting some element from sets.Set

2007-05-09 Thread Marc 'BlackJack' Rintsch
. Give it a name and it gets more readable: def get_name(setobj): return iter(setobj).next() Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Designing a graph study program

2007-05-08 Thread Marc 'BlackJack' Rintsch
be injected by wrapper classes to some degree. For very fine grained observation of an algorithm you might try to implement a step by step debugger. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: ipython environment question

2007-05-08 Thread Marc 'BlackJack' Rintsch
with arguments. The default values are only evaluated once when the ``def`` statement is executed, not every time the function is called. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Atttribute error

2007-05-08 Thread Marc 'BlackJack' Rintsch
called `urllib.py` in the current directory? Then this gets imported instead of the module in the standard library. Add this directly after the ``import`` to see what's happening: print urllib.__file__ print dir(urllib) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman

Re: Towards faster Python implementations - theory

2007-05-08 Thread Marc 'BlackJack' Rintsch
another object instead. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: File Name Format

2007-05-08 Thread Marc 'BlackJack' Rintsch
than the operating system? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestions for how to approach this problem?

2007-05-08 Thread Marc 'BlackJack' Rintsch
some example input and wanted output. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Designing a graph study program

2007-05-08 Thread Marc 'BlackJack' Rintsch
with the same names and the same semantics they share the same interface. And a class that isn't meant to be instantiated or doesn't implement all methods is an abstract class. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: N00b question on Py modules

2007-05-07 Thread Marc 'BlackJack' Rintsch
': print _exitcode _exitcode = set_exitcode() print _exitcode Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Examples / Links needed

2007-05-07 Thread Marc 'BlackJack' Rintsch
Docs. Why? What does `Emulating numeric types`_ in the reference manual lack in your opinion? .. _Emulating numeric types: http://docs.python.org/ref/numeric-types.html Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: long lists

2007-05-07 Thread Marc 'BlackJack' Rintsch
, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: is for reliable?

2007-05-07 Thread Marc 'BlackJack' Rintsch
question. ``for`` loops are of course reliable. Can you give a short self contained example that shows the behavior? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie prob: How to write a file with 3 threads?

2007-05-06 Thread Marc 'BlackJack' Rintsch
everytime on my Vista. Show minimal (non-)working code, tell us the exception plus traceback and explain crash. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Looping over lists

2007-05-05 Thread Marc 'BlackJack' Rintsch
5 But only if the elements in the list are unique. And the runtime is suboptimal because `index()` is doing a linear search -- the outer loop becomes slower and slower with each iteration. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Python regular expressions just ain't PCRE

2007-05-05 Thread Marc 'BlackJack' Rintsch
and readable as simple regular expressions. So both `re` and higher level parsers are useful together and don't supersede each other. The same holds for C and Python. IMHO. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I get type methods?

2007-05-04 Thread Marc 'BlackJack' Rintsch
instances from a factory function. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: copy base class fields

2007-05-03 Thread Marc 'BlackJack' Rintsch
the __init__ of B. Several variants of the program produces similar results. Please, could someone explain which way is the correct way? Call the `__init__()` of `A`: class B(A): def __init__(self, a): A.__init__(self) self.v2 = 2 Ciao, Marc 'BlackJack' Rintsch -- http

Re: ascii to unicode line endings

2007-05-03 Thread Marc 'BlackJack' Rintsch
()` are always opened in binary mode. So if you want '\n' to be translated into a platform specific character sequence you have to do it yourself. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: How to replace the last (and only last) character in a string?

2007-05-03 Thread Marc 'BlackJack' Rintsch
' BTW most things in the `string` module are deprecate because they are available as methods on string objects. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: _csv.Error: string with NUL bytes

2007-05-03 Thread Marc 'BlackJack' Rintsch
Exit code: 1 , 0001h As Larry said, this most likely means there are null bytes in the CSV file. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling Exe from Python

2007-05-02 Thread Marc 'BlackJack' Rintsch
script. I tried os.fork it will start an independent process, since logic of my program depends on the results of executable. Take a look at `os.system()` or the `subprocess` module. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: I need help speeding up an app that reads football scores and generates rankings

2007-05-02 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], jocknerd wrote: The biggest difference in my two apps is the C app uses linked lists. I feel my Python app is doing too many lookups which is causing the bottleneck. Then replace those linear searches you wrote in Python with a dictionary. Ciao, Marc 'BlackJack

Re: Time functions

2007-05-02 Thread Marc 'BlackJack' Rintsch
need to make my own? Perhaps there is something similar to C's printf formatting. You mean like `time.strftime()`!? :-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: I/O Operations .....

2007-04-30 Thread Marc 'BlackJack' Rintsch
'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: regexp match string with word1 and not word2

2007-04-30 Thread Marc 'BlackJack' Rintsch
(regexp, line): skip = True break And if you don't intent to count the `skip`\s a `True` seems to be more readable. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: I can't inherit from compiled classes ?

2007-04-29 Thread Marc 'BlackJack' Rintsch
(socket.socket) Out[5]: type 'type' `select.select()` is a function: In [6]: import select In [7]: type(select.select) Out[7]: type 'builtin_function_or_method' Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner Ping program

2007-04-28 Thread Marc 'BlackJack' Rintsch
://www.python.org/dev/peps/pep-0008/ Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: My newbie annoyances so far

2007-04-28 Thread Marc 'BlackJack' Rintsch
the ``else`` part is optional, what would be the result of the expression if `c` is `False`? Hypothetical HP RPL syntax construct in Python:: x = 42 if False end print x # - ??? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Which are your favorite UML tools?

2007-04-28 Thread Marc 'BlackJack' Rintsch
of the module's class. Modules are objects too and can be seen as singletons. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner Ping program

2007-04-28 Thread Marc 'BlackJack' Rintsch
working on first. Still doesn't explain why it is a class. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-27 Thread Marc 'BlackJack' Rintsch
. Everything there is an object and the base object has a `clone()` method to make a copy. So you make copies of objects and modify them to tweak them into the way you want them. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory addressing

2007-04-27 Thread Marc 'BlackJack' Rintsch
if you could get an object from a raw memory address. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: If Dict Contains a particular key

2007-04-26 Thread Marc 'BlackJack' Rintsch
writes a `__contains__()` method than a `has_key()` method. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: File not read to end

2007-04-26 Thread Marc 'BlackJack' Rintsch
seen at least two times ``somefile.close`` which does just reference the `close()` method but does not *call* it. Parenthesis are the call operator in Python and they are not optional! Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Python keywords

2007-04-26 Thread Marc 'BlackJack' Rintsch
. .. _Sequence Types: http://docs.python.org/lib/typesseq.html .. _Comparisons: http://docs.python.org/ref/comparisons.html Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-26 Thread Marc 'BlackJack' Rintsch
class with a method. Quite convoluted. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Coding conventions for class names

2007-04-25 Thread Marc 'BlackJack' Rintsch
guidelines here and if yes which ones and are they resonable ( e.g. stable with regard to refactoring etc. )? I follow PEP 8 in my (mostly unpublished) code if that does matter to you. :-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen fails, but os.system works

2007-04-24 Thread Marc 'BlackJack' Rintsch
. ;-) Give `subprocess.Popen()` a list with the program name and the individual arguments as elements instead. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Javascript equivalence

2007-04-23 Thread Marc 'BlackJack' Rintsch
, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: str.itersplit()

2007-04-21 Thread Marc 'BlackJack' Rintsch
for lazy evaluation, if you don't want to take up recourses, and it could be used just like java's StringTokenizer. Comments? Does it really make such a difference? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Python un-plugging the Interpreter

2007-04-20 Thread Marc 'BlackJack' Rintsch
is it clear that `i` is restricted to integers? That works only if you assume `range` refers to the built-in `range()` function. So the smart compiler has to check all possible control flows up to this point and be sure `range` was not bound to something different. Ciao, Marc 'BlackJack

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Marc 'BlackJack' Rintsch
, right? :-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling private base methods

2007-04-20 Thread Marc 'BlackJack' Rintsch
not be necessary to have and use a mechanism to declare everything private. ;-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested dictionaries trouble

2007-04-18 Thread Marc 'BlackJack' Rintsch
', '2002', '2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010'] Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax error

2007-04-17 Thread Marc 'BlackJack' Rintsch
comment was used. So your costumer might check his Python version and maybe he should update. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: How to initialize a table of months.

2007-04-16 Thread Marc 'BlackJack' Rintsch
letters by convention. And maybe it's better to write `MONTHS` instead the abbreviation. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite3 question

2007-04-16 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Gabriel Genellina wrote: En Thu, 12 Apr 2007 08:43:49 -0300, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] escribió: In [EMAIL PROTECTED], Jorgen Bodde wrote: r = c.execute('select * from song where id = 1') for s in r: ... print s ... (1

Re: pyparsing Catch-22

2007-04-16 Thread Marc 'BlackJack' Rintsch
containing all allowed initial characters, an optional string containing allowed body characters (if omitted, defaults to the initial character set), and an optional minimum, maximum, and/or exact length. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo

Re: How to generate a continuous string

2007-04-16 Thread Marc 'BlackJack' Rintsch
. In [12]: 'a' * 5 Out[12]: 'a' Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: file resume

2007-04-16 Thread Marc 'BlackJack' Rintsch
data how can i proceed? Just open it in append mode: ``open('blablal', 'ab')`` Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Python editor/IDE on Linux?

2007-04-15 Thread Marc 'BlackJack' Rintsch
typing and limit typing errors in long names. Along with the editor there's always a terminal with IPython running to test and explore my own code and libraries. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: how to strip the domain name in python?

2007-04-15 Thread Marc 'BlackJack' Rintsch
://www.cnn.com - cnn.com from urlparse import urlsplit def get_domain(url): net_location = urlsplit(url)[1] return '.'.join(net_location.rsplit('.', 2)[-2:]) def main(): print get_domain('http://www.cnn.com') Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman

<    5   6   7   8   9   10   11   12   13   14   >