Re: py3k concerns. An example

2008-04-21 Thread Hrvoje Niksic
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> In py3k string%dictionary is going away. > > Why do you say that? It's not going away in Python 3.0. I also got the impression that it was going away. PEP 3101's abstract says: This PEP proposes a new system for built-in string formatting

Re: Does Python 2.5 include or not include SQLite engine?

2008-04-21 Thread Banibrata Dutta
Doesn't this depend on the source / distro ? My Python is from the ActivePython distro, while I am not sure (since I've just about started playing with it), I haven't seen SQLite included ... possible that I missed it. On 4/22/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > While reading feed

Re: why objects of old style classes are instances of 'object'

2008-04-21 Thread Gabriel Genellina
En Tue, 22 Apr 2008 00:49:27 -0300, AlFire <[EMAIL PROTECTED]> escribió: Diez B. Roggisch wrote: But not everything is a newstyle-class: class Foo: pass ... isinstance(Foo, object) True isinstance(Foo, type) False class Bar(object): pass ... isinstance(Bar, type) True th

Re: py3k concerns. An example

2008-04-21 Thread Martin v. Löwis
> In py3k string%dictionary is going away. Why do you say that? It's not going away in Python 3.0. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Ivan Illarionov
On Mon, 21 Apr 2008 16:10:05 -0700, George Sakkis wrote: > On Apr 21, 5:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > >> On 22 ÁÐÒ, 01:01, Peter Otten <[EMAIL PROTECTED]> wrote: >> >> > Ivan Illarionov wrote: >> > > And even faster: >> > > a = array.array('i', '\0' + '\0'.join((s[i:i+3] for

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Ivan Illarionov
On Mon, 21 Apr 2008 16:10:05 -0700, George Sakkis wrote: > On Apr 21, 5:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > >> On 22 ÁÐÒ, 01:01, Peter Otten <[EMAIL PROTECTED]> wrote: >> >> > Ivan Illarionov wrote: >> > > And even faster: >> > > a = array.array('i', '\0' + '\0'.join((s[i:i+3] for

Re: why objects of old style classes are instances of 'object'

2008-04-21 Thread AlFire
Diez B. Roggisch wrote: But not everything is a newstyle-class: class Foo: pass ... isinstance(Foo, object) True isinstance(Foo, type) False class Bar(object): pass ... isinstance(Bar, type) True thx for explanation. but more I look at it less and less

Re: Alternate indent proposal for python 3000

2008-04-21 Thread Dan Bishop
On Apr 21, 4:01 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 21 Apr, 00:54, Dan Bishop <[EMAIL PROTECTED]> wrote: > > > > > We wouldn't even need that. Just a new source encoding. Then we > > could write: > > > # -*- coding: end-block -*- > > [...] > > Someone at EuroPython 2007 did a lightnin

Re: Problems replacing \ with \\

2008-04-21 Thread Gabriel Genellina
(top posting corrected) En Mon, 21 Apr 2008 21:12:44 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > def escape(string): > """ > Escape both single quotes and blackslashes > >>> x = r"fun\fun" > >>> escape(x) > 'funfun' > """ > string = string.replace

Re: Java or C++?

2008-04-21 Thread Dan Bishop
On Apr 21, 5:26 pm, Jorgen Grahn <[EMAIL PROTECTED]> wrote: > On Mon, 21 Apr 2008 06:14:08 -0700 (PDT), NickC <[EMAIL PROTECTED]> wrote: > > On Apr 15, 1:46 pm, Brian Vanderburg II <[EMAIL PROTECTED]> > > wrote: > >> This will automatically call the constructors of any contained objects > >> to ini

Re: Problems replacing \ with \\

2008-04-21 Thread Michael Torrie
[EMAIL PROTECTED] wrote: > Hi... > > Here's a weird problem...I'm trying to escape a bunch of data to put > into a database. Is it possible to use the database API and prepared statements to avoid having to go through this exercise? Also, most database APIs work natively in unicode, so creating

Re: Lists: why is this behavior different for index and slice assignments?

2008-04-21 Thread Steve Holden
John Salerno wrote: Hey all. I've decided I let my Python skills (minor though they were) slip away so I started reading the new edition of Learning Python to brush up. I just read about lists again and I'm wondering if someone could explain what's going on under the hood that makes index and s

Re: Lists: why is this behavior different for index and slice assignments?

2008-04-21 Thread Michael Torrie
John Salerno wrote: > So the question is, when you assign an empty list to an index, why does > it insert an empty list, but when you assign an empty list to a slice, > it simply deletes the slice? I would say this is consistent behavior because a list slice is also a list itself. Whereas a lis

Re: py3k concerns. An example

2008-04-21 Thread Gabriel Genellina
En Mon, 21 Apr 2008 16:42:41 -0300, Ross Ridge <[EMAIL PROTECTED]> escribió: Ideally, I can implement some form of cross-compatible code so that I need maintain only a single code base, and I have managed to do so on a number of fronts (with the help of Robert A. Clark): Perhaps you can mana

Lists: why is this behavior different for index and slice assignments?

2008-04-21 Thread John Salerno
Hey all. I've decided I let my Python skills (minor though they were) slip away so I started reading the new edition of Learning Python to brush up. I just read about lists again and I'm wondering if someone could explain what's going on under the hood that makes index and slice assignments beh

Re: yield expression programmized-formal interpretation. (interpretation of yield expression.)

2008-04-21 Thread Gabriel Genellina
En Mon, 21 Apr 2008 15:03:05 -0300, <[EMAIL PROTECTED]> escribió: What if I say oath= yield or other= yield ? Does yield evaluate without parenthes? (Eth.) You can't use yield except in a generator function. From and the grammar definit

Re: Python 2.5 adoption

2008-04-21 Thread Patrick Mullen
On Mon, Apr 21, 2008 at 1:49 PM, Jorgen Grahn <[EMAIL PROTECTED]> wrote: > OP: keep in mind that your users do not see any gain from you using > 2.5. All they see is something that makes your software harder to > install. At some point you can dismiss them as living in the Stone Age, > but the

Re: Java or C++?

2008-04-21 Thread hdante
Summarizing the discussion (and giving my opinions), here's an "algorithm" to find out what language you'll leard next: 1. If you just want to learn another language, with no other essential concern, learn Ruby. 2. If you want to learn another language to design medium to large size applicatio

Re: Problems replacing \ with \\

2008-04-21 Thread [EMAIL PROTECTED]
HTH -- Thank you for the response. I'm not sure I understand the last sentence, although I think I get the idea. How do I create a proper doctest? Thanks On Apr 21, 9:08 pm, MRAB <[EMAIL PROTECTED]> wrote: > On Apr 21, 11:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > > > Hi...

Re: Segfault accessing dictionary in C Python module

2008-04-21 Thread sturlamolden
On Apr 22, 2:00 am, Mitko Haralanov <[EMAIL PROTECTED]> wrote: > As far as I know, I have done everything by the book yet I can't seem > to figure out where the problem is. Any help would be great? Albeit not having looked at your code in detail, I'm wiling to bet you have one of the refcounts wr

Re: Problems replacing \ with \\

2008-04-21 Thread MRAB
On Apr 21, 11:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi... > > Here's a weird problem...I'm trying to escape a bunch of data to put > into a database. > > Here's what I have: > > def escape(string): > """ > Escape both single quotes and blackslashes > >>> x = r"fun\fun"

Segfault accessing dictionary in C Python module

2008-04-21 Thread Mitko Haralanov
I have a Python module that I have written using the C API and I am having a problem accessing a dictionary from that module. Here is what I have done: 1. In my init function I call module = Py_InitModule ("name", methods); 2. then I get the module's __dict__ structure: dict = PyMo

Re: how to pass C++ object to another C++ function via Python function

2008-04-21 Thread Gabriel Genellina
En Mon, 21 Apr 2008 11:19:24 -0300, Diez B. Roggisch <[EMAIL PROTECTED]> escribió: Gabriel Genellina wrote: You can't pass any arbitrary C object to a Python function. In this case you can use a PyCObject, a Python box around a void* pointer. See http://docs.python.org/api/cObjects.html Ne

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Bob Greschke
On 2008-04-21 17:06:39 -0600, Bob Greschke <[EMAIL PROTECTED]> said: On 2008-04-21 16:51:13 -0600, Bob Greschke <[EMAIL PROTECTED]> said: JUST COMPLETELY IGNORE THAT LAST ONE. What a dope. Here: #! /usr/bin/env python from os import system from struct import unpack print "unpack 1" system("

Re: Code question

2008-04-21 Thread Matimus
On Apr 21, 4:16 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Apr 21, 4:42 pm, Matimus <[EMAIL PROTECTED]> wrote: > > > > > On Apr 21, 12:05 pm, <[EMAIL PROTECTED]> wrote: > > > > I've been trying to figure out a way to combine lists similar to how > > > zip() works. The main > > > difference

Re: sys.maxint in Python 3

2008-04-21 Thread castironpi
On Apr 21, 5:20 pm, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > In some algorithms a sentinel value may be useful, so for Python 3.x > > Better to just use object() to generate sentinels. Infinity is a number that compares always like. -- http://mail.python.org/mai

Re: how to pass C++ object to another C++ function via Python function

2008-04-21 Thread Gabriel Genellina
En Mon, 21 Apr 2008 19:11:31 -0300, grbgooglefan <[EMAIL PROTECTED]> escribió: On Apr 21, 10:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: En Mon, 21 Apr 2008 10:24:15 -0300, grbgooglefan <[EMAIL PROTECTED]> escribió: > I am trying to pass a C++ object to Python function. This Python

Re: dynamically importing a module and function

2008-04-21 Thread John Machin
[EMAIL PROTECTED] wrote: On Mon, Apr 21, 2008 at 3:39 PM, John Machin <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: data['module'], in the directory data['cwd'] OT: Any good reason for using a dictionary instead of a class instance (data.functiom, data.module, etc)? not really, i just

Re: module error in Vista -- works as administrator

2008-04-21 Thread John Machin
sawilla wrote: On Apr 21, 5:42 pm, John Machin <[EMAIL PROTECTED]> wrote: Log on as administrator, start python in command window and do this: import sys sys.path # shows where python is looking for importables import numpy import os.path print os.path.abspath(numpy.__file__) # shows where it f

Re: Code question

2008-04-21 Thread George Sakkis
On Apr 21, 4:42 pm, Matimus <[EMAIL PROTECTED]> wrote: > On Apr 21, 12:05 pm, <[EMAIL PROTECTED]> wrote: > > > > > I've been trying to figure out a way to combine lists similar to how zip() > > works.  The main > > difference though is I want to work with different length lists and combine > > th

Re: module error in Vista -- works as administrator

2008-04-21 Thread sawilla
On Apr 21, 5:42 pm, John Machin <[EMAIL PROTECTED]> wrote: > Log on as administrator, start python in command window and do this: > > import sys > sys.path # shows where python is looking for importables > import numpy > import os.path > print os.path.abspath(numpy.__file__) # shows where it found

Re: Code question

2008-04-21 Thread Mark Wooding
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > If anyone has time, I was wondering if you could share your thoughts > on whether this is an efficient way to do something like this, if it's > horrible and slow, etc. If your lists are fairly short then your algorithm is probably the best way to d

Re: 2's complement conversion. Is this right?

2008-04-21 Thread George Sakkis
On Apr 21, 5:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On 22 ÁÐÒ, 01:01, Peter Otten <[EMAIL PROTECTED]> wrote: > > > Ivan Illarionov wrote: > > > And even faster: > > > a = array.array('i', '\0' + '\0'.join((s[i:i+3] for i in xrange(0, > > > len(s), 3 > > > if sys.byteorder == 'litt

Re: Is massive spam coming from me on python lists?

2008-04-21 Thread Kam-Hung Soh
On Mon, 21 Apr 2008 16:01:42 +1000, Brian Vanderburg II <[EMAIL PROTECTED]> wrote: I've recently gotten more than too many spam messages and all say Sender: [EMAIL PROTECTED] I'm wondering if my mail list registration is now being used to spam myself and others. If so, sorry, but I'm no

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Bob Greschke
On 2008-04-21 16:51:13 -0600, Bob Greschke <[EMAIL PROTECTED]> said: JUST COMPLETELY IGNORE THAT LAST ONE. What a dope. Here: #! /usr/bin/env python from os import system from struct import unpack print "unpack 1" system("date") for x in xrange(0, 1): Value = unpack(">B", "a")[0]

Does Python 2.5 include or not include SQLite engine?

2008-04-21 Thread python
While reading feedback to my post "Does Python 2.5.2's embedded SQLite support full text searching?" I noticed that there appears to be some confusion regarding whether Python 2.5 includes the SQLite engine. My Windows 2.5.2 binary download includes SQLite. But other posters claim otherwise, re:

Re: dynamically importing a module and function

2008-04-21 Thread [EMAIL PROTECTED]
On Mon, Apr 21, 2008 at 3:39 PM, John Machin <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > data['module'], in the directory data['cwd'] > OT: Any good reason for using a dictionary instead of a class instance > (data.functiom, data.module, etc)? not really, i just wanted to stick to pr

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Bob Greschke
Something is fishy. I just ran this simple-minded thing and I'm, again, getting better times for ord() than I am for unpack() on a 2.8GHz OSX iMac with 2.5.1. This is the iterate so many times you can use your wristwatch method: #! /usr/bin/env python from os import system from struct

Problems replacing \ with \\

2008-04-21 Thread [EMAIL PROTECTED]
Hi... Here's a weird problem...I'm trying to escape a bunch of data to put into a database. Here's what I have: def escape(string): """ Escape both single quotes and blackslashes >>> x = r"fun\fun" >>> escape(x) 'funfun' """ string = string.replace('\\', '')

Re: dynamically importing a module and function

2008-04-21 Thread John Machin
[EMAIL PROTECTED] wrote: Hi I have a function data['function'], that I need to import from a file data['module'], in the directory data['cwd'] OT: Any good reason for using a dictionary instead of a class instance (data.functiom, data.module, etc)? If I do this from python interactive shel

Re: Java or C++?

2008-04-21 Thread Jorgen Grahn
On Mon, 21 Apr 2008 06:14:08 -0700 (PDT), NickC <[EMAIL PROTECTED]> wrote: > On Apr 15, 1:46 pm, Brian Vanderburg II <[EMAIL PROTECTED]> > wrote: >> This will automatically call the constructors of any contained objects >> to initialize the string. The implicit assignment operator >> automatically

Re: Any reliable obfurscator for Python 2.5

2008-04-21 Thread Matthew Woodcraft
Terry Reedy <[EMAIL PROTECTED]> wrote: > Such requests happen about once a month or so. If all the code-hiders were > to have gotten together to openly share their obfuscation ideas and code, I > suspect there would have been something pretty good by now. But in 10 > years of my watching, this

Re: Alternate indent proposal for python 3000

2008-04-21 Thread Matthew Woodcraft
Terry Reedy <[EMAIL PROTECTED]> wrote: > Off the top of my head: copy C and use {} to demarcate blocks and ';' to > end statements, so that '\n' is not needed and is just whitespace when > present. So, repeatedly scan for the next one of '{};'. That would break if those characters appear in str

Re: sys.maxint in Python 3

2008-04-21 Thread Paul Rubin
[EMAIL PROTECTED] writes: > In some algorithms a sentinel value may be useful, so for Python 3.x Better to just use object() to generate sentinels. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to pass C++ object to another C++ function via Python function

2008-04-21 Thread grbgooglefan
On Apr 21, 10:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 21 Apr 2008 10:24:15 -0300, grbgooglefan <[EMAIL PROTECTED]> escribió: > > > I am trying to pass a C++ object to Python function. This Python > > function then calls another C++ function which then uses this C++ > > objec

Re: dynamically importing a module and function

2008-04-21 Thread [EMAIL PROTECTED]
there was a mistake in my prev mail.. it is not able to successfully import the module. abcde is in directory /home/mark/work/proj1, but it is looking for it in /home/mark from where i am running the script.. though i changed cwd using os.chdir() function > File "/home/mark/app.py", line 5, i

dynamically importing a module and function

2008-04-21 Thread [EMAIL PROTECTED]
Hi I have a function data['function'], that I need to import from a file data['module'], in the directory data['cwd'] If I do this from python interactive shell (linux fedora core 8) from dir /home/mark it works fine: cwd = data['cwd'] os.chdir(cwd) print os.ge

Re: module error in Vista -- works as administrator

2008-04-21 Thread John Machin
sawilla wrote: First, I'm new to Python. I'm getting and error when I run Python 2.5.2 as a regular user in Vista but not when I run Python as an administrator. For example, if I type "import numpy" after I launch python from an adminstrator-privileged command window it loads fine. However, from

Re: Does Python 2.5.2's embedded SQLite support full text searching?

2008-04-21 Thread Daniel Fetchinson
> >> Sqlite itself is not distributed with python. Only a python db api > >> compliant wrapper is part of the python stdlib and as such it is > >> completely independent of the sqlite build. > > > > Don't most binary distributions include SQLite itself? I installed > > 2.5.2 on a new WinXP VM,

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Ivan Illarionov
On 22 апр, 01:01, Peter Otten <[EMAIL PROTECTED]> wrote: > Ivan Illarionov wrote: > > And even faster: > > a = array.array('i', '\0' + '\0'.join((s[i:i+3] for i in xrange(0, > > len(s), 3 > > if sys.byteorder == 'little': > > a.byteswap() > > > I think it's a fastest possible implementation

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Steve Holden
Bob Greschke wrote: > On 2008-04-21 14:50:13 -0600, Ivan Illarionov <[EMAIL PROTECTED]> said: > >> On 22 апр, 00:10, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >>> On 20 ÁÐÒ, 04:10, George Sakkis <[EMAIL PROTECTED]> w >> rote: >>> >>> On Apr 18, 9:36 pm, Ross Ridge <[EMAIL PROTECTED]> w

module error in Vista -- works as administrator

2008-04-21 Thread sawilla
First, I'm new to Python. I'm getting and error when I run Python 2.5.2 as a regular user in Vista but not when I run Python as an administrator. For example, if I type "import numpy" after I launch python from an adminstrator-privileged command window it loads fine. However, from a regular-user c

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Bob Greschke
On 2008-04-21 14:50:13 -0600, Ivan Illarionov <[EMAIL PROTECTED]> said: > On 22 апр, 00:10, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> On 20 ÁÐÒ, 04:10, George Sakkis <[EMAIL PROTECTED]> w > rote: >> >> >> >>> On Apr 18, 9:36 pm, Ross Ridge <[EMAIL PROTECTED]> >>> wrote: >> Ross Ridge

Re: List of all Python's ____ ?

2008-04-21 Thread python
Hrvoje, >> Is there an official list of all Python's ? > http://docs.python.org/ref/specialnames.html Wonderful!! Thank you very much. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: List of all Python's ____ ?

2008-04-21 Thread John Machin
Hrvoje Niksic wrote: > [EMAIL PROTECTED] writes: > >> Is there an official list of all Python's ? > > http://docs.python.org/ref/specialnames.html __missing__ is missing :-) see note (10) at the bottom of http://docs.python.org/lib/typesmapping.html -- http://mail.python.org/mailman/listi

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Peter Otten
Ivan Illarionov wrote: > And even faster: > a = array.array('i', '\0' + '\0'.join((s[i:i+3] for i in xrange(0, > len(s), 3 > if sys.byteorder == 'little': > a.byteswap() > > I think it's a fastest possible implementation in pure python Clever, but note that it doesn't work correctly for

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Ivan Illarionov
On 22 апр, 00:10, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On 20 ÁÐÒ, 04:10, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Apr 18, 9:36 pm, Ross Ridge <[EMAIL PROTECTED]> > > wrote: > > > > Ross Ridge <[EMAIL PROTECTED]> said: > > > > > If you have Python 2.5, here's a faster version: >

Re: Python 2.5 adoption

2008-04-21 Thread Jorgen Grahn
On Fri, 18 Apr 2008 12:49:25 -0700 (PDT), George Sakkis <[EMAIL PROTECTED]> wrote: > On Apr 18, 2:08 pm, Joseph Turian <[EMAIL PROTECTED]> wrote: >> How widely adopted is python 2.5? >> >> We are doing some development, and have a choice to make: >> a) Use all the 2.5 features we want. >> b) Maint

Re: Python in High School

2008-04-21 Thread Jan Claeys
Op Thu, 03 Apr 2008 00:06:34 -0700, schreef Dennis Lee Bieber: > On Thu, 03 Apr 2008 03:37:43 GMT, Jan Claeys <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > >> Later I learned C (and even later C++), and I've always been wondering >> why those languages were making simple th

Re: Code question

2008-04-21 Thread Matimus
On Apr 21, 12:05 pm, <[EMAIL PROTECTED]> wrote: > I've been trying to figure out a way to combine lists similar to how zip() > works. The main > difference though is I want to work with different length lists and combine > them. I came up with > the example below, which returns a list like I'm

Re: List of all Python's ____ ?

2008-04-21 Thread Hrvoje Niksic
[EMAIL PROTECTED] writes: > Is there an official list of all Python's ? http://docs.python.org/ref/specialnames.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 adoption

2008-04-21 Thread castironpi
On Apr 21, 12:59 pm, Lou Pecora <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] wrote: > > On Apr 21, 9:28 am, [EMAIL PROTECTED] (Aahz) wrote: > > > > Why is this newsgroup different from all other newsgroups?   > > > Different is a verbally atomic relation. > >

List of all Python's ____ ?

2008-04-21 Thread python
Is there an official list of all Python's ? I'm learning Python and trying to get an idea of what are available and specifically, what are used by each native Python data type? Thanks! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: 2's complement conversion. Is this right?

2008-04-21 Thread Ivan Illarionov
On 20 апр, 04:10, George Sakkis <[EMAIL PROTECTED]> wrote: > On Apr 18, 9:36 pm, Ross Ridge <[EMAIL PROTECTED]> > wrote: > > > > > Ross Ridge <[EMAIL PROTECTED]> said: > > > > If you have Python 2.5, here's a faster version: > > > >from struct import * > > >unpack_i32be = Struct(">l").unpac

Re: py3k concerns. An example

2008-04-21 Thread Ross Ridge
Carl Banks <[EMAIL PROTECTED]> wrote: > If you don't like Python 3, DON'T USE IT. That's the plan. Paul McGuire <[EMAIL PROTECTED]> wrote: >I've read this position a number of times in this and related threads, >and it overlooks one constituency of Python developers - those who >develop and su

Code question

2008-04-21 Thread jyoung79
I've been trying to figure out a way to combine lists similar to how zip() works. The main difference though is I want to work with different length lists and combine them. I came up with the example below, which returns a list like I'm wanting. I'm assuming it's somewhat efficient (althou

Re: Does Python 2.5.2's embedded SQLite support full text searching?

2008-04-21 Thread Nemesis
Ed Leafe wrote: >> Sqlite itself is not distributed with python. Only a python db api >> compliant wrapper is part of the python stdlib and as such it is >> completely independent of the sqlite build. > > Don't most binary distributions include SQLite itself? I installed > 2.5.2 on a new W

Re: Does Python 2.5.2's embedded SQLite support full text searching?

2008-04-21 Thread Ed Leafe
On Apr 21, 2008, at 1:05 PM, Daniel Fetchinson wrote: > Sqlite itself is not distributed with python. Only a python db api > compliant wrapper is part of the python stdlib and as such it is > completely independent of the sqlite build. Don't most binary distributions include SQLite itself

Re: Does Python 2.5.2's embedded SQLite support full text searching?

2008-04-21 Thread Daniel Fetchinson
> Does Python 2.5.2's embedded SQLite support full text searching? > > Any recommendations on a source where one can find out which SQLite > features are enabled/disabled in each release of Python? I'm trying to > figure out what's available in 2.5.2 as well as what to expect in 2.6 > and 3.0. Sql

yield expression programmized-formal interpretation. (interpretation of yield expression.)

2008-04-21 Thread castironpi
What if I say oath= yield or other= yield ? Does yield evaluate without parenthes? (Eth.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 adoption

2008-04-21 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > On Apr 21, 9:28 am, [EMAIL PROTECTED] (Aahz) wrote: > > > > > > Why is this newsgroup different from all other newsgroups?   > > Different is a verbally atomic relation. It's a Passover question. -- -- Lou Pecora -- http://mail.py

Re: Database vs Data Structure?

2008-04-21 Thread castironpi
On Apr 19, 10:56 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 19 Apr 2008 11:27:20 -0700, Scott David Daniels > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >         Hijacking as with the gmail kill filter I had to apply... > > > [EMAIL PROTECTED] wrote: > > > A

Re: Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-21 Thread Eduardo Schettino
I guess I should post a link to the project in this thread... http://python-doit.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem setting cookie in Internet Explorer

2008-04-21 Thread sophie_newbie
On Apr 21, 4:24 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Apr 21, 10:13 am, sophie_newbie <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I'm using the python to set a cookie when a user logs in. Thing is it > > doesn't seem to be setting properly in Internet Explorer. It works > > grand in

Re: "Help needed - I don't understand how Python manages memory"

2008-04-21 Thread sturlamolden
On Apr 21, 4:09 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > I'm not sure if this will help the OP at all - going into a world of dangling > pointers, keeping track of ownership, releasing memory by hand... One of the > good things of Python is automatic memory management. Ensuring that

Financial Modeling with Python by Shayne Fletcher, Christopher Gardner

2008-04-21 Thread orpap
Just saw at amazon.com reference to the following book that might be available later this year: Financial Modeling with Python [IMPORT] (Hardcover) by Shayne Fletcher (Author), Christopher Gardner (Author) Availability: Sign up to be notified when this item becomes available. Product Details

Re: wholesale air force one bape adidas wallet bikini tn shox air max air rift

2008-04-21 Thread fengxie . shi
We are the professional and serious wholesaler of brand products,such as shoes, clothing, handbags, sunglasses, hats, belts, and so on.We have many brands such as nike,adidas,puma,Gucci,North face.All goods are with best service,highest quality,competitive price,and safe timely deliverry If you ar

Does Python 2.5.2's embedded SQLite support full text searching?

2008-04-21 Thread python
Does Python 2.5.2's embedded SQLite support full text searching? Any recommendations on a source where one can find out which SQLite features are enabled/disabled in each release of Python? I'm trying to figure out what's available in 2.5.2 as well as what to expect in 2.6 and 3.0. Thank you, Mal

Tweaking PEP-234 to improve Duck Typing

2008-04-21 Thread Greg Kochanski
Id'a like to raise an issue that was partially discussed in 2006 ( http://groups.google.co.uk/group/comp.lang.python/browse_thread/thread/1811df36f2a131fd/435ba1cae670aecf?lnk=st&q=python+iterators+duck+typing#435ba1cae670aecf ) with the half-promise that it would be revisited before Python 3000

Re: Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-21 Thread Eduardo Schettino
> > I took a look at dolt syntax, and saw this: > > QQQ > > def create_folder(path): > """Create folder given by "path" if it doesnt exist""" > if not os.path.exists(path): > os.mkdir(path) > return True > > def task_create_build_folder(): > buildFolder = jsPath + "

Re: MySQL hardcoding?

2008-04-21 Thread John Nagle
[EMAIL PROTECTED] wrote: > I've got this error (see the path in last line) > > db=MySQLdb.connect(host='localhost',use_unicode = True, charset = > "Windows-1251",user='root',passwd='12',db='articulos') > File "C:\Python24\Lib\site-packages\MySQLdb\__init__.py", line 74, in > Connect >

Re: Problem setting cookie in Internet Explorer

2008-04-21 Thread Mike Driscoll
On Apr 21, 10:13 am, sophie_newbie <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using the python to set a cookie when a user logs in. Thing is it > doesn't seem to be setting properly in Internet Explorer. It works > grand in Firefox. Its basically: > > c = Cookie.SimpleCookie() > > c['username'] = una

Re: Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-21 Thread Paul Boddie
On 21 Apr, 16:51, "Ville M. Vainio" <[EMAIL PROTECTED]> wrote: > > Wouldn't it be more convenient to provide syntax like this: > > @task("create_build_folder") > @depend("dep1 some_other_dep") > def buildf(): > buildFolder = jsPath + "build" > create_folder(buildFolder) I'd want to make the "g

Problem setting cookie in Internet Explorer

2008-04-21 Thread sophie_newbie
Hi, I'm using the python to set a cookie when a user logs in. Thing is it doesn't seem to be setting properly in Internet Explorer. It works grand in Firefox. Its basically: c = Cookie.SimpleCookie() c['username'] = uname c['password'] = pword print c print pageContent And thats it. I've a s

Re: Finding the selected file in Windows Explorer

2008-04-21 Thread Mike Driscoll
On Apr 21, 9:44 am, [EMAIL PROTECTED] wrote: > Hi! > > I need to find the selected file(s) in a Windows Explorer window from > another program (I'd look at the window that last had focus). I found > something in the following page that should do the trick: > > http://blogs.msdn.com/oldnewthing/arch

Re: Python 2.5 adoption

2008-04-21 Thread castironpi
On Apr 21, 9:28 am, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > Joseph Turian  <[EMAIL PROTECTED]> wrote: > > > > >Basically, we're planning on releasing it as open-source, and don't > >want to alienate a large percentage of potential users. > > Datapoint: my company still u

Python Developer, DIRECT CLIENT REQUIREMENT: Please Respond

2008-04-21 Thread Rahul Ka
Hi , We have this urgent DIRECT client requirement . Please let me know if you have suitable candidates. Please send me their resume rate and contact details ASAP. TITLE: Python Developer LOCATION: Silver spring, MD DUARTION:6 Months + JOB REQUIREMENTS Strong C++ and Python experience 5 to 7

Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-21 Thread Ville M. Vainio
Eduardo Schettino wrote: > DoIt is a build tool that focus not only on making/building things but on > executing any kind of tasks in an efficient way. Designed to be easy to use > and "get out of your way". I took a look at dolt syntax, and saw this: QQQ def create_folder(path): """Create

Re: Java or C++?

2008-04-21 Thread rustom
On Apr 14, 11:44 am, [EMAIL PROTECTED] wrote: > Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure w

Finding the selected file in Windows Explorer

2008-04-21 Thread domiriel
Hi! I need to find the selected file(s) in a Windows Explorer window from another program (I'd look at the window that last had focus). I found something in the following page that should do the trick: http://blogs.msdn.com/oldnewthing/archive/2004/07/20/188696.aspx However, it is not Python an

Re: I just killed GIL!!!

2008-04-21 Thread Carl Banks
On Apr 21, 9:20 am, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > Carl Banks <[EMAIL PROTECTED]> wrote: > > > > >On Apr 20, 10:57 pm, [EMAIL PROTECTED] (Aahz) wrote: > >> In article <[EMAIL PROTECTED]>, > >> Carl Banks <[EMAIL PROTECTED]> wrote: > >>>On Apr 17, 3:37 am, Jona

Re: Python 2.5 adoption

2008-04-21 Thread Aahz
In article <[EMAIL PROTECTED]>, Joseph Turian <[EMAIL PROTECTED]> wrote: > >Basically, we're planning on releasing it as open-source, and don't >want to alienate a large percentage of potential users. Datapoint: my company still uses 2.3 and *might* upgrade to 2.4 and later this year. Basically,

Re: py3k concerns. An example

2008-04-21 Thread Stefan Behnel
Gabriel Genellina wrote: > You have plenty of time to evaluate alternatives. Your code may become > obsolete even before 3.3 is shipped. Sure, and don't forget to save two bytes when storing the year. ;) Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: how to pass C++ object to another C++ function via Python function

2008-04-21 Thread Diez B. Roggisch
Gabriel Genellina wrote: > En Mon, 21 Apr 2008 10:24:15 -0300, grbgooglefan <[EMAIL PROTECTED]> > escribió: > >> I am trying to pass a C++ object to Python function. This Python >> function then calls another C++ function which then uses this C++ >> object to call methods of that object's class.

Re: how to pass C++ object to another C++ function via Python function

2008-04-21 Thread Gabriel Genellina
En Mon, 21 Apr 2008 10:24:15 -0300, grbgooglefan <[EMAIL PROTECTED]> escribió: > I am trying to pass a C++ object to Python function. This Python > function then calls another C++ function which then uses this C++ > object to call methods of that object's class. > > I tried something like this, bu

Re: py3k concerns. An example

2008-04-21 Thread Paul McGuire
On Apr 19, 4:42 am, Carl Banks <[EMAIL PROTECTED]> wrote: > > If you don't like Python 3, DON'T USE IT. > I've read this position a number of times in this and related threads, and it overlooks one constituency of Python developers - those who develop and support modules for use by other Python us

Re: Nested lists, simple though

2008-04-21 Thread Diez B. Roggisch
> The first idea that comes to mind is reduce(lambda x, y: x + y, > list_of_lists, []) Which is not helping for arbitrary nested lists, as the OP wanted. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: how to pass C++ object to another C++ function via Python function

2008-04-21 Thread Diez B. Roggisch
grbgooglefan wrote: > I am trying to pass a C++ object to Python function. This Python > function then calls another C++ function which then uses this C++ > object to call methods of that object's class. You might consider using a C++-wrapper like SIP, Swig or Boost::Python to do this. If you do

Re: Finally had to plonk google gorups.

2008-04-21 Thread Torsten Bronger
Hallöchen! NickC writes: > Hmm, according to this thread I probably shouldn't bother even > trying to contribute to c.l.p discussions that are highlighted in > the Python- URL announcements, even in cases where I think a core > developer's perspective may be of interest. As someone that only > po

how to pass C++ object to another C++ function via Python function

2008-04-21 Thread grbgooglefan
I am trying to pass a C++ object to Python function. This Python function then calls another C++ function which then uses this C++ object to call methods of that object's class. I tried something like this, but it did not work, gave core dump. class myclass { public: myclass(){};

  1   2   >