Re: what is the difference between the two kinds of brackets?

2007-10-20 Thread Hendrik van Rooyen
"Paul Hankin" wrote: > If everything else is equal, use tuples. Interesting point of view - mine is just the opposite. I wonder if its the philosophical difference between: "Anything not expressly allowed is forbidden" and "Anything not expressly forbidden is allowed" ? - Hendrik -- http

Re: Selection error...

2007-10-20 Thread Carsten Haese
On Sat, 20 Oct 2007 21:06:31 -0700, Dennis Lee Bieber wrote > On Sat, 20 Oct 2007 22:47:23 -0400, Carsten Haese <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > Haven't we told you before not to use the % operator to fill values into > > a query? Use parameter binding: > >

Re: Selection error...

2007-10-20 Thread Carsten Haese
On Sat, 2007-10-20 at 18:28 -0700, Abandoned wrote: > Hi.. > I want to select datas but some datas give me this error: > > psycopg2.ProgrammingError: invalid byte sequence for encoding "UTF8": > 0xc720 > HINT: This error can also happen if the byte sequence does not match > the encoding expected

Re: Distributed RVS, Darcs, tech love

2007-10-20 Thread Lew
George Neuner wrote: > An attractive person of the opposite sex stands on the other side of > the room. You are told that your approach must be made in a series of > discrete steps during which you may close half the remaining distance > between yourself and the other person. > > Mathematician: "

Re: Distributed RVS, Darcs, tech love

2007-10-20 Thread George Neuner
On Sun, 21 Oct 2007 01:20:47 -, Daniel Pitts <[EMAIL PROTECTED]> wrote: >On Oct 20, 2:04 pm, llothar <[EMAIL PROTECTED]> wrote: >> > I love math. I respect Math. I'm nothing but a menial servant to >> > Mathematics. >> >> Programming and use cases are not maths. Many mathematics are >> the wor

Re: what is the difference between the two kinds of brackets?

2007-10-20 Thread Steve Lamb
On 2007-10-21, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > A note on terminology: the things inside curly brackets {} are called > dictionaries, or dicts, not directories. And the things you use to store > data in dictionaries are called keys, not indexes: Thanks for catching that. Kids, d

Re: Distributed RVS, Darcs, tech love

2007-10-20 Thread Benjamin A'Lee
On Fri, Oct 19, 2007 at 08:28:14PM -0700, Xah Lee wrote: [snip...] Inflammatory and irrelevant. Why not ask questions about Darcs on the Darcs list, or are you worried that there may be too many people there who can tell you what a load of rubbish you're talking? Ben signature.asc Descripti

Selection error...

2007-10-20 Thread Abandoned
Hi.. I want to select datas but some datas give me this error: psycopg2.ProgrammingError: invalid byte sequence for encoding "UTF8": 0xc720 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". My selec

Re: Distributed RVS, Darcs, tech love

2007-10-20 Thread Daniel Pitts
On Oct 20, 2:04 pm, llothar <[EMAIL PROTECTED]> wrote: > > I love math. I respect Math. I'm nothing but a menial servant to > > Mathematics. > > Programming and use cases are not maths. Many mathematics are > the worst programmers i've seen because they want to solve things and > much more often yo

Re: what is the difference between the two kinds of brackets?

2007-10-20 Thread Steven D'Aprano
On Sat, 20 Oct 2007 12:43:31 +, Steve Lamb wrote: > The quick answer is that tuples can be indexes into directories > while lists cannot. A note on terminology: the things inside curly brackets {} are called dictionaries, or dicts, not directories. And the things you use to store data in d

Re: Elisp Tutorial: HTML Syntax Coloring Code Block

2007-10-20 Thread Steve Holden
Byung-Hee HWANG wrote: > Steve, > > On Sat, 2007-10-20 at 08:30 -0400, Steve Holden wrote: >> Byung-Hee HWANG wrote: >> [... whole article quoted ...] >>> +1 ;; >>> BTW, what is G2/1.0? Is that Emacs-like editor? >>> >> I can't tell you that, but I do know that someone who quotes a whole >> lengt

