Re: import and package confusion

2009-04-29 Thread Dave Angel
Dale Amon wrote: On Wed, Apr 29, 2009 at 10:02:46PM -0400, Dave Angel wrote: The dot syntax works very predictably, and quite flexibly. The problem was that by using the same name for module and class, you didn't realize you needed to include both. It is one of the hazards of worki

Re: import and package confusion

2009-04-29 Thread Jeroen Ruigrok van der Werven
-On [20090430 02:21], Dale Amon (a...@vnl.com) wrote: >import sys >sys.path.extend (['../lib', '../bin']) > >from VLMLegacy.CardReader import CardReader >rdr = CardReader ("../example/B767.dat","PRINTABLE") > >iotypes = ["WINGTL","VLMPC","VLM4997"] >for iotype in iotypes: >packagename =

Re: import and package confusion

2009-04-29 Thread Arnaud Delobelle
Dale Amon writes: > I do not really see any other way to do what I want. If > there is a way to get rid of the exec in the sample code > I have used, I would love to know... but I can't see how > to import something where part of the name comes from user > command line input without interpreting

Re: telnetlib in python-3.0

2009-04-29 Thread Jack Diederich
On Wed, Apr 29, 2009 at 11:31 PM, wrote: > Is anyone using telnetlib in python-3.0? If so are you having any > success? Using the example at the bottom of the telnetlib doc page I > cannot seem to get any joy at all. I can make a connection, but write > (command) seems to do nothing. 3.0 had

Re: import and package confusion

2009-04-29 Thread alex23
On Apr 30, 1:10 pm, Dale Amon wrote: > I do not really see any other way to do what I want. If > there is a way to get rid of the exec in the sample code > I have used, I would love to know... but I can't see how > to import something where part of the name comes from user > command line input wit

Re: Python SocketServer with IPv6

2009-04-29 Thread Martin v. Löwis
> I am working on a overlay network implementation with python. I need > to use both IPv4 and IPv6 at each node. Python socketserver is being > used for this task. can anybody pls suggest me how to input an IPv6 > address to the socketserver. I'm not quite sure I understand the question, so here i

Re: ctypes

2009-04-29 Thread Lawrence D'Oliveiro
In message , Gabriel Genellina wrote: > c_float_p = ctypes.POINTER(ctypes.c_float) > c_short_p = ctypes.POINTER(ctypes.c_short) I like to do import ctypes as ct to shorten the references: c_float_p = ct.POINTER(ct.c_float) c_short_p = ct.POINTER(ct.c_short) -- Lawrence "Death To

Re: AtrributeDict

2009-04-29 Thread alex23
On Apr 30, 9:09 am, Дамјан Георгиевски wrote: > I've needed an attribute accessible dict, so I created this. > Are there any obviously stupid shortcomings? > > class AttrDict(dict): >    def __getattr__(self, name): >        try: >            return self[name] >        except KeyError, e: >      

Conventional Y Axis Label in pylab plot

2009-04-29 Thread W. eWatson
I'd like to label the plot axes as x and y. All I see is xlabel and ylabel. ylabel puts y on its side, rotated 90 degrees from the horizontal. Is there way to put it in a normal reading (science/math) position? -- W. eWatson (121.015 Deg. W, 39.262 De

Re: Tools for web applications

2009-04-29 Thread Daniel Fetchinson
> I used JCreator LE, java IDE for windows because, when I add documentation > of some new library, I have it on a F1 and index. So how you manage > documentation and code completion ? I asume that you are geek but not even > geeks could know every method of every class. Vi has code completion and

Re: Tools for web applications

2009-04-29 Thread Mario
I used JCreator LE, java IDE for windows because, when I add documentation of some new library, I have it on a F1 and index. So how you manage documentation and code completion ? I asume that you are geek but not even geeks could know every method of every class. "Daniel Fetchinson" wrote in m

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Martin v. Löwis
> How do get a printable unicode version of these path strings if they > contain none unicode data? Define "printable". One way would be to use a regular expression, replacing all codes in a certain range with a question mark. > I'm guessing that an app has to understand that filenames come in tw

Re: May I ask about Sage here?

2009-04-29 Thread Gabriel Genellina
En Wed, 29 Apr 2009 22:06:26 -0300, Michael Press escribió: May I ask for help with Sage problems here? I did not find a usenet Sage support group. I think you'll get more responses here: news://news.gmane.org/gmane.comp.mathematics.sage.general -- Gabriel Genellina -- http://mail.python

