Learning Python

2006-11-06 Thread kaushal
Hi How do i start Learning Python,is there any reference material which I can refer since I dont have any programming experience Thanks and Regards Kaushal -- http://mail.python.org/mailman/listinfo/python-list

Is there any python lib for calling CVS api?

2006-11-06 Thread ironpythonster
Hi everyone, this should be a quick question. I'm writing some scripts to take some file and move them into a CVS repository, but it's pretty slow, because it uses system calls to execute the CVS commands. Has anyone ever made a python to CVS interface library that I could use? Some one sugest

Re: python GUIs comparison (want)

2006-11-06 Thread Eric Brunel
On Wed, 25 Oct 2006 11:04:57 +0200, Christophe <[EMAIL PROTECTED]> wrote: >>> And no modern layout manager available. Only those old school >>> left/right/up/down pack and anchors are available. >> huh? when did you last look at Tk? 1994? > Yesterday. In fact, I could find no mention at all

Re: string to list of numbers conversion

2006-11-06 Thread Frederic Rentsch
[EMAIL PROTECTED] wrote: > Hi, > I have a string '((1,2), (3,4))' and I want to convert this into a > python tuple of numbers. But I do not want to use eval() because I do > not want to execute any code in that string and limit it to list of > numbers. > Is there any alternative way? > > Thanks

Re: Learning Python

2006-11-06 Thread ArdPy
kaushal wrote: > Hi > > How do i start Learning Python,is there any reference material which I > can refer since I dont have > any programming experience > > Thanks and Regards > > Kaushal Hi kaushal, Look into http://diveintopython.org. Dive into python is a really readable ebook...enjoy -- h

Re: Learning Python

2006-11-06 Thread Jorge Vargas
On 6 Nov 2006 01:33:36 -0800, ArdPy <[EMAIL PROTECTED]> wrote: > > kaushal wrote: > > Hi > > > > How do i start Learning Python,is there any reference material which I > > can refer since I dont have > > any programming experience > > > > Thanks and Regards > > > > Kaushal > > Hi kaushal, > > Look

Problem with XML-RPC not mounted in /

2006-11-06 Thread Almad
Hi, I'm trying to build XML-RPC service, both server and client library. My server is CherryPy with XML-RPC filter. I have here method registration_ip. When it's in, say http://ws.rpgplanet.nerv/, everything is OK, but when I move it in http://ws.rpgplanet.nerv/main/, this behaviour occur: srv

Re: Python Distilled

2006-11-06 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Simon Wittber wrote: > I'd also like to remove any deprecated or stuff which is left in for > backwards functionality (eg Classic classes). Classic classes are still needed for exceptions: >>> class E(object): ...pass ... >>> raise E Traceback (most recent call last):

Re: Creating db front end or middleware.

2006-11-06 Thread Bruno Desthuilliers
tobiah wrote: > Let's say I want to write a new tool to do > something to, or report on people in a database. > Each tool is going to have to have all sorts of > routines that know about the relationship between > the data. The first thought is to write a library > of routines that do things like,

Re: Python Distilled

2006-11-06 Thread Georg Brandl
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Simon Wittber > wrote: > >> I'd also like to remove any deprecated or stuff which is left in for >> backwards functionality (eg Classic classes). > > Classic classes are still needed for exceptions: > class E(object): > ...pass >

Re: Python Distilled

2006-11-06 Thread Jorge Godoy
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> writes: > In <[EMAIL PROTECTED]>, Simon Wittber > wrote: > >> I'd also like to remove any deprecated or stuff which is left in for >> backwards functionality (eg Classic classes). > > Classic classes are still needed for exceptions: > class E(objec

Re: simple way to un-nest (flatten?) list