Re: using "request" variable in python web program

2007-10-20 Thread Paul Boddie
On 21 Okt, 00:21, sami <[EMAIL PROTECTED]> wrote: > > def simple_web_app(request, api_key, secret_key): > fb = Facebook(api_key, secret_key, request.GET['auth_token']) > fb.auth_getSession() > > A Django-based tutorial and source is available > here:http://wiki.developers.facebook.com/inde

Re: ACM SIGAPL / APL2007 Conference / Montreal / one week away

2007-10-20 Thread rbe
On Oct 15, 5:22 am, Mike Kent <[EMAIL PROTECTED]> wrote: > Conference page > // with links to program details // > (updated Friday 10/12) > >http://www.sigapl.org/apl2007.html... At APL2007, I'll be announcing the release of the APEX APL compiler, version 0.0.0, und

Re: Get the instance name from a list by Reflection

2007-10-20 Thread Gabriel Genellina
En Sat, 20 Oct 2007 16:10:34 -0300, sccs cscs <[EMAIL PROTECTED]> escribi�: > I cannot find into documentation how to get the instance name. I found > the attributes __dict__,__class__ ,__bases__ __name__ , > but if i have the code: In general, you can't. There is no such thing as "the instance

Re: traceback over C API - still not working...

2007-10-20 Thread Gabriel Genellina
En Sat, 20 Oct 2007 14:47:52 -0300, Sami Vaisanen <[EMAIL PROTECTED]> escribi�: > This is becoming utterly painful process I found out that the return > value from "format_exception" function is NOT a list, i.e. PyList_Check() > fails. PySequence_Check() succeeds but then PySequence_List() g

using "request" variable in python web program

2007-10-20 Thread sami
Hi I am trying to write a facebook application in python - I have been programming simple desktop applications till now and am not really familiar with web apps Pyfacebook is the wrapper for the REST based Facebook API - there is a simple example for its usage as shown below: def simple_web_app(

Re: vote for Python - PLEASE

2007-10-20 Thread Bjoern Schliessmann
Diez B. Roggisch wrote: > Bjoern Schliessmann schrieb: >> Also, why would there be telephone votings in TV if they were >> meaningless to the default watcher? :) > > Because it costs 50cent to call, which makes a useless and most of > the time heavily biased poll a nice source of income. Or why d

Re: cgi scripts in Mac OS X

2007-10-20 Thread James Stroud
Jeff McNeil wrote: > Your web server needs to be told to execute Python scripts. You can > handle it a few different ways, depending on your environment. > > 1. Place your .py script inside of a ScriptAlias'd /cgi-bin/ directory > which will force it to be executed. > > 2. Rename your .py script

Re: Distributed RVS, Darcs, tech love

2007-10-20 Thread llothar
> I love math. I respect Math. I'm nothing but a menial servant to > Mathematics. Programming and use cases are not maths. Many mathematics are the worst programmers i've seen because they want to solve things and much more often you just need heuristics. Once they are into exact world they loose

Re: Distributed RVS, Darcs, tech love

2007-10-20 Thread j.oke
On 20 Ott, 05:28, Xah Lee <[EMAIL PROTECTED]> wrote: > yes-and-no. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get the instance name from a list by Reflection

2007-10-20 Thread Carsten Haese
On Sat, 2007-10-20 at 21:10 +0200, sccs cscs wrote: > Hello, > I cannot find into documentation how to get the instance name. That's because this is, in general, impossible. An object can have any number of names, even zero names, and an object doesn't know which names it has. Why do you think yo

Re: Get the instance name from a list by Reflection