Re: What do you think of ShowMeDo

2009-04-29 Thread Terry Reedy
Bret Fledderjohn wrote: 2009/4/29 David Robinow mailto:drobi...@gmail.com>> On Wed, Apr 29, 2009 at 9:29 AM, mailto:ky...@showmedo.com>> wrote: ... > To reiterate, I responded to this thread because I think Ben's posting > gave an unfair impression of the site and i felt

Re: import and package confusion

2009-04-29 Thread Scott David Daniels
Dale Amon wrote: On Wed, Apr 29, 2009 at 10:02:46PM -0400, Dave Angel wrote: Please don't sink to exec or eval to solve what is really a straightforward problem. I do not really see any other way to do what I want. If there is a way to get rid of the exec in the sample code I have used, I wou

Re: AtrributeDict

2009-04-29 Thread Дамјан Георгиевски
>> I've needed an attribute accessible dict, so I created this. >> Are there any obviously stupid shortcomings? > > If you know the attribute names ahead of time, you might consider > using a namedtuple instead. > See > http://docs.python.org/library/collections.html#collections.namedtuple I do u

Re: An idea for method_missing

2009-04-29 Thread Gabriel Genellina
En Wed, 29 Apr 2009 15:27:48 -0300, mrstevegross escribió: I was exploring techniques for implementing method_missing in Python. I've seen a few posts out there on the subject... One tricky aspect is if it's possible to not just intercept a method_missing call, but actually dynamically add a

Re: Installing Python 2.5.4 from Source under Windows

2009-04-29 Thread Mark Hammond
Paul Franz wrote: I have looked and looked and looked. But I can not find any directions on how to install the version of Python build using Microsoft's compiler. It builds. I get the dlls and the exe's. But there is no documentation that says how to install what has been built. I have read e

telnetlib in python-3.0

2009-04-29 Thread rowland
Is anyone using telnetlib in python-3.0? If so are you having any success? Using the example at the bottom of the telnetlib doc page I cannot seem to get any joy at all. I can make a connection, but write (command) seems to do nothing. Thanks, Rowland -- http://mail.python.org/mailman/listinfo

Re: Geohashing

2009-04-29 Thread norseman
Marco Mariani wrote: djc wrote: Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) geohash(37.421542, -122.085589, b'2005-05-26-10458.68') ^ SyntaxError: invalid syntax The byte type is new in 2.6 -- http://mail.py

Re: polar plots, clockwise, north

2009-04-29 Thread enricong
Thank you for your post. I checked and it seems that the library I use (matplotlib) will only plot in a counter-clockwise direction starting at "east". I can rotate the data so that the plot looks correct, however since the library still wants to plot counter- clockwise, it attempts to connect th

Re: Re: import and package confusion

2009-04-29 Thread Dale Amon
On Wed, Apr 29, 2009 at 10:02:46PM -0400, Dave Angel wrote: > The dot syntax works very > predictably, and quite flexibly. The problem was that by using the same > name for module and class, you didn't realize you needed to include both. It is one of the hazards of working in many very differ

Re: Re: How to locate the bit in bits string?

2009-04-29 Thread Dave Angel
casevh wrote: On Apr 28, 5:39 pm, Li Wang wrote: 2009/4/29 Tim Chase : I want to concatenate two bits string together: say we have '1001' and '111' which are represented in integer. I want to concatenate them to '100' (also in integer form), my method is: ('1001' << 3) | 111 which

Re: suggestion on a complicated inter-process communication

2009-04-29 Thread Aaron Brady
Um, that's the limit of what I'm familiar with, I'm afraid. I'd have to experiment. On Apr 28, 10:44 am, Way wrote: > Thanks a lot for the reply. I am not familiar with multi-process in > Python. I am now using something like: snip > However, in this case, Process5's stdout cannot be passed to >

Notebook Ariel

2009-04-29 Thread Gabriel Genellina
Hola La notebook de Ariel esta en el placard, atrás de Walter. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: import and package confusion

2009-04-29 Thread Dave Angel
Dale Amon wrote: The point I take away from this is that packages and modules have dotted names, but Classes do not and there is no way to do exactly what I wanted to do. The dot syntax would have been quite nice (I quite like the "::" syntax in Perl) and would have made the code much clearer.

Re: jinja arbitrary code expressions?