2006-11-06 Thread Steven D'Aprano
On Sun, 05 Nov 2006 21:43:33 +, djc wrote: > There is I am sure an easy way to do this, but I seem to be brain dead > tonight. So: > > I have a table such that I can do > > [line for line in table if line[7]=='JDOC'] > and > [line for line in table if line[7]=='Aslib'] > and > [line

Re: Python Distilled

2006-11-06 Thread Paul McGuire
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In <[EMAIL PROTECTED]>, Simon Wittber > wrote: > >> I'd also like to remove any deprecated or stuff which is left in for >> backwards functionality (eg Classic classes). > > Classic classes are still needed fo

RE: Classes referencing each other

2006-11-06 Thread Ryan Ginstrom
> Behalf Of Manuel Bleichner > In a module I have a huge number of classes of the form: > > class A(object): >connected_to = [B, C] > > > class B(object) >connected_to = [C] > > > class C(object) >connected_to = [A] > > > As you see, classes A and B reference classes tha

Re: forwarding *arg parameter

2006-11-06 Thread Steven D'Aprano
On Sun, 05 Nov 2006 19:35:58 +, Tuomas wrote: > Thanks. My solution became: > > >>> def flattern(arg): > ... result = [] > ... for item in arg: > ... if isinstance(item, (list, tuple)): > ... result.extend(flattern(item)) > ... else: > ... resu

Re: Is there any python lib for calling CVS api?

2006-11-06 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > Hi everyone, this should be a quick question. I'm writing some scripts > to take some file and move them into a CVS repository, but it's pretty > slow, because it uses system calls to execute the CVS commands. [...] > anyway, if anyone knows of a useful module, I'd lov

Re: string to list of numbers conversion

2006-11-06 Thread Paul McGuire
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I have a string '((1,2), (3,4))' and I want to convert this into a > python tuple of numbers. But I do not want to use eval() because I do > not want to execute any code in that string and limit it to list of

Re: Learning Python

2006-11-06 Thread kaushal
On Nov 6, 2:54 pm, "Jorge Vargas" <[EMAIL PROTECTED]> wrote: > On 6 Nov 2006 01:33:36 -0800, ArdPy <[EMAIL PROTECTED]> wrote: > > > > > kaushal wrote: > > > Hi > > > > How do i start Learning Python,is there any reference material which I > > > can refer since I dont have > > > any programming expe

Re: Projecting MUD maps

2006-11-06 Thread Neil Cerutti
On 2006-11-05, BJörn Lindqvist <[EMAIL PROTECTED]> wrote: > Hello, I'm looking for an algorithm to project "MUD maps" such > as the following map: > http://www.aww-mud.org/maps/MUD_Maps/Caerin-colour.jpg Check out the Ruby project IFMapper for a mature project that might accomplish your goal. You

Re: Learning Python

2006-11-06 Thread Ramon Diaz-Uriarte
On 6 Nov 2006 03:12:34 -0800, kaushal <[EMAIL PROTECTED]> wrote: > On Nov 6, 2:54 pm, "Jorge Vargas" <[EMAIL PROTECTED]> wrote: > > On 6 Nov 2006 01:33:36 -0800, ArdPy <[EMAIL PROTECTED]> wrote: > > > > > > > > > kaushal wrote: > > > > Hi > > > > > > How do i start Learning Python,is there any refe

Erronous "unsupported locale setting" ?

2006-11-06 Thread robert
Why can the default locale not be set by its true name? but only by '' ? : PythonWin 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32. >>> import locale >>> locale.getlocale() (None, None) >>> locale.setlocale(locale.LC_ALL,"de_DE") Traceback (most recent call last):

Re: Projecting MUD maps

2006-11-06 Thread BJörn Lindqvist
On 11/5/06, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > BJörn Lindqvist schrieb: > > Hello, I'm looking for an algorithm to project "MUD maps" such as the > > following map: http://www.aww-mud.org/maps/MUD_Maps/Caerin-colour.jpg > > > > MUD:s consists of rooms, each rooms has up to four orthogona

Re: forwarding *arg parameter

2006-11-06 Thread Tuomas
Dennis Lee Bieber wrote: > On Sun, 05 Nov 2006 22:51:00 GMT, Tuomas <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >>> >> >>I fylly agree with tis: "Typically, the responsibility should be on the >>CALLER, not the CALLED..". I just don't know how to unpack *arg for >>ca

Re: ANN: PyQt v4.1 Released

2006-11-06 Thread Tool69
Hi Phil, I followed the docs to build qscintilla2, all is going well with no errors, but when I launched the PyQt Syntax Highlighter Example, nothing is highlighted but the first line of text, whereas the C++ sample works well in the demo. Any hints ? Thanks. -- http://mail.python.org/mailman/lis

Re: Python-list Digest, Vol 38, Issue 72

2006-11-06 Thread Santosh Chikkerur
Hi Friends,How to use getchar( ) in python. I want to see the output of the program ,step by step.I have given print statements in between for the results..Hence i would like to print the output everytime there is getchar().which is the similar fn in pythonthanks,SantoshOn 11/6/06, [EMAIL PROTECTED

Building C extensions

2006-11-06 Thread Paolo Pantaleo
Well I'm just courious: if I want to buid a C extension, I shoul use the same compiler that has been used to build python (right?). Since python has been built using Visual C, how can I build an extension if I don't have Visual Studio? PAolo -- http://mail.python.org/mailman/listinfo/python-list

Re: forwarding *arg parameter

2006-11-06 Thread Tuomas
Steven D'Aprano wrote: > On Sun, 05 Nov 2006 19:35:58 +, Tuomas wrote: > > >>Thanks. My solution became: >> >> >>> def flattern(arg): >>... result = [] >>... for item in arg: >>... if isinstance(item, (list, tuple)): >>... result.extend(flattern(item)) >>...

Re: Is there any python lib for calling CVS api?

2006-11-06 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi everyone, this should be a quick question. I'm writing some > scripts > to take some file and move them into a CVS repository, but it's pretty > slow, because it uses system calls to execute the CVS commands. > > Has anyone ever made a python to CVS interface lib

Re: Projecting MUD maps

2006-11-06 Thread Diez B. Roggisch
BJörn Lindqvist wrote: > On 11/5/06, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> BJörn Lindqvist schrieb: >> > Hello, I'm looking for an algorithm to project "MUD maps" such as the >> > following map: http://www.aww-mud.org/maps/MUD_Maps/Caerin-colour.jpg >> > >> > MUD:s consists of rooms, each

Re: Building C extensions

2006-11-06 Thread casevh
Paolo Pantaleo wrote: > Well I'm just courious: if I want to buid a C extension, I shoul use > the same compiler that has been used to build python (right?). Since > python has been built using Visual C, how can I build an extension if > I don't have Visual Studio? > > PAolo Use mingw32. It shoul

Re: Erronous "unsupported locale setting" ?

2006-11-06 Thread Leo Kislov
robert wrote: > Why can the default locale not be set by its true name? but only by '' ? : Probably it is just not implemented. But since locale names are system specific (For example windows accepts 'ch' as Chinese in Taiwan, where as IANA

Re: Is there a commas-in-between idiom?

2006-11-06 Thread Fredrik Lundh
Ernesto García García wrote: > it's very common that I have a list and I want to print it with commas > in between. How do I do this in an easy manner, whithout having the > annoying comma in the end? I've collected a bunch of list pydioms and other notes here: http://effbot.org/zone/pytho

Re: Erronous "unsupported locale setting" ?

2006-11-06 Thread robert
Leo Kislov wrote: > robert wrote: >> Why can the default locale not be set by its true name? but only by '' ? : > > Probably it is just not implemented. But since locale names are system > specific (For example windows accepts 'ch' as Chinese in Taiwan, where > as IANA

Re: Is there a commas-in-between idiom?

2006-11-06 Thread Ernesto García García
> I've collected a bunch of list pydioms and other notes here: > >http://effbot.org/zone/python-list.htm Thank you for the suggestion. Ernesto -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Distilled

2006-11-06 Thread Georg Brandl
Paul McGuire wrote: > "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> In <[EMAIL PROTECTED]>, Simon Wittber >> wrote: >> >>> I'd also like to remove any deprecated or stuff which is left in for >>> backwards functionality (eg Classic classes). >> >> Clas

Re: Learning Python

2006-11-06 Thread mohan
Hi Kaushal, Other than "Core Python" by Chun, also try "Python: How To Program" by Dietel & Dietel. It is one of the good books for bigginers. Good Luck, Mohan. On Nov 6, 10:00 am, "kaushal" <[EMAIL PROTECTED]> wrote: > Hi > > How do i start Learning Python,is there any reference material whi

Re: Sorted and reversed on huge dict ?

2006-11-06 Thread Sion Arrowsmith
<[EMAIL PROTECTED]> wrote: >so i just have tried, even if i think it will not go to the end => i >was wrong : it is around 1.400.000 entries by dict... > >but maybe if keys of dicts are not duplicated in memory it can be done >(as all dicts will have the same keys, with different (count) values)?

Re: python GUIs comparison (want)

2006-11-06 Thread metaperl
[EMAIL PROTECTED] wrote: > Paul Boddie wrote: > > """The figures behind the scenes are quite enlightening for that > particular page. If you (or community experiences) don't agree with the > > rankings (wxPython apparently even easier to learn than PythonCard and > Tinder, a bunch of Gtk-based too

Re: SPE editor slow?

2006-11-06 Thread SPE - Stani's Python Editor
timmy schreef: > hello i've been using the SPE editor on a moderately large project and > it's constantly pausing during editing, like it's attempting to check > something as i edit. > as you can imagine a 4 second pause every few characters is EXTREMELY > annoying when you just want to get some w

Re: Timer Usage

2006-11-06 Thread Grant Edwards
On 2006-11-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm planning to do C++ development together with Python on > Linux. I understand that Linux allows only one timer per > process. Does Python use the Linux timer? No. > If so, how do I use the timer without interfering with Python? --

Re: how do I pass values between classes?

2006-11-06 Thread Max Erickson
"kath" <[EMAIL PROTECTED]> wrote: > hi, Larry Bates thanks for the reply... > >> You might consider doing it the same way wx passes things around. >> When you instantiate the subclass pass the parent class' instance >> as first argument to __init__ method. > > Yes thats absolutely right.. >

Re: Really strange behavior

2006-11-06 Thread Sion Arrowsmith
IloChab <[EMAIL PROTECTED]> wrote: [this works] >def main(): >app = QtGui.QApplication(sys.argv) >qt4reactor.install(app) >MainWindow = QtGui.QMainWindow() >win = Window(MainWindow) >MainWindow.show() >from twisted.internet import reactor >reactor.run() [this doesn't] >

Re: how do I pass values between classes?

2006-11-06 Thread jim-on-linux
Kath, You can use this class to pass values around without concern for conflicts since it has no values of its own. class Kvariable: def setVariable(self, variable): self.output = variable def showVariable(self): print self.output x = Kvariable() y

Re: Python Distilled

2006-11-06 Thread Steven Bethard
Simon Wittber wrote: > I want to build a Python2.5 interpreter for an embedded system. I only > have 4MB of RAM to play with, so I want to really minimise the python > binary. [snip] > Google tells me that people have done this before, back in Python1.5.2 > days. Has anyone tried to do this recentl

Re: string to list of numbers conversion

2006-11-06 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I have a string '((1,2), (3,4))' and I want to convert this into a > python tuple of numbers. But I do not want to use eval() because I do > not want to execute any code in that string and limit it to list of > numbers. here's yet another approach: http://online.effb

Re: Problem with XML-RPC not mounted in /

2006-11-06 Thread Almad
Just FYI, this is bug in CP filter machinery, xmlrpc filter do not apply recursively so do not dispatch reuqest. Quick fix is to xmlrpcfilter.on not only on /ws, but also on /ws/main Regards, Almad -- http://mail.python.org/mailman/listinfo/python-list

Full-time Python DEVELOPER needed - High-transactional environment

2006-11-06 Thread RM
Hello Python users, We are currently looking for a PYTHON DEVELOPER in Cleveland, OH. The full-time position is with a LARGE CLIENT (situated in over 17 countries and headquartered in Cleveland) currently in a high-growth mode and is WORLD's leading Internet Content Providing firm The client offe

Re: MemoDepot: build YOUR OWN online notes library - anything, anytime, anywhere

2006-11-06 Thread metaperl
I'll just use Plone, thanks. ompaniess wrote: > Just like everybody else nowadays, you are facing infinite amount of > information everyday. how can you keep those that truly matters to you? > MemoDepot allows you to do just that, and much more! > > - Capture any information, store as notes in you

Re: ANN: PyQt v4.1 Released

2006-11-06 Thread David Boddie
Tool69 wrote: > I followed the docs to build qscintilla2, all is going well with no > errors, but when I launched the PyQt Syntax Highlighter Example, > nothing is highlighted but the first line of text, whereas the C++ > sample works well in the demo. Do you mean the example from the PyQt4 distr

shutil: permission denied errors on windows

2006-11-06 Thread Antoine De Groote
Google tells quite some things about it, but none of them are satisfactory. I'm on Windows, and shutil operations (e.g. move, copy) throw [Errno 13] Permission denied all the time, for the source files. It seems that this is the case for all my files. But what I don't understand is that yesterd

Re: Really strange behavior

2006-11-06 Thread David Boddie
Sion Arrowsmith wrote: > I don't know if this is the problem or not (knowing neither Qt nor > Twisted), but creWin() creates a window (or two) then throws it > (them?) away on returning to main() (I assume you've chopped > off the bit where main() is actually called). So it's not too > surprising

Re: python GUIs comparison (want)

2006-11-06 Thread John Henry
Yes, from a easy of use standpoint, I agree that PythonCard is very high on the list. Unfortunately there isn't more "activities" as one would like to see. On the other hand, that's typical of open-source projects. We can always roll up our sleeves and do it ourselves. At least the multicolumn

missing collections module

2006-11-06 Thread Shea Martin
I am getting this error in a python script: File "/usr/sfw/lib/python2.3/site-packages/BTL/cache.py", line 12, in ? from collections import deque ImportError: No module named collections Where can I download the python collection module? I am no python programmer, but I can build/instal

Re: missing collections module

2006-11-06 Thread skip
Shea> I am getting this error in a python script: Shea>File "/usr/sfw/lib/python2.3/site-packages/BTL/cache.py", line 12, in ? Shea> from collections import deque Shea> ImportError: No module named collections Shea> Where can I download the python collection module?

Re: Building C extensions

2006-11-06 Thread Martin v. Löwis
Paolo Pantaleo schrieb: > Well I'm just courious: if I want to buid a C extension, I shoul use > the same compiler that has been used to build python (right?). Since > python has been built using Visual C, how can I build an extension if > I don't have Visual Studio? If you don't have mingw32, eit

Plot pkg - Multiple Y axes?

2006-11-06 Thread monkeyboy
Hello, I'm searching for a plotting package that will allow multiple y axes of different scales. For example I'd like to overlay 4 or 5 time series with each series having a separate axis. Does anyone know of such a package? Thank you, Frank -- http://mail.python.org/mailman/listinfo/python-li

Re: how do I pass values between classes?

2006-11-06 Thread Larry Bates
kath wrote: > hi, Larry Bates thanks for the reply... > >> You might consider doing it the same way wx passes things around. >> When you instantiate the subclass pass the parent class' instance >> as first argument to __init__ method. > > Yes thats absolutely right.. > >> That way the subcl

Re: RAW network programming under Windows

2006-11-06 Thread Richard Charts
sturlamolden wrote: > billie wrote: > > > RAW network programming under Windows it's not always possible because > > of the security limitations that microsoft introduced in the latest > > Windows versions and that affects WinSocket API. > > On UNIX systems I'm able to freely send raw packets (for

Re: adding python scripting to my application

2006-11-06 Thread Jerry
I am not a Python guru by any means, but I believe that when an application says that you can "script" their application with Python, it means that you can actually write Python code to interact with the application. Embedding may be the same thing. Extending (as I read it) involves writing porti

Re: tips requested for a log-processing script

2006-11-06 Thread Jaap
Hendrik van Rooyen schreef: > "Jaap" <[EMAIL PROTECTED]> wrote: > > >> Python ers, Thanks! all your replies have been both to the point and helpfull for me. You have proven both Python and it's community are open and welcoming to new users. Jaap -- http://mail.python.org/mailman/listinfo/pyth

building python with utf-8 default encoding?

2006-11-06 Thread [EMAIL PROTECTED]
I am playing around with OpenSwarm and was shocked to see that I cannot build Python with default encoding of utf-8 by passing a flag to configure... did I miss the option for doing so? -- http://mail.python.org/mailman/listinfo/python-list

Re: forwarding *arg parameter

2006-11-06 Thread Steve Holden
Tuomas wrote: > Steven D'Aprano wrote: > >>On Sun, 05 Nov 2006 19:35:58 +, Tuomas wrote: >> >> >> >>>Thanks. My solution became: >>> >>> >>def flattern(arg): >>> >>>... result = [] >>>... for item in arg: >>>... if isinstance(item, (list, tuple)): >>>... result.

Unicode/ascii encoding nightmare

2006-11-06 Thread Thomas W
I'm getting really annoyed with python in regards to unicode/ascii-encoding problems. The string below is the encoding of the norwegian word "fødselsdag". >>> s = 'f\xc3\x83\xc2\xb8dselsdag' I stored the string as "fødselsdag" but somewhere in my code it got translated into the mess above and I

getchar [was: Re: Python-list Digest, Vol 38, Issue 72]

2006-11-06 Thread Steve Holden
Santosh Chikkerur wrote: > Hi Friends, > > How to use getchar( ) in python. I want to see the output of the program > ,step by step. > I have given print statements in between for the results.. > Hence i would like to print the output everytime there is > getchar().which is the > similar fn in p

Re: adding python scripting to my application

2006-11-06 Thread martdi
Jerry wrote: > I am not a Python guru by any means, but I believe that when an > application says that you can "script" their application with Python, > it means that you can actually write Python code to interact with the > application. Embedding may be the same thing. Extending (as I read > it)

auto indent

2006-11-06 Thread M.N.Smadi
Hi there; i have a script that is not indented properly. Is there a way that i can have it auto indented. thanks moe smadi -- http://mail.python.org/mailman/listinfo/python-list

Re: adding python scripting to my application

2006-11-06 Thread John Henry
Take a look at: http://www.swig.org/ Julian wrote: > Hi, first of all, I have to say I am new to Python. I have been working > with a finite element analysis program written in c++. now, I am trying > to 'rebuild' this code (possibly a full re-write) with scripting > capability. I did some readin

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Mark Peters
> The string below is the encoding of the norwegian word "fødselsdag". > > >>> s = 'f\xc3\x83\xc2\xb8dselsdag' I'm not sure which encoding method you used to get the string above. Here's the result of my playing with the string in IDLE: >>> u1 = u'fødselsdag' >>> u1 u'f\xf8dselsdag' >>> s1 = u1.e

Re: building python with utf-8 default encoding?

2006-11-06 Thread Robert Kern
[EMAIL PROTECTED] wrote: > I am playing around with OpenSwarm and was shocked to see that I cannot > build Python with default encoding of utf-8 by passing a flag to > configure... did I miss the option for doing so? No. The default encoding (the return value of sys.getdefaultencoding()) should al

Re: Erronous "unsupported locale setting" ?

2006-11-06 Thread Leo Kislov
robert wrote: > Leo Kislov wrote: > > robert wrote: > >> Why can the default locale not be set by its true name? but only by '' ? : > > > > Probably it is just not implemented. But since locale names are system > > specific (For example windows accepts 'ch' as Chinese in Taiwan, where > > as IANA

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Robert Kern
Thomas W wrote: > I'm getting really annoyed with python in regards to > unicode/ascii-encoding problems. > > The string below is the encoding of the norwegian word "fødselsdag". > s = 'f\xc3\x83\xc2\xb8dselsdag' > > I stored the string as "fødselsdag" but somewhere in my code it got > tran

Re: building python with utf-8 default encoding?

2006-11-06 Thread Jim
[EMAIL PROTECTED] wrote: > I am playing around with OpenSwarm and was shocked to see that I cannot > build Python with default encoding of utf-8 by passing a flag to > configure... did I miss the option for doing so? It is not set when you build but is instead set in sitecustomize.py. But changing

Re: Learning Python

2006-11-06 Thread [EMAIL PROTECTED]
If you have some math knowledge or what to increase it, plus want to use that knowledge as leverage when it comes to learning a computer language, in this case Python, may I suggest my CP4E web page and its many links to math topics, all explored using open source code, mostly Python but also some

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread John Machin
Thomas W wrote: > I'm getting really annoyed with python in regards to > unicode/ascii-encoding problems. > > The string below is the encoding of the norwegian word "fødselsdag". > > >>> s = 'f\xc3\x83\xc2\xb8dselsdag' There is no such thing as "*the* encoding" of any given string. > > I stored t

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread John Machin
Robert Kern wrote: > However, I don't know of an encoding that takes u"fødselsdag" to > 'f\xc3\x83\xc2\xb8dselsdag'. There isn't one. C3 and C2 hint at UTF-8. The fact that C3 and C2 are both present, plus the fact that one non-ASCII byte has morphoploded into 4 bytes indicate a double whammy.

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Andrea Griffini
John Machin wrote: > The fact that C3 and C2 are both present, plus the fact that one > non-ASCII byte has morphoploded into 4 bytes indicate a double whammy. Indeed... >>> x = u"fødselsdag" >>> x.encode('utf-8').decode('iso-8859-1').encode('utf-8') 'f\xc3\x83\xc2\xb8dselsdag' Andrea -- http

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Georg Brandl
Thomas W wrote: > I'm getting really annoyed with python in regards to > unicode/ascii-encoding problems. > > The string below is the encoding of the norwegian word "fødselsdag". > s = 'f\xc3\x83\xc2\xb8dselsdag' Which encoding is this? > I stored the string as "fødselsdag" but somewhere i

sqlite error?

2006-11-06 Thread John Salerno
Am I using the ? placeholder wrong in this example? t = ('hi', 'bye') self.connection.execute("INSERT INTO Personal (firstName, lastName) VALUES ?", t) Traceback (most recent call last): File "C:\Python25\myscripts\labdb\dbapp.py", line 93, in OnSaveRecord self.save_to_database(textf

os x make install dies when compiling zipfile.py on 2.5 and 2.4.4

2006-11-06 Thread metaperl
I've tried both Python 2.4.4 and Python 2.5. I'm trying to build from source and install under a local directory Swarm since OpenSwarm requires builds of Postgres and Python under it's control. Ok, so I did ./configure --prefix=/Users/tbrannon/Documents/Python/Swarm/Python-2.5 but during make in

Re: sqlite error?

2006-11-06 Thread BartlebyScrivener
>> self.connection.execute("INSERT INTO Personal (firstName, lastName) VALUES ?", t) John, I'm no expert, but try self.connection.execute("INSERT INTO Personal (firstName, lastName) VALUES ?, ?", t) -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite error?

2006-11-06 Thread [EMAIL PROTECTED]
John Salerno wrote: > Am I using the ? placeholder wrong in this example? > > > t = ('hi', 'bye') > > self.connection.execute("INSERT INTO Personal (firstName, lastName) > VALUES ?", t) > > > > Traceback (most recent call last): >File "C:\Python25\myscripts\labdb\dbapp.py", line 93, in OnSaveR

Re: WebScraping

2006-11-06 Thread Bernard
yup yup BeautifulSoup is the way to go. what would you like to scrape by the way? Graham Feeley wrote: > Can someone steer me to scripts / modules etc on webscraping please??? > Ultimately I would like someone to write a script for me. > However i am still searching for documentation on this subj

Re: sqlite error?

2006-11-06 Thread John Salerno
[EMAIL PROTECTED] wrote: > John Salerno wrote: >> Am I using the ? placeholder wrong in this example? >> >> >> t = ('hi', 'bye') >> >> self.connection.execute("INSERT INTO Personal (firstName, lastName) >> VALUES ?", t) >> >> >> >> Traceback (most recent call last): >>File "C:\Python25\myscript

assigning values in __init__

2006-11-06 Thread John Salerno
Let's say I'm making a game and I have this base class: class Character(object): def __init__(self, name, stats): self.name = name self.strength = stats[0] self.dexterity = stats[1] self.intelligence = stats[2] self.luck = stats[3] Is this a good

Re: auto indent

2006-11-06 Thread Larry Bates
M.N.Smadi wrote: > Hi there; > > i have a script that is not indented properly. Is there a way that i can > have it auto indented. > > thanks > moe smadi Not really. Indention in python conveys blocks so there is no way anything automatic could determine where blocks end. Its just like asking

sound processing modules in python - anyone?

2006-11-06 Thread sittner
Hi everyone, I'm looking for a module for sound processing (manipulating sound objets, filters, ffts etc.). I tried Snack, but when i downloaded the package that was supposed to be for python, there was only the Tk/Tcl stuff (where's the .py ?). could anyone help me with that (or with any other sou

Re: assigning values in __init__

2006-11-06 Thread Larry Bates
John Salerno wrote: > Let's say I'm making a game and I have this base class: > > class Character(object): > > def __init__(self, name, stats): > self.name = name > self.strength = stats[0] > self.dexterity = stats[1] > self.intelligence = stats[2] > se

Re: assigning values in __init__

2006-11-06 Thread Gerard Flanagan
John Salerno wrote: > Let's say I'm making a game and I have this base class: > > class Character(object): > > def __init__(self, name, stats): > self.name = name > self.strength = stats[0] > self.dexterity = stats[1] > self.intelligence = stats[2] >

you can erase me last message - a mistake....

2006-11-06 Thread sittner
you can erase the message about python sound modules, my mistake. thanks, g -- http://mail.python.org/mailman/listinfo/python-list

Re: Projecting MUD maps

2006-11-06 Thread Gabriel Genellina
At Sunday 5/11/2006 19:32, BJörn Lindqvist wrote: >Hello, I'm looking for an algorithm to project "MUD maps" such as the >following map: http://www.aww-mud.org/maps/MUD_Maps/Caerin-colour.jpg > >MUD:s consists of rooms, each rooms has up to four orthogonal edges >(north, east, west and south) that

Re: Learning Python

2006-11-06 Thread Luis M. González
kaushal wrote: > Hi > > How do i start Learning Python,is there any reference material which I > can refer since I dont have > any programming experience > > Thanks and Regards > > Kaushal If you have no programming experience at all, I highly recomend "Non Programmers Tutorial for Python" by Jos

Re: forwarding *arg parameter

2006-11-06 Thread Tuomas
Steve Holden wrote: > Suppose you did actually want to do this you have chosen about the worst > possible way: the use of global variables to condition function > execution is a sure way to get into trouble. Consider if somebody else > want to use your function: they also have to set a global in

Re: SPE editor slow?

2006-11-06 Thread timmy
SPE - Stani's Python Editor wrote: > timmy schreef: > > >>hello i've been using the SPE editor on a moderately large project and >>it's constantly pausing during editing, like it's attempting to check >>something as i edit. >>as you can imagine a 4 second pause every few characters is EXTREMELY >

python-ldap/win32 or python/ldap/win32

2006-11-06 Thread rcmn
i'm running around in circle trying to to use python/ldap/ on win32(WinXP). I want to write a script that read SQL data(no pbm) and insert member in a AD group(pbm).I used the module Active_Directory(very easy to use).but it read only AD. So i have been try to install python-ldap on a win32/python2

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Thomas W
Ok, I've cleaned up my code abit and it seems as if I've encoded/decoded myself into a corner ;-). My understanding of unicode has room for improvement, that's for sure. I got some pointers and initial code-cleanup seem to have removed some of the strange results I got, which several of you also po

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread John Machin
Thomas W wrote: > Ok, I've cleaned up my code abit and it seems as if I've > encoded/decoded myself into a corner ;-). My understanding of unicode > has room for improvement, that's for sure. I got some pointers and > initial code-cleanup seem to have removed some of the strange results I > got, w

Re: simple way to un-nest (flatten?) list

2006-11-06 Thread djc
George Sakkis wrote: > Meet itertools: > > from itertools import chain > names = set(chain(*r.itervalues())) > print [line for line in table if line[7] in names] Steven D'Aprano wrote: > Assuming you don't care what order the strings are in: > > r = {'a':('ASLIB','Aslib'),'j':('JDOC','jdoc')

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread John Machin
Andrea Griffini wrote: > John Machin wrote: > > > The fact that C3 and C2 are both present, plus the fact that one > > non-ASCII byte has morphoploded into 4 bytes indicate a double whammy. > > Indeed... > > >>> x = u"fødselsdag" > >>> x.encode('utf-8').decode('iso-8859-1').encode('utf-8') > 'f\

Re: Wait for keyboard input

2006-11-06 Thread Gabriel Genellina
At Monday 6/11/2006 09:58, Santosh Chikkerur wrote: How to use getchar( ) in python. I want to see the output of the program ,step by step. I have given print statements in between for the results.. Hence i would like to print the output everytime there is getchar().which is the similar fn in

ctypes, python 2.5, WinFunctionType and _as_parameter_

2006-11-06 Thread gerard5609
Hello, how to get at the function address of a WinFunctionType ctypes object ? With ctypes 1.0, I used just myfunc._as_parameter_ and all was well. With ctypes 1.0.1, that ships with python 2.5, WinFunctionType has no longer an _as_parameter_ attribute Where in the ChangeLog and the documentation

  1   2   >