2007-10-20 Thread Jean-Paul Calderone
On Sat, 20 Oct 2007 21:10:34 +0200 (CEST), sccs cscs <[EMAIL PROTECTED]> wrote: >Hello, >I cannot find into documentation how to get the instance name. I found the >attributes __dict__,__class__ ,__bases__ __name__ , >but if i have the code: > >class A :pass >a1 = A () >a2 = A () >aList = [a1,a2]

Re: logging module - restricted mode error

2007-10-20 Thread Vinay Sajip
On 16 Oct, 04:14, Paul Rudin <[EMAIL PROTECTED]> wrote: > I'm occasionally seeing tracebacks like this: > > Traceback (most recent call last): > File "logging/__init__.py", line 744, in emit > File "logging/__init__.py", line 630, in format > File "logging/__init__.py", line 421, in format >

Get the instance name from a list by Reflection

2007-10-20 Thread sccs cscs
Hello, I cannot find into documentation how to get the instance name. I found the attributes __dict__,__class__ ,__bases__ __name__ , but if i have the code: class A :pass a1 = A () a2 = A () aList = [a1,a2] for elem in aList : print elem.__instance_name__ ??? I expect to have "a1" "a2" ...

Re: what version python and wxPython comes with Mac OS X Leopard

2007-10-20 Thread Horace Enea
According to this Apple web page, Python 2.5 will be supported Horace In article <[EMAIL PROTECTED]>, chewie54 <[EMAIL PROTECTED]> wrote: > Hi All, > > Does anyone know what version of Python and wxPython comes with the > new Mac OS X Leopar

traceback over C API - still not working...

2007-10-20 Thread Sami Vaisanen
This is becoming utterly painful process I found out that the return value from "format_exception" function is NOT a list, i.e. PyList_Check() fails. PySequence_Check() succeeds but then PySequence_List() gives me back -1. So wtf? I must say the API is crap on this part. Im trying to get error

Re: cgi scripts in Mac OS X

2007-10-20 Thread Jeff McNeil
Your web server needs to be told to execute Python scripts. You can handle it a few different ways, depending on your environment. 1. Place your .py script inside of a ScriptAlias'd /cgi-bin/ directory which will force it to be executed. 2. Rename your .py script to .cgi and add an 'AddHandler c

cgi scripts in Mac OS X

2007-10-20 Thread Brian Shine
I'm trying to get cgi scripts to work. I can link to the python script, but instead of running and producing an output, it prints the script on the page. I've obviously missed a step in setting it up, but I can't see what it is. Thanks in advance, Brian Shine -- http://mail.python.org/mai

Re: vote for Python - PLEASE

2007-10-20 Thread Diez B. Roggisch
Bjoern Schliessmann schrieb: > Steven D'Aprano wrote: >> It's an Internet poll. By definition, the results are meaningless. > > Regrettably, there are many people that don't share your definition. > > Also, why would there be telephone votings in TV if they were > meaningless to the default watch

Re: Noob: Loops and the 'else' construct

2007-10-20 Thread Diez B. Roggisch
MRAB schrieb: > On Oct 19, 4:11 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Thu, 18 Oct 2007 23:44:27 -0300, Ixiaus <[EMAIL PROTECTED]> >> escribió: >> >>> I have just come across a site that discusses Python's 'for' and >>> 'while' loops as having an (optional) 'else' structure. >>>

Re: Running another python interpreter

2007-10-20 Thread Gabriel Genellina
En Sat, 20 Oct 2007 06:12:23 -0300, Simon Pickles <[EMAIL PROTECTED]> escribi�: > This is very nearly perfect. I have a second console window. > Unfortunately, the first is waiting for the second to close. Is there > anyway to specify the equivalent of os.P_NOWAIT? Use the more generic version:

Re: what is the difference between the two kinds of brackets?

2007-10-20 Thread Paul Hankin
On Oct 20, 11:15 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > what is the difference between the two kinds of brackets? > I tried a few examples but I can't make out any real difference: The main difference in the language between tuples and lists is that tuples (...) are immutable, and li

