Re: How to convert between Japanese coding systems?

2009-02-18 Thread Peter Otten
Dietrich Bollmann wrote: > I get the strings (which actually are emails) from a server on the > internet with: > > import urllib > server = urllib.urlopen(serverURL, parameters) > email = server.read() > > The coding systems are given in the response string: > > Example: > > email = '''[

Re: v 3.0 mpkg

2009-02-18 Thread Stephen Hansen
> Follow up: Python 3.0.1 has been released and, with it, an installer > image for OS X: > > > How doe the 3.0 installer on the mac interact with existing installs? I have the system install but more importantly the python.org one which I can't hav

Re: v 3.0 mpkg

2009-02-18 Thread Ned Deily
In article <8c7f10c60902040337q617a37bfr9ec937b38e433...@mail.gmail.com>, Simon Brunning wrote: > 2009/2/4 John Forse : > > Does anyone know if Python v3.0 is available as an .mpkg installer for Mac > > 10.5.6. I have used 2.5 & updated to 2.6.1 this way, but can't find any > > reference to one

How to convert between Japanese coding systems?

2009-02-18 Thread Dietrich Bollmann
Hi, Are there any functions in python to convert between different Japanese coding systems? I would like to convert between (at least) ISO-2022-JP, UTF-8, EUC-JP and SJIS. I also need some function to encode / decode base64 encoded strings. I get the strings (which actually are emails) from a s

Re: Python Module for console text formatting?

2009-02-18 Thread alex goretoy
I created a little script for doing stdout coloring for me a while back. Maybe this will get you closer to what you are looking for. It's kinda hackish, but it works. http://code.google.com/p/python-stdout-colors/ -Alex Goretoy http://www.goretoy.com On Wed, Feb 18, 2009 at 10:22 PM, srinivasa

Re: Building python with sqlite3

2009-02-18 Thread Justin Li
On Feb 18, 6:29 pm, Justin Li wrote: > On Feb 18, 5:13 pm, Christian Heimes wrote: > > > Justin Li schrieb: > > > > I'm building and installing Ptyhon 2.6.1 on Linux. After configure, > > > make, make install, to importsqlite3leads to ImportError. It looks > > > like I have to build Python with s

Problem--Extending the behavior of an upstream package

2009-02-18 Thread Carl Banks
Ok, I think I know I want to do this, but I thought I'd run it by yins guys I have a fairly large and complex application with two top-level packages, which we'll call upstream and mine. The "upstream" package isn't really upstream. I own both packages, but I think of the upstream package as a t

Re: multiprocessing module and os.close(sys.stdin.fileno())

2009-02-18 Thread Graham Dumpleton
On Feb 19, 1:16 pm, Jesse Noller wrote: > On Tue, Feb 17, 2009 at 10:34 PM, Graham Dumpleton > > > > wrote: > > Why is the multiprocessing module, ie., multiprocessing/process.py, in > > _bootstrap() doing: > > >  os.close(sys.stdin.fileno()) > > > rather than: > > >  sys.stdin.close() > > > Tech

Re: Revision Control

2009-02-18 Thread Matt Nordhoff
Tim Chase wrote: >> -Mercurial (this is a big up and coming RCS) > > This is currently my favorite: good branching/merging, fast, written > mostly in Python (one C extension module, IIRC), and a simple interface > >> -Bazaar (written in Python. Also pretty new. I don't know about Windows >> s

Re: Python Module for console text formatting?

2009-02-18 Thread srinivasan srinivas
Hi, Is it possible to apply more than one formatting to a string? For ex: the string 'test' has to be underlined and it should be bold. How to do that? Thanks, Srini From: geremy condra To: python-list@python.org Sent: Wednesday, 18 February, 2009 10:04:34 AM

Re: block dynamic attribute creation (was: get descriptor from instance)

2009-02-18 Thread Alan G Isaac
On 2/18/2009 6:15 PM Gabriel Genellina apparently wrote: type(a).x OK, that's good. I'd like to sometimes lock attribute creation on instances of a class but still allow properties to function correctly. Will something like below be satisfactory? Thanks, Alan def __setattr__(self, attr, v

Re: "Maximum recursion depth exceeded"...why?

2009-02-18 Thread rdmurray
Thomas Allen wrote: > On Feb 18, 4:51 am, alex23 wrote: > > On Feb 18, 7:34 pm, rdmur...@bitdance.com wrote: > > > > > Yeah, but wget -r -k will do that bit of it, too. > > > > Wow, nice, I don't know why I never noticed that. Cheers! > > Hm...doesn't do that over here. I thought it may have bee

Re: Timeit

2009-02-18 Thread Steven D'Aprano
On Wed, 18 Feb 2009 17:35:16 -0800, cokofreedom wrote: > I am really stuck trying to work out how to pass variables to timeit to > allow me to run any of the examples... setup = "from __main__ import example1, example2, example3" Timer("example1()", setup) In Python 2.6 you can also pass functi

Re: Building python with sqlite3

2009-02-18 Thread Justin Li
On Feb 18, 5:13 pm, Christian Heimes wrote: > Justin Li schrieb: > > > I'm building and installing Ptyhon 2.6.1 on Linux. After configure, > > make, make install, to import sqlite3 leads to ImportError. It looks > > like I have to build Python with sqlite. I have sqlite3 installed on > > my system

Re: Threading and tkinter

2009-02-18 Thread Steve Holden
gert wrote: > Can you first explain why x stay's 0 please and how i should update x > using threads ? > > from tkinter import * > from _thread import start_new_thread > from time import sleep > > x=0 > def weegbrug(x): > while True: > x=x+1 > sleep(0.5) > start_new_thread(weeg

Re: multiprocessing module and os.close(sys.stdin.fileno())

2009-02-18 Thread Jesse Noller
On Tue, Feb 17, 2009 at 10:34 PM, Graham Dumpleton wrote: > Why is the multiprocessing module, ie., multiprocessing/process.py, in > _bootstrap() doing: > > os.close(sys.stdin.fileno()) > > rather than: > > sys.stdin.close() > > Technically it is feasible that stdin could have been replaced with

Re: numpy.memmap advice?

2009-02-18 Thread Carl Banks
On Feb 18, 4:23 pm, sturlamolden wrote: > On 18 Feb, 00:08, Lionel wrote: > > > 1) What is "recarray"? > > An ndarray of what C programmers know as a "struct", in which each > field is accessible by its name. > > That is, > > struct rgba{ >   unsigned char r; >   unsigned char g; >   unsigned cha

Re: PyYaml in standard library?

2009-02-18 Thread Jesse Noller
On Wed, Feb 18, 2009 at 4:11 AM, Brendan Miller wrote: > I'm just curious whether PyYaml is likely to end up in the standard > library at some point? > -- > http://mail.python.org/mailman/listinfo/python-list > Personally, loving the hell out of yaml (and pyyaml) as much as I do, I'd love to see

Re: Threading and tkinter

2009-02-18 Thread gert
Can you first explain why x stay's 0 please and how i should update x using threads ? from tkinter import * from _thread import start_new_thread from time import sleep x=0 def weegbrug(x): while True: x=x+1 sleep(0.5) start_new_thread(weegbrug,(x,)) root = Tk() v = StringVar(

Re: Calling a class instance like a function

2009-02-18 Thread Uberman
Thank you very much, Filip!! :) Filip Gruszczyński wrote: > __call__ > > 2009/2/19 Uberman : >> I'm wondering if there's a way to invoke a "function" operator on a Python >> class instance. For example, given a class instance: >> >>myClass = MyClass() >> >> I want to call that instance

Re: PyYaml in standard library?

2009-02-18 Thread Paul Rubin
Brendan Miller writes: > I think the json module sticks everything on the same line, which > isn't readable for large data structures. It has a prettyprint option. -- http://mail.python.org/mailman/listinfo/python-list

Re: can multi-core improve single funciton?

2009-02-18 Thread sturlamolden
On Feb 10, 7:28 am, oyster wrote: > I mean this > [code] > def fib(n): >     if n<=1: >         return 1 >     return fib(n-1)+fib(n-2) Let's rewrite that slightly and see... def fib(n, _map=None): if not _map: _map = map if n > 2: return sum(_map(fib, (n-1, n-2))) else:

Timeit

2009-02-18 Thread cokofreedom
I've having an annoying problem at the moment. I'm writing code for the travelling salesmen problem and comparing different techniques. But I've having a problem using timeit. I have a file called "testplatform.py" that contains 4 class: Test() - which is called first to create the cities/routes t

Re: Threading and tkinter

2009-02-18 Thread Scott David Daniels
gert wrote: After reading the docs and seeing a few examples i think this should work ? Am I forgetting something here or am I doing something stupid ? Anyway I see my yellow screen, that has to count for something :) Try this: # tdh_show.py from __future__ import with_statement import time im

Re: can multi-core improve single funciton?

2009-02-18 Thread sturlamolden
On Feb 10, 8:38 am, Paul McGuire wrote: > Even worse than linear, the function is recursive, which as I > understand it, is inherently a no-no when looking for code that is > parallel-friendly. There is no way to parallelize Fibonacci numbers computed with linear time complexity, as we must know

Re: os.popen encoding!

2009-02-18 Thread SMALLp
Thanks for help! My problem was actualy: >>> a = ["velja\xe8a 2009"] >>> print a#will print ["velja\xe8a 2009"] >>> Print a[0]#will print veljaèa 2009 "Hrvoje Niksic" wrote in message news:87ocwzzvym@mulj.homelinux.net... > "Gabriel Genellina" writes: > >>> I'm playing with os.pope

Re: Calling a class instance like a function

2009-02-18 Thread Filip Gruszczyński
__call__ 2009/2/19 Uberman : > I'm wondering if there's a way to invoke a "function" operator on a Python > class instance. For example, given a class instance: > >myClass = MyClass() > > I want to call that instance like a function, with an argument value: > >myClass(5.0) > > I c

Re: SVN/CVS and Branching

2009-02-18 Thread andrew cooke
maybe this is just me, but i don't have a clue what your problem is. what does "starting imports all over the place" mean? what do you mean by "retired"? i use svn with python in exactly the same way as with java (and, i thought, in the same way as anyone uses svn with any language; java uses t

Calling a class instance like a function

2009-02-18 Thread Uberman
I'm wondering if there's a way to invoke a "function" operator on a Python class instance. For example, given a class instance: myClass = MyClass() I want to call that instance like a function, with an argument value: myClass(5.0) I can override the "()" operator in C++, so I'm

Re: Threading and tkinter

2009-02-18 Thread gert
On Feb 18, 8:25 am, "Hendrik van Rooyen" wrote: > "gert" wrote: > > > After reading the docs and seeing a few examples i think this should > > work ? > > Am I forgetting something here or am I doing something stupid ? > > Anyway I see my yellow screen, that has to count for something :) > > > from

Re: Can't get the IPYthon ipapi object working

2009-02-18 Thread beetlecube
On Feb 18, 3:12 pm, Robert Kern wrote: > On 2009-02-18 15:49, beetlecube wrote: > > > > > Hi , I found out from a random google search that I could use IPython > > to automatically import modules so that I could test Django views. > > > I downloaded it (WIN XP), installed it.  I'm able to import i

Re: Newbie Q about Turtle Gfx

2009-02-18 Thread Neil
Thanks everyone! It appears the info in the book is wrong. Trying what you have all suggested has got it to work! Many thanks, and I am sure I will be back here again with other newbie problems! Neil "Neil" wrote in message news:ifidnr_gysdmfqhunz2dnekdnzzin...@bt.com... > Hello > > Sorry if

Re: numpy.memmap advice?

2009-02-18 Thread sturlamolden
On 18 Feb, 00:08, Lionel wrote: > 1) What is "recarray"? An ndarray of what C programmers know as a "struct", in which each field is accessible by its name. That is, struct rgba{ unsigned char r; unsigned char g; unsigned char b; unsigned char a; }; struct rgba arr[480][640]; is simi

Re: Newbie Q about Turtle Gfx

2009-02-18 Thread Mensanator
On Feb 18, 4:16 pm, "Neil" wrote: > Hello > > Sorry if this is not an appropriate newsgroup for this problem. I am very > new to Python but not new to programming. > > I am hoping to use Python to teach a class and have been looking at the > online book 'Snake Wrangling for Kids'. > > I have follo

Re: get descriptor from instance

2009-02-18 Thread Gabriel Genellina
En Wed, 18 Feb 2009 20:48:17 -0200, Alan G Isaac escribió: What is a reliable way to get the the property object for an instance attribute? (Or more generally, to get the descriptor controlling an attribute?) If class ``A`` defines the property ``x`` and ``a`` in an instance of ``A``, then y

Re: PyGTK install

2009-02-18 Thread Lionel
On Feb 18, 3:03 pm, Lionel wrote: > On Feb 18, 2:08 pm, Lionel wrote: > > > > > > > On Feb 18, 11:43 am, Lionel wrote: > > > > Hello folks, I couldn't find a specific PyGTK forum so I thought I'd > > > post here and hope someone new the answer. I feel it's a silly > > > problem, maybe something

Re: Can't get the IPYthon ipapi object working

2009-02-18 Thread Robert Kern
On 2009-02-18 15:49, beetlecube wrote: Hi , I found out from a random google search that I could use IPython to automatically import modules so that I could test Django views. I downloaded it (WIN XP), installed it. I'm able to import it, but I just can't seem to get the object working. The co

fcntl.fcntl breaking on 64bit

2009-02-18 Thread PK
Hello Friends: I'm running into issues with using fcntl on a 64 bit servers. Python version: 2.4.3 system Arch: # uname -m x86_64 code keeps erroring out with: fcntl.fcntl(fd, rhn_fcntl.F_SETLKW, UNLOCK) IOError: [Errno 22] Invalid argument The same python code block runs fine on a i386/686.

Re: PyGTK install

2009-02-18 Thread Lionel
On Feb 18, 2:08 pm, Lionel wrote: > On Feb 18, 11:43 am, Lionel wrote: > > > > > > > Hello folks, I couldn't find a specific PyGTK forum so I thought I'd > > post here and hope someone new the answer. I feel it's a silly > > problem, maybe something to do with a path variable? The problem: I've >

Re: Newbie Q about Turtle Gfx

2009-02-18 Thread Scott David Daniels
Neil wrote: Forgot to say, that after the error message the turtle window 'hangs' as unresponsive ... "Neil" wrote in message news:ifidnr_gysdmfqhunz2dnekdnzzin...@bt.com... Hello I am hoping to use Python to teach a class and have been looking at the online book 'Snake Wrangling for Kids'.

get descriptor from instance

2009-02-18 Thread Alan G Isaac
What is a reliable way to get the the property object for an instance attribute? (Or more generally, to get the descriptor controlling an attribute?) If class ``A`` defines the property ``x`` and ``a`` in an instance of ``A``, then you can just use ``type(a).__dict__['x']`` to get the property ob

SVN/CVS and Branching

2009-02-18 Thread Jeff Dyke
Hello. I am curious about different ideas on how you handle branching your python projects. With some other languages this is trivial, but since python uses these directories as modules and i have the top level module starting imports all over the place, i am wondering what others do. In the pas

Re: number theory libraries / project euler

2009-02-18 Thread Mensanator
On Feb 18, 2:18 pm, eliben wrote: > Hello, > > What are some good & recommended number theory libs for Python (or > accessible interfaces to C libs), for things like primes, > factorization, etc. Naturally, speed is of utmost importance here. > > In other words, which Python libraries and tools to

Re: PyYaml in standard library?

2009-02-18 Thread Brendan Miller
On Wed, Feb 18, 2009 at 1:34 AM, Chris Rebert wrote: > On Wed, Feb 18, 2009 at 1:11 AM, Brendan Miller wrote: >> I'm just curious whether PyYaml is likely to end up in the standard >> library at some point? > > I don't personally have a direct answer to your question, but I can > point out that J

Re: number theory libraries / project euler

2009-02-18 Thread Paul Rubin
eliben writes: > What are some good & recommended number theory libs for Python (or > accessible interfaces to C libs), for things like primes, > factorization, etc. Naturally, speed is of utmost importance here. The idea of Project Euler is you are supposed to find clever enough methods to solve

Re: Newbie Q about Turtle Gfx

2009-02-18 Thread Neil
Thanks for the very speedy reply! Not sure what your reply means but I have emailed the author with the problem! Cheers Neil "sjbrown" wrote in message news:9ba48cb7-d32b-40ef-a6a6-d22508863...@l33g2000pri.googlegroups.com... It looks like there may be a bug if you were expecting t to be som

Re: Revision Control

2009-02-18 Thread Tim Wintle
On Wed, 2009-02-18 at 09:08 -0800, Sam Clark wrote: > Any suggestions for a beginer on what to use for version control? > It's just me, the lone person programming. I've already nailed one > "version" of my code accidentaly. MS VSS is too expensive for the > stuff I'm doing, plus I really don't l

Re: Directory

2009-02-18 Thread gtillmon
On Feb 18, 8:15 am, Steve Holden wrote: > gtillmon wrote: > > Hello.  I am new to the Python language. > > I would like to know how to display and store the path of each mondule > > that is called. > > Modules are imported, not called. > > > Similar to the old READY TRACE in COBOL of long ago. > >

Re: Directory

2009-02-18 Thread gtillmon
On Feb 18, 3:39 pm, "Gabriel Genellina" wrote: > En Wed, 18 Feb 2009 12:15:25 -0200, Steve Holden   > escribió: > > > gtillmon wrote: > >> I would like to know how to display and store the path of each mondule > >> that is called. > > It's certainly possible to trace function calls, if that would

Re: Newbie Q about Turtle Gfx

2009-02-18 Thread sjbrown
It looks like there may be a bug if you were expecting t to be some object other than a dict. You can apparently contact the authour here: http://www.briggs.net.nz/log/contact/ On Feb 18, 2:16 pm, "Neil" wrote: > Hello > > Sorry if this is not an appropriate newsgroup for this problem. I am ver

Re: Delete lines which contain string in a file

2009-02-18 Thread Steve Holden
Rudi Goldman wrote: > Hi, > Go easy on me as I am a new to Python and am trying to solve a practical > problem that is driving me bananas. > Basically I have 2 text files, a source and a target. I want to be able > to delete all of the lines in the target file which contain text from > any line in

Re: Newbie Q about Turtle Gfx

2009-02-18 Thread Neil
Forgot to say, that after the error message the turtle window 'hangs' as unresponsive ... "Neil" wrote in message news:ifidnr_gysdmfqhunz2dnekdnzzin...@bt.com... > Hello > > Sorry if this is not an appropriate newsgroup for this problem. I am very > new to Python but not new to programming. >

Newbie Q about Turtle Gfx

2009-02-18 Thread Neil
Hello Sorry if this is not an appropriate newsgroup for this problem. I am very new to Python but not new to programming. I am hoping to use Python to teach a class and have been looking at the online book 'Snake Wrangling for Kids'. I have followed the example >>>import turtle >>>t=turtle.pe

Re: PyGTK install

2009-02-18 Thread Lionel
On Feb 18, 11:43 am, Lionel wrote: > Hello folks, I couldn't find a specific PyGTK forum so I thought I'd > post here and hope someone new the answer. I feel it's a silly > problem, maybe something to do with a path variable? The problem: I've > downloaded the "all-in-one" windows binary installer

Re: Searching Google?

2009-02-18 Thread Tim Wintle
On Wed, 2009-02-18 at 13:36 +0100, Johannes Bauer wrote: > Curt Hash schrieb: > > > You just need to change your User-Agent so that Google doesn't know a > > Python script is making the request: > > Why would Google not send a response if the User-Agent header field is > not a recognized browser?

Can't get the IPYthon ipapi object working

2009-02-18 Thread beetlecube
Hi , I found out from a random google search that I could use IPython to automatically import modules so that I could test Django views. I downloaded it (WIN XP), installed it. I'm able to import it, but I just can't seem to get the object working. The code: --- t

PyTypeObject subclass

2009-02-18 Thread Aaron Brady
Hi, Is it ok to subclass PyTypeObject, so that my custom 'tp_' fields can appear at the bottom of it? Is there anything like size requirements going on in its code? Or is it better to use 'tp_dict' or slots? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Delete lines which contain string in a file

2009-02-18 Thread Rudi Goldman
Hi, Go easy on me as I am a new to Python and am trying to solve a practical problem that is driving me bananas. Basically I have 2 text files, a source and a target. I want to be able to delete all of the lines in the target file which contain text from any line in the source file. i.e. Source:

Re: Directory

2009-02-18 Thread Gabriel Genellina
En Wed, 18 Feb 2009 12:15:25 -0200, Steve Holden escribió: gtillmon wrote: I would like to know how to display and store the path of each mondule that is called. It's certainly possible to trace function calls, if that would help. sys.settrace allows you to establish a function that gets ca

Re: Musings: Using decorators to reduce duplicate exception handling

2009-02-18 Thread Cameron Simpson
On 17Feb2009 15:12, J Kenneth King wrote: | I recently started a project called TracShell | (http://code.google.com/p/tracshell) where I make heavy use of the | xmlrpclib core module. | | When the number of RPC calls was small, wrapping each call in try/except | was acceptable. [...] | To combat

Re: numpy.memmap advice?

2009-02-18 Thread Carl Banks
On Feb 18, 10:48 am, Lionel wrote: > Thanks Carl, I like your solution. Am I correct in my understanding > that memory is allocated at the slicing step in your example i.e. when > "reshaped_data" is sliced using "interesting_data = reshaped_data[:, > 50:100]"? In other words, given a huge (say 1Gb

Re: number theory libraries / project euler

2009-02-18 Thread andrew cooke
eliben wrote: > Hello, > > What are some good & recommended number theory libs for Python (or > accessible interfaces to C libs), for things like primes, > factorization, etc. Naturally, speed is of utmost importance here. i just read the project site and one of the things they say on their front

Re: number theory libraries / project euler

2009-02-18 Thread Kurt Smith
On Wed, Feb 18, 2009 at 2:18 PM, eliben wrote: > > Hello, > > What are some good & recommended number theory libs for Python (or > accessible interfaces to C libs), for things like primes, > factorization, etc. Naturally, speed is of utmost importance here. > > In other words, which Python librari

Re: Pythonic way to determine if one char of many in a string

2009-02-18 Thread Peter Otten
Steve Holden wrote: > Jervis Whitley wrote: >>> What happens when you have hundreds of megabytes, I don't know. >>> >>> >> I hope I never have to test a word that is hundreds of megabytes long >> for a vowel :) > > I see you don't speak German ;-) I tried to come up with a funny way to point out

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-18 Thread Josh Dukes
You might also want to look in to open cascade. It supports a bunch of standard 3d model formats (stl, iges, step) and has python bindings. Salome is based on open cascade. http://www.pythonocc.org/ However, I'm not entirely clear on the license for this so that might be an issue. I know the Debian

number theory libraries / project euler

2009-02-18 Thread eliben
Hello, What are some good & recommended number theory libs for Python (or accessible interfaces to C libs), for things like primes, factorization, etc. Naturally, speed is of utmost importance here. In other words, which Python libraries and tools to you use to help you solve Project Euler proble

Re: Pythonic way to determine if one char of many in a string

2009-02-18 Thread Peter Otten
Steven D'Aprano wrote: > On Wed, 18 Feb 2009 07:08:04 +1100, Jervis Whitley wrote: > > >>> This moves the for-loop out of slow Python into fast C and should be >>> much, much faster for very large input. >>> >>> >> _Should_ be faster. > > Yes, Python's timing results are often unintuitive. Ind

Re: Pythonic way to determine if one char of many in a string

2009-02-18 Thread Steve Holden
Jervis Whitley wrote: >> What happens when you have hundreds of megabytes, I don't know. >> >> > I hope I never have to test a word that is hundreds of megabytes long > for a vowel :) I see you don't speak German ;-) -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

PyGTK install

2009-02-18 Thread Lionel
Hello folks, I couldn't find a specific PyGTK forum so I thought I'd post here and hope someone new the answer. I feel it's a silly problem, maybe something to do with a path variable? The problem: I've downloaded the "all-in-one" windows binary installer for PyGTK from their website. After typing

Re: Pythonic way to determine if one char of many in a string

2009-02-18 Thread Jervis Whitley
> > What happens when you have hundreds of megabytes, I don't know. > > I hope I never have to test a word that is hundreds of megabytes long for a vowel :) -- http://mail.python.org/mailman/listinfo/python-list

PIL install driving me mad! With solution!

2009-02-18 Thread bleah
I'm trying to get PIL 1.16 installed on a SUSE SLES10 system, and cannot, for the life of me, get the thing to compile with jpeg support. The libjpeg-devel libraries are installed, and are present in /usr/lib JUST WHERE SPECIFIED in the setup.py file, and the jpeglib.h incliude file is present JU

Re: numpy.memmap advice?

2009-02-18 Thread Lionel
On Feb 18, 12:56 am, Carl Banks wrote: > On Feb 17, 3:08 pm, Lionel wrote: > > > > > > > Hello all, > > > On a previous thread (http://groups.google.com/group/comp.lang.python/ > > browse_thread/thread/64da35b811e8f69d/67fa3185798ddd12? > > hl=en&lnk=gst&q=keene#67fa3185798ddd12) I was asking abo

Re: Revision Control

2009-02-18 Thread Tim Chase
-CVS (One of the first RCS, I think most projects are moving away from this one.) I wouldn't suggest starting a new project with CVS. Subversion (svn) resolves several of the main issues with it, so using SVN instead wins over CVS in just about every possible way. - Subversion-(pretty popu

Re: Revision Control

2009-02-18 Thread skip
>> Any suggestions for a beginer on what to use for version control? Chris> I like Mercurial (hg) personally... Me too. It's perfect for little one-person things. (It's probably good for other stuff as well, but I certainly like how easy it is to use for standalone stuff.) -- Skip Mo

Re: "Maximum recursion depth exceeded"...why?

2009-02-18 Thread Thomas Allen
On Feb 18, 4:51 am, alex23 wrote: > On Feb 18, 7:34 pm, rdmur...@bitdance.com wrote: > > > Yeah, but wget -r -k will do that bit of it, too. > > Wow, nice, I don't know why I never noticed that. Cheers! Hm...doesn't do that over here. I thought it may have been because of absolute links (not to s

Re: how to list all installed modules

2009-02-18 Thread Scott David Daniels
harryos wrote: Is there a way to list all the installed modules in my python installation.I recently installed pygame and when i tried to import it like import pygame it complained that no such module was found.I can see the pygame directory in F:\Python25\Lib\site-packages in my machine,but am

Re: Revision Control

2009-02-18 Thread Benjamin Kaplan
On Wed, Feb 18, 2009 at 12:08 PM, Sam Clark wrote: > Any suggestions for a beginer on what to use for version control? It's > just me, the lone person programming. I've already nailed one "version" of > my code accidentaly. MS VSS is too expensive for the stuff I'm doing, plus > I really don

Re: why do I get name not defined error

2009-02-18 Thread Peter Otten
zaheer.ag...@gmail.com wrote: > I have the following declared in my class, I am trying tp call a > method defined in the same class > I am not sure why I am getting name not defined error Assuming this is part of a method def method(self): > if options.uploadFile != None : > print

Re: why do I get name not defined error

2009-02-18 Thread Diez B. Roggisch
zaheer.ag...@gmail.com schrieb: Hi, I have the following declared in my class, I am trying tp call a method defined in the same class I am not sure why I am getting name not defined error if options.uploadFile != None : print "This is path", the_rest filePath = the_rest

why do I get name not defined error

2009-02-18 Thread zaheer . agadi
Hi, I have the following declared in my class, I am trying tp call a method defined in the same class I am not sure why I am getting name not defined error if options.uploadFile != None : print "This is path", the_rest filePath = the_rest UploadFile(None,filePath) de

Re: Revision Control

2009-02-18 Thread Chris Rebert
On Wed, Feb 18, 2009 at 9:08 AM, Sam Clark wrote: > Any suggestions for a beginer on what to use for version control? It's > just me, the lone person programming. I've already nailed one "version" of > my code accidentaly. MS VSS is too expensive for the stuff I'm doing, plus > I really don't

Re: how to list all installed modules

2009-02-18 Thread harryos
On Feb 18, 9:42 pm, Peter Otten <__pete...@web.de> wrote: > >>> help("modules") thanks Peter.That helped. > Regarding the original problem, do you have multiple Python installations? > If so, you may accidentally be running the "wrong" python. I have only one installation.It shows all other modul

Revision Control

2009-02-18 Thread Sam Clark
Any suggestions for a beginer on what to use for version control? It's just me, the lone person programming. I've already nailed one "version" of my code accidentaly. MS VSS is too expensive for the stuff I'm doing, plus I really don't like MS much... Any free open source stuff out there?

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-18 Thread Zamnedix
On Feb 9, 12:58 pm, rantingrick wrote: > Hello all, > > It has long been my dream to create an open source 3D CAD program and > i am starting to crawl my way into the first steps. I now believe i am > ready to start this endeavor and i am currently looking for fellow > Python programmers (no matte

Re: how to list all installed modules

2009-02-18 Thread Peter Otten
harryos wrote: > Is there a way to list all the installed modules in my python > installation.I recently installed pygame and when i tried to import it > like >>>import pygame > it complained that no such module was found.I can see the pygame > directory in F:\Python25\Lib\site-packages in my mach

how to list all installed modules

2009-02-18 Thread harryos
hi Is there a way to list all the installed modules in my python installation.I recently installed pygame and when i tried to import it like >>import pygame it complained that no such module was found.I can see the pygame directory in F:\Python25\Lib\site-packages in my machine,but am unable to imp

Re: Crypto headaches.

2009-02-18 Thread SamG
On Feb 18, 7:10 pm, "M.-A. Lemburg" wrote: > On 2009-02-18 14:23, SamG wrote: > > > Hi, > > > Using the python's Crypto.Cipher.Blowfish is create and encrypted file > > in the CBC mode. Now... when try to decrypt it with OpenSSL i get an > > error stating "bad magic number". > > Are you getting th

Re: Best practice for upgrading the version of SQLite bundled with Python 2.6.1

2009-02-18 Thread python
Gabriel, > At least on Windows, you only have to replace sqlite3.dll (in the DLLs > directory) with the new one, and that's all. That's easy! :) Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads in PyGTK: keep typing while ping-ing

2009-02-18 Thread bieffe62
On 17 Feb, 02:53, Mamahita Sela wrote: > Dear FB, > > > As you have been already told, join() blocks until the > > thread is > > terminated. and you should avoid that. > > A simple fix could by add a timeout to t.join, doing > > something like : > >         t.join(JOIN_TIMEOUT); > >         if not

Re: Searching Google?

2009-02-18 Thread Alex
On Feb 18, 1:36 pm, Johannes Bauer wrote: > Curt Hash schrieb: > > > You just need to change your User-Agent so that Google doesn't know a > > Python script is making the request: > > Why would Google not send a response if the User-Agent header field is > not a recognized browser? Because making

Re: Musings: Using decorators to reduce duplicate exception handling

2009-02-18 Thread J Kenneth King
"Gabriel Genellina" writes: > En Tue, 17 Feb 2009 21:12:57 -0200, J Kenneth King > escribió: > >> I recently started a project called TracShell >> (http://code.google.com/p/tracshell) where I make heavy use of the >> xmlrpclib core module. >> >> When the number of RPC calls was small, wrapping

Re: Python-list Digest, Vol 65, Issue 365

2009-02-18 Thread Steve Holden
M Kumar wrote: > > I think the given statement below will give you what you r looking > .__file__print > [followed by a whole Python list digest] When replying to a question from a digest posting, PLEASE change the subject line and only quote the relevant piece of the original posting. Thank you

Re: _socket.so source?

2009-02-18 Thread mbarry
On Feb 17, 6:47 pm, Christian Heimes wrote: > mbarry schrieb: > > > Hello, > > > The socket module in Python uses_socket.so for most of its behavior. > > I want to modify the code that generates the_socket.so file. > > I need the source file and instructions on how tocompileand build > >_socket.so

Re: Python/environment problem with char encoding/decoding

2009-02-18 Thread Gabriel Rossetti
Peter Otten wrote: Gabriel Rossetti wrote: Hello everyone, I originally posted this on the Twisted mailing list, but now it seams to be a more general python/environment problem. If I run the attached example in Eclipse, it works, if I run it from a terminal, it doesn't, I get : $ python

Re: Directory

2009-02-18 Thread Steve Holden
gtillmon wrote: > Hello. I am new to the Python language. > I would like to know how to display and store the path of each mondule > that is called. Modules are imported, not called. > Similar to the old READY TRACE in COBOL of long ago. > It's certainly possible to trace function calls, if tha

Re: Python/environment problem with char encoding/decoding

2009-02-18 Thread Peter Otten
Gabriel Rossetti wrote: > Hello everyone, > > I originally posted this on the Twisted mailing list, but now it seams > to be a more general python/environment problem. If I run the attached > example in Eclipse, it works, if I run it from a terminal, it doesn't, I > get : > > $ python xml_parse

Re: Python/environment problem with char encoding/decoding

2009-02-18 Thread Benjamin Kaplan
On Wed, Feb 18, 2009 at 8:43 AM, Gabriel Rossetti < gabriel.rosse...@arimaz.com> wrote: > Hello everyone, > > I originally posted this on the Twisted mailing list, but now it seams to > be a more general python/environment problem. If I run the attached example > in Eclipse, it works, if I run it

Re: Crypto headaches.

2009-02-18 Thread M.-A. Lemburg
On 2009-02-18 14:23, SamG wrote: > Hi, > > Using the python's Crypto.Cipher.Blowfish is create and encrypted file > in the CBC mode. Now... when try to decrypt it with OpenSSL i get an > error stating "bad magic number". Are you getting the error message from openssl ? It looks a lot like an erro

Re: os.popen encoding!

2009-02-18 Thread Hrvoje Niksic
"Gabriel Genellina" writes: >> I'm playing with os.popen function. >> a = os.popen("somecmd").read() >> >> If one of the lines contains characters like "è", "æ"or any other it loks >> line this "velja\xe8a 2009" with that "\xe8". It prints fine if i go: >> >> for i in a: >> print i: > > '\xe8

Python/environment problem with char encoding/decoding

2009-02-18 Thread Gabriel Rossetti
Hello everyone, I originally posted this on the Twisted mailing list, but now it seams to be a more general python/environment problem. If I run the attached example in Eclipse, it works, if I run it from a terminal, it doesn't, I get : $ python xml_parser_test.py Traceback (most recent cal

  1   2   >