2009-04-29 Thread Neal Becker
Neal Becker wrote: > Can jinja templates contain arbitrary python code? > > In mako, I could do (for example): > > from mako.template import Template > > mytemplate = Template(''' > <%! > from math import sin, pi > %> > hello ${name}! > ${x}**2 = ${x**2} > % for i in xrange (10): >

Re: Pythonic emptiness checking

2009-04-29 Thread MRAB
Carl Banks wrote: On Apr 29, 6:46 am, Bruno Desthuilliers wrote: Filip Gruszczyński a écrit : One of the Python Zen rules is Explicit is better implicit. And yet it's ok to do: if x: do_sth when x is string or list. Since it's very comfy, I've got nothing against though. I am just curious,

Re: stuck with PyOBEX

2009-04-29 Thread David Boddie
On Wednesday 29 April 2009 07:42, alejandro wrote: > So I should connect trough pybluez and send with obex?? Yes, or you could try lightblue: http://lightblue.sourceforge.net/ I've updated PyOBEX to try and be a bit more flexible when it comes to Bluetooth socket implementations, so you might

May I ask about Sage here?

2009-04-29 Thread Michael Press
May I ask for help with Sage problems here? I did not find a usenet Sage support group. If so, here is a session I imitated from the tutorial. The "load command failed. I logged output with "logstart", then quit, started, executed "load", and "load" failed to work. ___

Re: Installing Python 2.5.4 from Source under Windows

2009-04-29 Thread Gabriel Genellina
En Wed, 29 Apr 2009 18:15:07 -0300, Martin v. Löwis escribió: I can not find any directions on how to install the version of Python build using Microsoft's compiler. What *is* supported is creating an MSI installer out of your build tree. See Tools/msi for details. Also, see this recent t

Re: Pythonic emptiness checking

2009-04-29 Thread Carl Banks
On Apr 29, 6:46 am, Bruno Desthuilliers wrote: > Filip Gruszczyński a écrit : > > > One of the Python Zen rules is Explicit is better implicit. And yet > > it's ok to do: > > > if x: > >    do_sth > > > when x is string or list. Since it's very comfy, I've got nothing > > against though. I am just

Re: What do you think of ShowMeDo

2009-04-29 Thread Bret Fledderjohn
2009/4/29 David Robinow > On Wed, Apr 29, 2009 at 9:29 AM, wrote: > ... > > To reiterate, I responded to this thread because I think Ben's posting > > gave an unfair impression of the site and i felt the need to address > > some misconceptions. I am sorry you failed to find the videos, but > >

Re: Why bool( object )?

2009-04-29 Thread r
On Apr 28, 7:22 am, "Colin J. Williams" wrote: > Lie Ryan wrote: > > I'm puzzled by the last sentence: > > *** Python 2.6.2 (r262:71605, Apr 14 > 2009, 22:40:02) [MSC v.1500 32 bit > (Intel)] on win32. *** > > >>> bool(0) > False > >>> bool(-1) > True > >>> bool(-100) > True > > Colin W. What's w

Re: Web framework for embedded system

2009-04-29 Thread alex23
On Apr 30, 3:32 am, Thomas Heller wrote: > I'm very happy to see that these frameworks deliver ~10 pages per second > (cherrypy) or ~3.5 pages per second (webpy) out of the box on a system > that is 50 times slower than a typical desktop PC.  Of course these > were very short pages. I was remiss

Re: CSV performance

2009-04-29 Thread psaff...@googlemail.com
> > rows = fh.read().split() > coords = numpy.array(map(int, rows[1::3]), dtype=int) > points = numpy.array(map(float, rows[2::3]), dtype=float) > chromio.writelines(map(chrommap.__getitem__, rows[::3])) > My original version is about 15 seconds. This version is about 9. The chunks version posted

Re: AtrributeDict

2009-04-29 Thread Chris Rebert
2009/4/29 Дамјан Георгиевски : > I've needed an attribute accessible dict, so I created this. > Are there any obviously stupid shortcomings? If you know the attribute names ahead of time, you might consider using a namedtuple instead. See http://docs.python.org/library/collections.html#collections

Re: ctypes

2009-04-29 Thread Gabriel Genellina
En Wed, 29 Apr 2009 05:05:52 -0300, luca72 escribió: can you explain how to use this function : this is the api documentation : PREF0 short usb_tc08_get_single ( short handle, float * temp, short * overflow_flags, short units); This is the sample made in c: int main(void) {

Re: Why bool( object )?

2009-04-29 Thread Steven D'Aprano
On Wed, 29 Apr 2009 17:35:28 +0200, Marco Mariani wrote: > Bruno Desthuilliers wrote: > >> Lawrence D'Oliveiro a écrit : > What is the rationale for considering all instances true of a user- defined type? >>> >>> It's a stupid idea, >> >> Nope, it's a very sensible default (given you

Re: Get item from set

2009-04-29 Thread Raymond Hettinger
[bearophileh...@lycos.com] > But some other times you may accept to change the class and the set/ > dict, making it tell apart the keys only when they are different > object: > > class Some(object): >     def __init__(self, y): >         self._y = y >     def __eq__(self, other): >         return s

Re: import and package confusion

2009-04-29 Thread Dale Amon
On Wed, Apr 29, 2009 at 04:06:23PM -0700, Scott David Daniels wrote: > Dale Amon wrote: >> >> The point I take away from this is that packages and >> modules have dotted names, but Classes do not and there >> is no way to do exactly what I wanted to do. > Nope. You have not been clear with w

Re: Screenshot of a web page

2009-04-29 Thread r
On Apr 29, 3:49 am, mattia wrote: > Are you aware of any python module that automatically gives you a > screenshot of a web page? PIL comes to mind -- http://mail.python.org/mailman/listinfo/python-list

Re: import and package confusion

2009-04-29 Thread Dale Amon
Well, I've managed to get close to what I want, and just so you can see: #!/usr/bin/python import sys sys.path.extend (['../lib', '../bin']) from VLMLegacy.CardReader import CardReader rdr = CardReader ("../example/B767.dat","PRINTABLE") iotypes = ["WINGTL","VLMPC","VLM4997"] for iotype in

Re: list active variables

2009-04-29 Thread Steven D'Aprano
On Wed, 29 Apr 2009 12:25:46 -0700, Iamanalien wrote: > Hi, > > how can i list all the variables that i am using? You can't. What you can do though is list all the available names that Python knows about, whether you are using them or not, by using the dir() or vars() functions. -- Steven

Re: What do you think of ShowMeDo

2009-04-29 Thread David Robinow
On Wed, Apr 29, 2009 at 9:29 AM, wrote: ... > To reiterate, I responded to this thread because I think Ben's posting > gave an unfair impression of the site and i felt the need to address > some misconceptions. I am sorry you failed to find the videos, but > many tens of thousands are found every

jinja arbitrary code expressions?

2009-04-29 Thread Neal Becker
Can jinja templates contain arbitrary python code? In mako, I could do (for example): from mako.template import Template mytemplate = Template(''' <%! from math import sin, pi %> hello ${name}! ${x}**2 = ${x**2} % for i in xrange (10): w[${i}] = ${sin (pi/4*i)} % endfor ''') d = {'na

Re: Dictionary, integer compression

2009-04-29 Thread bearophileHUGS
Dinesh: > If you store a large number of integers (keys and values) in a > dictionary, do the Python internals perform integer compression to > save memory and enhance performance?  Thanks Define what you mean with "integer compression" please. It has several meanings according to the context. For

Dictionary, integer compression

2009-04-29 Thread dineshv
If you store a large number of integers (keys and values) in a dictionary, do the Python internals perform integer compression to save memory and enhance performance? Thanks Dinesh -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV performance

2009-04-29 Thread Lawrence D'Oliveiro
In message , Jorgen Grahn wrote: > I am asking because people who like databases tend to overestimate the > time it takes to parse text. And those of us who regularly load databases from text files, or unload them in the opposite direction, have a good idea of EXACTLY how long it takes to pars

Re: Help AIX 5.3 build on Python-3.1a2

2009-04-29 Thread pruebauno
On Apr 28, 10:07 am, Jeroen Ruigrok van der Werven wrote: > -On [20090427 20:31], prueba...@latinmail.com (prueba...@latinmail.com) wrote: > > >./Modules/ld_so_aix xlc_r -q64 -bI:Modules/python.exp build/ > >temp.aix-5.3-3.1//ptst/Python-3.1a2/Modules/_tkinter.o build/ > >temp.aix-5.3-3.1//ptst/Py

regular expression, unicode

2009-04-29 Thread Simon Strobl
Hello, why can't I use this statement in python3: good = re.compile("^[A-ZÄÖÜ].*") According to the documentation, patterns can be unicode strings. I get this error message: Traceback (most recent call last): File "./get.py", line 8, in for line in sys.stdin: File "/usr/lib64/python3.

Re: regular expression, unicode

2009-04-29 Thread MRAB
Simon Strobl wrote: Hello, why can't I use this pattern good = re.compile("^[A-ZÄÖÜ].*") in python3. According to the documentation, patterns may be unicode strings. I get this error message: Traceback (most recent call last): File "./get.py", line 8, in for line in sys.stdin: File

Re: regular expression, unicode

2009-04-29 Thread Rhodri James
On Wed, 29 Apr 2009 12:44:12 +0100, Simon Strobl wrote: why can't I use this pattern good = re.compile("^[A-ZÄÖÜ].*") in python3. According to the documentation, patterns may be unicode strings. I get this error message: Traceback (most recent call last): File "./get.py", line 8, in

Re: PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Cameron Simpson
On 29Apr2009 23:41, Barry Scott wrote: > On 22 Apr 2009, at 07:50, Martin v. Löwis wrote: >> If the locale's encoding is UTF-8, the file system encoding is set to >> a new encoding "utf-8b". The UTF-8b codec decodes non-decodable bytes >> (which must be >= 0x80) into half surrogate codes U+DC80..U

Re: Pythonic emptiness checking

2009-04-29 Thread r
On Apr 29, 8:37 am, Filip Gruszczyński wrote: > One of the Python Zen rules is Explicit is better implicit. And yet > it's ok to do: > > if x: >    do_sth > > when x is string or list. Since it's very comfy, I've got nothing > against though. I am just curious, why is it so? It also works for num

Re: How to locate the bit in bits string?

2009-04-29 Thread casevh
On Apr 28, 5:39 pm, Li Wang wrote: > 2009/4/29 Tim Chase : > > >> I want to concatenate two bits string together: say we have '1001' and > >> '111' which are represented in integer. I want to concatenate them to > >> '100' (also in integer form), my method is: > >> ('1001' << 3) | 111 > >> whi

Re: What do you think of ShowMeDo

2009-04-29 Thread kyran
@Ben - no hard feelings. I do think your post was unfair and would give people a wrong impression of the site. Plus the lateness of the day etc.. had soured my mood somewhat. But the point stands, there were misconceptions I felt the need to address. @Banibrata - the wxpython set is my responsibil

An idea for method_missing

2009-04-29 Thread mrstevegross
I was exploring techniques for implementing method_missing in Python. I've seen a few posts out there on the subject... One tricky aspect is if it's possible to not just intercept a method_missing call, but actually dynamically add a new function to an existing class. I realized you can modify the

Re: Thread-killing, round 666 (was Re: Lisp mentality vs. Python mentality)

2009-04-29 Thread Vsevolod
On Apr 28, 11:49 pm, David Bolen wrote: > Vsevolod writes: > > On Apr 27, 11:31 pm, David Bolen wrote: > >> I'm curious - do you know what happens if threading is implemented as > >> a native OS thread and it's stuck in an I/O operation that is blocked? > >> How does the Lisp interpreter/runtime

python command-line interface for GitHub Issues v2

2009-04-29 Thread SanPy
Hi, For those of you that are using GitHub, you might want to check out a package that I've written in Python. It is a command-line interface to the recently released GitHub Issues API v2. You can find it here: http://github.com/jsmits/github-cli Here are some examples of what you can do: ghi li

multiprocessing, pool and process crashes

2009-04-29 Thread dragonk
I want to use the multiprocessing.Pool object to run multiple tasks in separate processes. The problem is that I want to call an external C function (from a shared library, with help from ctypes) and this function tends to crash (SIGSEGV,SIGFPE,etc.) on certain data sets (the purpose of this thing

Re: stuck with PyOBEX

2009-04-29 Thread Дамјан Георгиевски
> This module asks the socket module for AF_BLUETOOTH... in the socket > module there is no such thing as AF_BLUETOOTH. Could it be that the > person that made PyOBEX modified his socket module and forgot to give > his socket module? Or am I missing something? Maybe AF_BLUETOOTH > stands for someth

Re: sorting items in a table problematic because of scientific notation

2009-04-29 Thread Raymond Hettinger
[John Machin] > > 'NEAR_DIST'], [('N', 9, 0), ('N', 9, 0), ('F', 19, 11)], [53, 55, ' > > The data type code for the offending column is "F" which is not in the > bog-standard dBase III set of C, N, D, and L. The code that you have used > merely > returns unchanged the character string that finds

regular expression, unicode

2009-04-29 Thread Simon Strobl
Hello, why can't I use this pattern good = re.compile("^[A-ZÄÖÜ].*") in python3. According to the documentation, patterns may be unicode strings. I get this error message: Traceback (most recent call last): File "./get.py", line 8, in for line in sys.stdin: File "/usr/lib64/python3.0/

AtrributeDict

2009-04-29 Thread Дамјан Георгиевски
I've needed an attribute accessible dict, so I created this. Are there any obviously stupid shortcomings? class AttrDict(dict): def __getattr__(self, name): try: return self[name] except KeyError, e: raise AttributeError(e) -- дамјан ( http://softver.org.m

Re: Numpy compatibility issue (python 2.6)

2009-04-29 Thread Carl Banks
On Apr 29, 5:18 am, bruno wrote: > It seems that some TypeError messages have changed between versions > 2.5 and 2.6, e.g.: > > from math import radians > radians () > > in 2.5, this leads to "radians () takes exactly 1 argument (0 given)" > whereas in 2.6, the message is now: "radians () takes ex

Re: import and package confusion

2009-04-29 Thread Scott David Daniels
Dale Amon wrote: The point I take away from this is that packages and modules have dotted names, but Classes do not and there is no way to do exactly what I wanted to do. Nope. You have not been clear with what you want, and part of the lack of clarity is your imprecision about names. If

Re: dict is really slow for big truck

2009-04-29 Thread bearophileHUGS
Sion Arrowsmith: > The keys aren't integers, though, they're strings. You are right, sorry. I need to add an int() there. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Multiprocessing Pool and functions with many arguments

2009-04-29 Thread psaff...@googlemail.com
I'm trying to get to grips with the multiprocessing module, having only used ParallelPython before. based on this example: http://docs.python.org/library/multiprocessing.html#using-a-pool-of-workers what happens if I want my "f" to take more than one argument? I want to have a list of tuples of

list active variables

2009-04-29 Thread Iamanalien
Hi, how can i list all the variables that i am using? -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Barry Scott
On 22 Apr 2009, at 07:50, Martin v. Löwis wrote: If the locale's encoding is UTF-8, the file system encoding is set to a new encoding "utf-8b". The UTF-8b codec decodes non-decodable bytes (which must be >= 0x80) into half surrogate codes U+DC80..U+DCFF. Forgive me if this has been covered.

Numpy compatibility issue (python 2.6)

2009-04-29 Thread bruno
It seems that some TypeError messages have changed between versions 2.5 and 2.6, e.g.: from math import radians radians () in 2.5, this leads to "radians () takes exactly 1 argument (0 given)" whereas in 2.6, the message is now: "radians () takes exactly one argument (0 given)" I agree that the

ctypes

2009-04-29 Thread luca72
hello i have this api PREF0 short usb_tc08_get_single ( short handle, float * temp, short * overflow_flags, short units); this is a sample program made in c int main(void) { short handle = 0; /* The handle to a TC-08 returned by usb_tc08_open_unit() */ char selectio

Re: What do you think of ShowMeDo

2009-04-29 Thread showm...@googlemail.com
On 29 Apr, 07:27, Steven D'Aprano wrote: > On Tue, 28 Apr 2009 21:56:08 -0700, kyran wrote: > > I stumbled across this thread while typing a speculative 'showmedo' in > > google, as you do while taking a break on a (very) late Tuesday evening. > > To declare my interest, as things stand I amShowme

Re: Third Party Modules

2009-04-29 Thread David Lyon
> On Tue, 28 Apr 2009 10:15:23 -0700, John Nagle wrote: >> Brock wrote: >>> Hi Everyone, >>> >>> I know this is most likely a basic question and you will roll your >>> eyes, but I am just starting out with Python (hobbyist) and I see many >>> tutorials on the web referring to the use of external

Re: Which flag to use in "configure" to Change the Install location?

2009-04-29 Thread Diez B. Roggisch
Omita schrieb: Long story short... I am installing Python 2.6 on OSX. By default the Library is installing here: /Library/Frameworks/Python.framework However, as I am using OSX Server I would ideally like the location to be here: /System/Library/Frameworks/Python.framework/ Why? Do I need

Re: command prompt history filtered by initial letters

2009-04-29 Thread MRAB
limit wrote: Hello, On WindowsXP with Python 2.5.1 (from the python-2.5.1.msi): when I'm at the python prompt, up-arrow scrolls through the command history. If I type group of characters first, up-arrow shows only the previous commands that start with that group of characters. On CentOS 5 with

ctypes

2009-04-29 Thread luca72
can you explain how to use this function : this is the api documentation : PREF0 short usb_tc08_get_single ( short handle, float * temp, short * overflow_flags, short units); This is the sample made in c: int main(void) { short handle = 0; /* The handle to a TC-08 returned

Re: dict is really slow for big truck

2009-04-29 Thread Scott David Daniels
prueba...@latinmail.com wrote: It is probably out of habit of using the generalized idiom: line="a,b,c\n" line.strip().split(",") Ah, thank you. I just couldn't figure out where it started. --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-list

c array

2009-04-29 Thread luca72
hello i'm using ctypes i have this c function PREF0 short usb_tc08_get_single ( short handle, float * temp, short * overflow_flags, short units); where : nt main(void) { short handle = 0; /* The handle to a TC-08 returned by usb_tc08_open_unit() */ char selection =

Re: complementary lists?

2009-04-29 Thread Bryan
On Apr 28, 11:16 pm, Arnaud Delobelle wrote: > Kay Schluehr writes: > > On 29 Apr., 05:41, Ross wrote: > >> If I have a list x = [1,2,3,4,5,6,7,8,9] and another list that is a > >> subset of x:  y = [1,4,7] , is there a quick way that I could return > >> the complementary subset to y z=[2,3,

[ANN] BPT (Boxed Package Tool)

2009-04-29 Thread Giuseppe Ottaviano
Hi all, I am pleased to announce BPT 0.2a (despite the number, this is the first public version). http://pypi.python.org/pypi/bpt Like virtualenv, BPT allows to create isolate environments, but it is not limited to Python software, as it can be used to install arbitrary Unix software. It

Re: import and package confusion

2009-04-29 Thread Dale Amon
On Wed, Apr 29, 2009 at 03:06:13PM -0700, Scott David Daniels wrote: > You did not answer the question above, and I think the answer is the root > of your misunderstanding. A class and a module are _not_the_same_thing_. > sys is not a package, it is a module. >>> Just because you put a class insid

Re: Python 2.6 Install on OSX Server 10.5: lWhich flag to use in "configure" to Change the Install location?

2009-04-29 Thread Benjamin Kaplan
On Wed, Apr 29, 2009 at 5:43 PM, Omita wrote: > Long story short... I am installing Python 2.6 on OSX Server. By > default the Python.framework is installing in /Library: > > /Library/Frameworks/Python.framework > > However, as I am using OSX Server I would ideally like the install > location to

Re: Python 2.6 Install on OSX Server 10.5: lWhich flag to use in "configure" to Change the Install location?

2009-04-29 Thread uuid
My first intuition would be that - even if it works - this would break future OS X updates, since you're probably not fixing the receipt files. On 2009-04-29 23:43:34 +0200, Omita said: However, as I am using OSX Server I would ideally like the install location to be here: /System/Library/F

Which flag to use in "configure" to Change the Install location?

2009-04-29 Thread Omita
Long story short... I am installing Python 2.6 on OSX. By default the Library is installing here: /Library/Frameworks/Python.framework However, as I am using OSX Server I would ideally like the location to be here: /System/Library/Frameworks/Python.framework/ Do I need to use the "--libdir" fl

Re: complementary lists?

2009-04-29 Thread Bryan
On Apr 28, 11:16 pm, Arnaud Delobelle wrote: > Kay Schluehr writes: > > On 29 Apr., 05:41, Ross wrote: > >> If I have a list x = [1,2,3,4,5,6,7,8,9] and another list that is a > >> subset of x:  y = [1,4,7] , is there a quick way that I could return > >> the complementary subset to y z=[2,3,

Python SocketServer with IPv6

2009-04-29 Thread godshorse
Hello, I am working on a overlay network implementation with python. I need to use both IPv4 and IPv6 at each node. Python socketserver is being used for this task. can anybody pls suggest me how to input an IPv6 address to the socketserver. Thanks in advance, -- http://mail.python.org/mailman/li

Re: can't use "glog" to find the path with square bracket

2009-04-29 Thread winterTTr
yes , i works as your advise. Thanks a lot . :-) On Apr 28, 9:52 am, MRAB wrote: > winterTTr wrote: > > I want to list the file with glob . > > The path( which is a directory ) is contain square bracket as "[ab] > > xxx" > > .  However , i can't find how to do it rightly with glob . > > > with t

Re: Restart generator when it is exhausted.

2009-04-29 Thread Lacrima
On Apr 28, 6:38 pm, "J. Cliff Dyer" wrote: > On Tue, 2009-04-28 at 10:41 +, Duncan Booth wrote: > > Lacrima wrote: > > > > If it is not possible what are common techniques to use iterator or > > > generator objects that allow restarting when it is needed? > > > The usual thing if you want to

Re: desperately looking for a howto on running my wxPython app on Vista

2009-04-29 Thread Mike Driscoll
On Apr 29, 4:17 am, Paul Sijben wrote: > Gabriel Genellina wrote: > >> I am currently stuck on the infamous R6034 error but I understand that > >> after that there may be another issue with certain wxPython functions. > > > That should be fixed in Python 2.6.2, I think. > > Are you compiling all y

command prompt history filtered by initial letters

2009-04-29 Thread limit
Hello, On WindowsXP with Python 2.5.1 (from the python-2.5.1.msi): when I'm at the python prompt, up-arrow scrolls through the command history. If I type group of characters first, up-arrow shows only the previous commands that start with that group of characters. On CentOS 5 with Python 2.5.4 (t

Techkicks.com technology links, community driven

2009-04-29 Thread Steven
TechKicks.com is a community based technology site. It specializes in Hi-Technologies like Robotics, ERP, GPS, Python, Haskell, Lisp, Ruby On Rails, and common techs like c#, PHP, Java, Sql and many more. Individual users of the site submit and review stories, the most popular of which make it to t

Python 2.6 Install on OSX Server 10.5: lWhich flag to use in "configure" to Change the Install location?

2009-04-29 Thread Omita
Long story short... I am installing Python 2.6 on OSX Server. By default the Python.framework is installing in /Library: /Library/Frameworks/Python.framework However, as I am using OSX Server I would ideally like the install location to be here: /System/Library/Frameworks/Python.framework/ Do

Re: Why bool( object )?

2009-04-29 Thread Aaron Brady
On Apr 28, 9:54 pm, Steven D'Aprano wrote: > On Tue, 28 Apr 2009 11:59:18 -0700, Aaron Brady wrote: > >> To steal an idiom from Laura: Python has a float-shaped Nothing 0.0, a > >> list-shaped Nothing [], a dict-shaped Nothing {}, an int-shaped Nothing > >> 0, a singleton Nothing None, and so fort

Re: dict is really slow for big truck

2009-04-29 Thread pruebauno
On Apr 29, 1:05 pm, Scott David Daniels wrote: > Bruno Desthuilliers wrote: > > d = {} > > for line in open(thefile): > >    arr = line.strip().split() > >    d[arr[0]] = arr > > Sorry, not picking on Bruno in particular, but I keep seeing > this formulation around various places. > When does line

Re: import and package confusion

2009-04-29 Thread Scott David Daniels
Dale Amon wrote: On Wed, Apr 29, 2009 at 01:12:33PM -0700, Scott David Daniels wrote: Dale Amon wrote: I am trying to get to the heart of what it is I am missing. Is it the case that if you have a module C in a package A: A.C that there is no way to load it such that you can use

Re: stuck with PyOBEX

2009-04-29 Thread Jorgen Grahn
On Tue, 28 Apr 2009 18:52:38 +0200, Diez B. Roggisch wrote: > alejandro wrote: [AF_BLUETOOTH] >> Can you tell me what is it? Maybe I can search it and pass it in another >> way... if it is an address or protocol name > > I'm not entirely sure, but I guess no, you can't simply pass it in. >

Re: Third Party Modules

2009-04-29 Thread Jorgen Grahn
On Tue, 28 Apr 2009 10:15:23 -0700, John Nagle wrote: > Brock wrote: >> Hi Everyone, >> >> I know this is most likely a basic question and you will roll your >> eyes, but I am just starting out with Python (hobbyist) and I see many >> tutorials on the web referring to the use of external modules.

Re: CSV performance

2009-04-29 Thread Jorgen Grahn
On Mon, 27 Apr 2009 23:56:47 +0200, dean wrote: > On Mon, 27 Apr 2009 04:22:24 -0700 (PDT), psaff...@googlemail.com wrote: > >> I'm using the CSV library to process a large amount of data - 28 >> files, each of 130MB. Just reading in the data from one file and >> filing it into very simple data st

  1   2   >