Re: Display all properties with reflection

2007-10-20 Thread Gabriel Genellina
En Sat, 20 Oct 2007 06:03:55 -0300, sccs cscs <[EMAIL PROTECTED]> escribi�: > Hello, > I like create a methode that display all the properties of an instance > of classe with their value. > I try the following code: see def __str__ (self) methode. > But it displays only the instance attribut

Re: Dealing with "funny" characters

2007-10-20 Thread Diez B. Roggisch
>No, no, that's wrong. MySQL and the Python interface to it understand > Unicode. You don't want to convert data to UTF-8 before putting it in a > database; the database indexing won't work. I doubt that indexing has anything to do with it whatsoever. >Here's how to do it right. > >

Re: where do I need to "tab"?

2007-10-20 Thread Paul Hankin
On Oct 20, 3:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > print b if ((b > a) and (b < (a * b))) else a Everyone else has already pointed out that you need 2.5. As a matter of style, the above line can be written more cleanly: print b if a < b < a * b else a -- Paul Hankin -- ht

what version python and wxPython comes with Mac OS X Leopard

2007-10-20 Thread chewie54
Hi All, Does anyone know what version of Python and wxPython comes with the new Mac OS X Leopard? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Dealing with "funny" characters

2007-10-20 Thread John Nagle
Gert-Jan wrote: > sophie_newbie schreef: >> Hi, I want to store python text strings that characters like "é" "Č" >> in a mysql varchar text field. Now my problem is that mysql does not >> seem to accept these characters. I'm wondering if there is any way I >> can somehow "encode" these characters t

Re: How can i store pickle dumps data ?

2007-10-20 Thread Abandoned
On Oct 20, 5:32 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Abandoned schrieb: > > > > > > > Hi.. > > I have some dictionary as {2:3, 4:6, 5:7.} > > I want to pickle to these dictionary and save to database but i > > couldn't.. > > > My code for adding.. > > a=eval(dict) > > a=pickl

Re: Noob: Loops and the 'else' construct

2007-10-20 Thread Thorsten Kampe
* Dustan (Fri, 19 Oct 2007 11:39:04 -) > On Oct 19, 3:12 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > > So a for/else loop is exactly the same thing as a for loop with the > > else clause outside the loop (except for "break")? > > Am I missing something here? It sounds to me like you just d

pydoc script.py vs. pydoc scriptpy

2007-10-20 Thread BartlebyScrivener
On Debian Etch, if ~/mypyscripts is in my bash PATH and also in PYTHONPATH, I get the following pydoc behaviors. Maybe this is intentional. I'm just checking to be sure I don't have something misconfigured in my environment. If I have two scripts or modules in ~/mypyscripts: one script.py and one

Re: weakref pitfall

2007-10-20 Thread Peter Otten
Odalrick wrote: > I'm trying to write a simple game and decided I need an eventmanager. > > > import weakref > from collections import defaultdict > > class _EventManager( object ): > def __init__( self ): > self._handled_events = > defaultdict( weakref.WeakKeyDictionary ) > >

Re: weakref pitfall

2007-10-20 Thread Odalrick
On 20 Okt, 16:21, Paul Hankin <[EMAIL PROTECTED]> wrote: > The next stage in debugging is to think of a test that will prove your > guess right or wrong. I'd remove weakrefs from your event manager and > see if your code starts working. > > I'd suggest you're a bit confused about your event manage

Re: How can i store pickle dumps data ?

2007-10-20 Thread Diez B. Roggisch
Abandoned schrieb: > Hi.. > I have some dictionary as {2:3, 4:6, 5:7.} > I want to pickle to these dictionary and save to database but i > couldn't.. > > My code for adding.. > a=eval(dict) > a=pickle.dumps(a, -1) > cursor2.execute("INSERT INTO cache VALUES ('%s', %s)", (x[0],a)) > conn2.c

Re: vote for Python - PLEASE

2007-10-20 Thread Robin Becker
Monty Taylor wrote: > Hey everybody, > > MySQL has put up a poll on http://dev.mysql.com asking what your primary > programming language is. Even if you don't use MySQL - please go stick > in a vote for Python. I'm constantly telling folks that Python needs > more love, but PHP and Java are kic

Re: Dealing with "funny" characters

2007-10-20 Thread Gert-Jan
sophie_newbie schreef: > Hi, I want to store python text strings that characters like "é" "Č" > in a mysql varchar text field. Now my problem is that mysql does not > seem to accept these characters. I'm wondering if there is any way I > can somehow "encode" these characters to appear as normal cha

Re: where do I need to "tab"?

2007-10-20 Thread Scott David Daniels
Gabriel Genellina wrote: > En Fri, 19 Oct 2007 23:24:30 -0300, Scott David Daniels > ... >> OK, you have a mix of Python 3,0 and current (2.5.1) Python. > > All examples are OK for 2.5 You are absolutely correct. Sorry for the misinformation. I've been working on 2.3, 2.4, 2.5, and trying 3.0

Re: weakref pitfall

2007-10-20 Thread Paul Hankin
On Oct 20, 2:47 pm, Odalrick <[EMAIL PROTECTED]> wrote: > I'm trying to write a simple game and decided I need an eventmanager. > > > import weakref > from collections import defaultdict > > class _EventManager( object ): > def __init__( self ): > self._handled_events = > defaultdict(

Re: Dealing with "funny" characters

2007-10-20 Thread Paul Hankin
On Oct 20, 2:13 pm, sophie_newbie <[EMAIL PROTECTED]> wrote: > Hi, I want to store python text strings that characters like "é" "Č" > in a mysql varchar text field. Now my problem is that mysql does not > seem to accept these characters. I'm wondering if there is any way I > can somehow "encode" th

weakref pitfall

2007-10-20 Thread Odalrick
I'm trying to write a simple game and decided I need an eventmanager. import weakref from collections import defaultdict class _EventManager( object ): def __init__( self ): self._handled_events = defaultdict( weakref.WeakKeyDictionary ) def register( self, handler, event_type,

Re: Elisp Tutorial: HTML Syntax Coloring Code Block

2007-10-20 Thread Byung-Hee HWANG
Steve, On Sat, 2007-10-20 at 08:30 -0400, Steve Holden wrote: > Byung-Hee HWANG wrote: > [... whole article quoted ...] > > +1 ;; > > BTW, what is G2/1.0? Is that Emacs-like editor? > > > I can't tell you that, but I do know that someone who quotes a whole > lengthy article like that just to ask

Re: __main__ : What is this?

2007-10-20 Thread Duncan Booth
"Matt McCredie" <[EMAIL PROTECTED]> wrote: > or, as I prefer: > > a = 'c' == b > > It is just habit from writing so much C code that way. In C the > reasoning is that if you have mistyped it, you will catch the issue at > compile time instead of runtime (which is potentially much more > difficul

Dealing with "funny" characters

2007-10-20 Thread sophie_newbie
Hi, I want to store python text strings that characters like "é" "Č" in a mysql varchar text field. Now my problem is that mysql does not seem to accept these characters. I'm wondering if there is any way I can somehow "encode" these characters to appear as normal characters and then "decode" them

Re: open remote terminal

2007-10-20 Thread Rafael Sachetto
Take a look at this documentation: http://pexpect.sourceforge.net/pxssh.html On 10/20/07, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: > > Fabian Braennstroem wrote: > > > Hi Steve, > > > > Steve Holden wrote: > > > >> Fabian Braennstroem wrote: > >>> Hi, > >>> > >>> I would like to use python

Re: what is the difference between the two kinds of brackets?

2007-10-20 Thread Steve Lamb
On 2007-10-20, James Stroud <[EMAIL PROTECTED]> wrote: >The long of it is that there are deep computer-science > issues that distinguish the two and the differences become more > important the more you know (presumably). However, I have been > programming this language for 5 years, and I still c

Re: Elisp Tutorial: HTML Syntax Coloring Code Block

2007-10-20 Thread Steve Holden
Byung-Hee HWANG wrote: [... whole article quoted ...] > +1 ;; > BTW, what is G2/1.0? Is that Emacs-like editor? > I can't tell you that, but I do know that someone who quotes a whole lengthy article like that just to ask a simple question isn't being very considerate of their readers. regards

Re: vote for Python - PLEASE

2007-10-20 Thread Amit Khemka
On 10/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Oct 18, 6:12 pm, Monty Taylor <[EMAIL PROTECTED]> wrote: > > Hey everybody, > > > > MySQL has put up a poll onhttp://dev.mysql.comasking what your primary > > programming language is. > > But it doesn't ask that, it asks what your > pri

Re: vote for Python - PLEASE

2007-10-20 Thread Bjoern Schliessmann
Steven D'Aprano wrote: > It's an Internet poll. By definition, the results are meaningless. Regrettably, there are many people that don't share your definition. Also, why would there be telephone votings in TV if they were meaningless to the default watcher? :) Regards, Björn -- BOFH excuse

Re: Need some help with my first Twisted program

2007-10-20 Thread Bjoern Schliessmann
McCann, Brian wrote: > I posted this to the Twisted list...figured I'd try here too. Didn't you get an answer? The cracks for special topics are usually there. > to work right. Looking through the API docs I found > "connectionLost()", which I put in my protocol class (EchoProtocol > in the ex

Re: what is the difference between the two kinds of brackets?

2007-10-20 Thread James Stroud
[EMAIL PROTECTED] wrote: > hi > > what is the difference between the two kinds of brackets? > I tried a few examples but I can't make out any real difference: > Are these two kinds of brackets mean the same thing in the "list" > context? Thanks. The square ones designate lists: http://docs

Re: what is the difference between the two kinds of brackets?

2007-10-20 Thread Thomas Jollans
On Saturday 20 October 2007, [EMAIL PROTECTED] wrote: > hi > > what is the difference between the two kinds of brackets? > I tried a few examples but I can't make out any real difference: Lists are mutable, tuples aren't: Python 2.4.4 (#2, Aug 16 2007, 00:34:54) [GCC 4.1.3 20070812 (prerelease) (

Re: how to iterate over sequence and non-sequence ?

2007-10-20 Thread stef mientki
Steven D'Aprano wrote: > On Fri, 19 Oct 2007 18:38:06 +0200, stef mientki wrote: > > >> I don't have pointers, I've just names (at least I think). Let me >> explain a little bit more, >> I want to simulate / debug a user program, the user program might look >> like this: >> >>x = 5 >>for

what is the difference between the two kinds of brackets?

2007-10-20 Thread [EMAIL PROTECTED]
hi what is the difference between the two kinds of brackets? I tried a few examples but I can't make out any real difference: lst = [10, 20, 30] print lst[0] print lst[2] print lst lst = (10, 20, 30) print lst[0] print lst[2] print lst lst = [10, 20, 40, "string", 302.234] print lst[0:2] print ls

Re: how to iterate over sequence and non-sequence ?

2007-10-20 Thread stef mientki
>> def user_program(): >> x = 5; _debug(2) >> global x,i >> _debug (3) >> for i in xrange(10): >> _debug (3) >> x = x + 1; _debug (4) >> > > You do know that Python exposes all of it's compilation / AST / whatever > machinery, don't you ? IOW, you can take a textu

Re: how to iterate over sequence and non-sequence ?

2007-10-20 Thread stef mientki
Paul Hankin wrote: > On Oct 19, 5:38 pm, stef mientki <[EMAIL PROTECTED]> wrote: > >> ... snip hand-coded debugger >> I couldn't come up with a better solution ;-) >> > > Does pdb not suffice? > thanks very much Paul, Never heard of that before, I looked it up, just 1 page in my book of

Re: open remote terminal

2007-10-20 Thread Fabian Braennstroem
Fabian Braennstroem wrote: > Hi Steve, > > Steve Holden wrote: > >> Fabian Braennstroem wrote: >>> Hi, >>> >>> I would like to use python to start an terminal, e.g. xterm, and login >>> on a remote machine using rsh or ssh. This could be done using 'xterm -e >>> ssh machine', but after the logi

Re: Running another python interpreter

2007-10-20 Thread Simon Pickles
This is very nearly perfect. I have a second console window. Unfortunately, the first is waiting for the second to close. Is there anyway to specify the equivalent of os.P_NOWAIT? Gabriel Genellina wrote: > --- Simon Pickles <[EMAIL PROTECTED]> escribió: > > >> os.spawnl(os.P_NOWAIT, sys.exec

Display all properties with reflection

2007-10-20 Thread sccs cscs
Hello, I like create a methode that display all the properties of an instance of classe with their value. I try the following code: see def __str__ (self) methode. But it displays only the instance attributes values not the properties and their value. In pseudo-code: For Each Properties :

How can i store pickle dumps data ?

2007-10-20 Thread Abandoned
Hi.. I have some dictionary as {2:3, 4:6, 5:7.} I want to pickle to these dictionary and save to database but i couldn't.. My code for adding.. a=eval(dict) a=pickle.dumps(a, -1) cursor2.execute("INSERT INTO cache VALUES ('%s', %s)", (x[0],a)) conn2.commit() i try in UTF-8 postresql datab

Re: pyparsing batch file

2007-10-20 Thread Fabian Braennstroem
Hi Paul, Paul McGuire wrote: > On Oct 17, 4:47 pm, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: > >> Unfortunately, it does not parse the whole file names with >> the underscore and I do not know yet, how I can access the >> line with 'define/boundary-conditions'. Every 'argument' of >> that c

Re: open remote terminal

2007-10-20 Thread Fabian Braennstroem
Hi Steve, Steve Holden wrote: > Fabian Braennstroem wrote: >> Hi, >> >> I would like to use python to start an terminal, e.g. xterm, and login on >> a remote machine using rsh or ssh. This could be done using 'xterm -e ssh >> machine', but after the login I would like to jump to a given director

is this a feasible solution??

2007-10-20 Thread [EMAIL PROTECTED]
chech wat is happening here.. http://www.createthefuturecontest.com/pages/view/entriesdetail.html?entryID=798 -- http://mail.python.org/mailman/listinfo/python-list

SWIG-PYTHON -> Problem in header file inclusion

2007-10-20 Thread abarun22
Hi I am facing a problem while including a C header file in the SWIG interface file. However the problem does not occur when i directly copy the contents of header file in the same place. My interface file read as follows. /* interface file dep.i */ %module dep %{ #include "dep.h" %} %inline %{

Re: __main__ : What is this?

2007-10-20 Thread Peter Otten
Steven D'Aprano wrote: > On Sat, 20 Oct 2007 00:26:22 +, Matimus wrote: > >> The common pattern: >> >> if __name__ == "__main__": >> # do stuff >> >> IMHO better written: >> >> if "__main__" == __name__: >> # do stuff > > Apart from looking weird, what's the difference? In C this s

Re: SQLObject - Connect to established DB with non-int 'id' field

2007-10-20 Thread Sean DiZazzo
On Oct 19, 11:51 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Sean DiZazzo schrieb: > > > Hi all, > > > I am just beginning with TurboGears and have run into a problem with > > SQLObject. > > > I'm trying to connect to an established mysql DB, and use TurboGears > > to display results from t