Re: Reading Java byte[] data stream over standard input

2008-05-18 Thread Marc 'BlackJack' Rintsch
On Sun, 18 May 2008 22:11:33 -0700, sapsi wrote: > I am using HadoopStreaming using a BinaryInputStream. What this > basically does is send a stream of bytes ( the java type is : private > byte[] bytes) to my python program. > > I have done a test like this, > while 1: > x=sys.stdin.read(1

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread s0suk3
On May 18, 7:25 pm, John Salerno <[EMAIL PROTECTED]> wrote: > On Sun, 18 May 2008 16:17:55 -0700 (PDT) > > Mensanator <[EMAIL PROTECTED]> wrote: > > I see no need for GUI in any of these applications. > > Yeah, I try to find little projects to write in Python that don't involve a > GUI. It's quick

Re: Reading Java byte[] data stream over standard input

2008-05-18 Thread sapsi
I should also mention that for some reason there are several binay values popping in between for some reason. This behavior (for the inputr stream) is not expected > Now, the incoming data is binary(though mine is actually merely ascii > text) but the output is not what is expected. I expect for

Organizing a Python project

2008-05-18 Thread ivarnelispam
Hello all, I'm starting work on what is going to become a fairly substantial Python project, and I'm trying to find the best way to organize everything. The project will consist of: - A few applications - Several small scripts and utilities - Unit tests and small interactive test programs - A num

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread subeen
On May 19, 7:52 am, "Kam-Hung Soh" <[EMAIL PROTECTED]> wrote: > On Mon, 19 May 2008 08:20:22 +1000, John Salerno > > <[EMAIL PROTECTED]> wrote: > > Hey all. Just thought I'd ask a general question for my own interest. > > Every time I think of something I might do in Python, it usually > > involves

Reading Java byte[] data stream over standard input

2008-05-18 Thread sapsi
Hello, I am using HadoopStreaming using a BinaryInputStream. What this basically does is send a stream of bytes ( the java type is : private byte[] bytes) to my python program. I have done a test like this, while 1: x=sys.stdin.read(100) if x: print x else:

Re: New to Python, Discussion Groups.

2008-05-18 Thread John Nagle
cmoller wrote: Hi, I am new to Python and the use of discussion groups. Is there a FAQ for basic information so certain questions are not repeated? I am NOT an experienced programmer, but have decided to write a data logger for sensors sending data via an internal ethernet work to machines runn

Re: explain this function to me, lambda confusion

2008-05-18 Thread Terry Reedy
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Lie <[EMAIL PROTECTED]> writes: | | > Lambda can actually be safely removed from python and no other | > features would be missing. It is always possible to create a def | > version of any lambda, so lambda is useles

FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript, SAP - ABAP

2008-05-18 Thread univbgp100
##FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript, SAP - ABAP FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript, SAP - ABAP visit ebooks.univdatabase.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Get all the instances of one class

2008-05-18 Thread Matt Nordhoff
Tommy Nordgren wrote: > class MyClass : a_base_class > memberlist=[] > > # Insert object in memberlist when created; > # note: objects won't be garbage collected until removed from memberlist. Just to say, if you wanted to go about it that way, you could avoid the garbage collection probl

handling xml embedded within xml

2008-05-18 Thread Avowkind
I have a log file within which is contained a dump of an xml message ... rubbish ///asd laksj aslf content .. more junk ... then more xml """) This example is of course a summary. I want to write a streaming filter which will throw out all the junk and just return a series of nice string

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread Kam-Hung Soh
On Mon, 19 May 2008 08:20:22 +1000, John Salerno <[EMAIL PROTECTED]> wrote: Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you al

Re: New to Python, Discussion Groups.

2008-05-18 Thread Ben Finney
cmoller <[EMAIL PROTECTED]> writes: > I am new to Python and the use of discussion groups. Welcome to both. > Is there a FAQ for basic information so certain questions are not > repeated? Congratulations on asking this question; it puts you ahead of many other first-time posters. Python's offi

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread Brian
John Salerno wrote: Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This c

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread Irmen de Jong
John Salerno wrote: Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This co

Re: New to Python, Discussion Groups.

2008-05-18 Thread Mensanator
On May 18, 7:34�pm, cmoller <[EMAIL PROTECTED]> wrote: > Hi, > > I am new to Python and the use of discussion groups. Is there a FAQ > for basic information so certain questions are not repeated? > > I am NOT an experienced programmer, but have decided to write a data > logger for sensors sending d

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread timh
On May 19, 6:20 am, John Salerno <[EMAIL PROTECTED]> wrote: > Hey all. Just thought I'd ask a general question for my own interest. Every > time I think of something I might do in Python, it usually involves creating > a GUI interface, so I was wondering what kind of work you all do with Python

New to Python, Discussion Groups.

2008-05-18 Thread cmoller
Hi, I am new to Python and the use of discussion groups. Is there a FAQ for basic information so certain questions are not repeated? I am NOT an experienced programmer, but have decided to write a data logger for sensors sending data via an internal ethernet work to machines running OS X (Intel).

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread Mensanator
On May 18, 7:25�pm, John Salerno <[EMAIL PROTECTED]> wrote: > On Sun, 18 May 2008 16:17:55 -0700 (PDT) > > Mensanator <[EMAIL PROTECTED]> wrote: > > I see no need for GUI in any of these applications. > > Yeah, I try to find little projects to write in Python that don't involve a > GUI. It's quick

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread John Salerno
On Sun, 18 May 2008 16:17:55 -0700 (PDT) Mensanator <[EMAIL PROTECTED]> wrote: > I see no need for GUI in any of these applications. Yeah, I try to find little projects to write in Python that don't involve a GUI. It's quicker, for one thing, and I also find that there is much more of a focus

Re: Get all the instances of one class

2008-05-18 Thread Terry
On May 18, 11:35 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Terry schrieb: > > > > > On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]> > >> escribió: > > >>> Is there a simple way to get all the instanc

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread sturlamolden
On May 19, 12:20 am, John Salerno <[EMAIL PROTECTED]> wrote: > Hey all. Just thought I'd ask a general question for my own interest. Every > time I think of something I might do in Python, it usually involves creating > a GUI interface, so I was wondering what kind of work you all do with Python

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread Mensanator
On May 18, 5:20�pm, John Salerno <[EMAIL PROTECTED]> wrote: > Hey all. Just thought I'd ask a general question for my own interest. Every > time I think of something I might do in Python, it usually involves creating > a GUI interface, so I was wondering what kind of work you all do with Python

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread Daniel Fetchinson
> Hey all. Just thought I'd ask a general question for my own interest. Every > time I think of something I might do in Python, it usually involves creating > a GUI interface, so I was wondering what kind of work you all do with Python > that does *not* involve any GUI work. This could be any littl

How do *you* use Python in non-GUI work?

2008-05-18 Thread John Salerno
Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scr

Re: Compress a string

2008-05-18 Thread inhahe
I forgot a line that says, "lc = c" i should really test my stuff. "inhahe" <[EMAIL PROTECTED]> wrote in message news:... >i see lots of neat one-liner solutions but just for the sake of argument: > > def compress_str(str): > new_str = "" > lc = "" > for c in str: >if c != lc:

Re: Compress a string

2008-05-18 Thread inhahe
i see lots of neat one-liner solutions but just for the sake of argument: def compress_str(str): new_str = "" lc = "" for c in str: if c != lc: new_str.append(c) return new_str "Matt Porter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi guys, > > I

Re: Compress a string

2008-05-18 Thread Matt Porter
On Sun, 18 May 2008 20:30:57 +0100, Peter Otten <[EMAIL PROTECTED]> wrote: Matt Porter wrote: I'm trying to compress a string. E.g: "BBBC" -> "ABC" Two more: from itertools import groupby "".join(k for k, g in groupby("aabbcc")) 'abc' import re re.compile(r"(.)\1*"

Re: about python

2008-05-18 Thread Fuzzyman
On Apr 23, 3:50 am, [EMAIL PROTECTED] wrote: > How can python execute in browser? > > Mukul The best way of running Python code in the browser is with the Silverlight browser plugin. Silverlight 2 (currently working with IE, Safari and Firefoxon Windows and Mac OS X - but Silveright 2 for Linux, c

Re: multiple databases, what's the best interface ?

2008-05-18 Thread Stef Mientki
thanks guys, I'll take a look at your suggestions. cheers, Stef M.-A. Lemburg wrote: On 2008-05-17 20:54, Stef Mientki wrote: hello, I need to switch fluently between 2 or 3 types of dbases: SQLite, Sybase ( and in the future MS SQL-server). I need both closed application and general purpose

Re: is there a bug in urlunparse/urlunsplit

2008-05-18 Thread Rob Williscroft
Alex wrote in news:09764c57-03ce-4ccb-a26d- [EMAIL PROTECTED] in comp.lang.python: > Hi all. > > Is there a bug in the urlunparse/urlunsplit functions? > Look at this fragment (I know is quite silly): > > urlunparse(urlparse('www.example.org','http')) > ---> 'http:///www.example.org' >

Re: Showing the method's class in expection's traceback

2008-05-18 Thread Diez B. Roggisch
Agustin Villena schrieb: Hi! is there anyway to show the class of a method in an exception's traceback? For example, the next code class Some(object): def foo(self,x): raise Exception(x) obj = Some() obj.foo("some arg") produces the next traceback Traceback (most recent call las

distutils directory problem

2008-05-18 Thread Martin Manns
Hi, I have the following problem with the distutils package: (I have now spent hours reading and searching the manuals and tutorials, and I am still stuck.) I have a working directory ~/pyspread in which my libraries are situated and two icons directories ~/pyspread/icons and ~/pyspread/icons/act

Re: Using Python for programming algorithms

2008-05-18 Thread Jaap Spies
Vicent Giner wrote: Hello. I am new to Python. It seems a very interesting language to me. Its simplicity is very attractive. However, it is usually said that Python is not a compiled but interpreted programming language —I mean, it is not like C, in that sense. I am working on my PhD Thesis,

Showing the method's class in expection's traceback

2008-05-18 Thread Agustin Villena
Hi! is there anyway to show the class of a method in an exception's traceback? For example, the next code class Some(object): def foo(self,x): raise Exception(x) obj = Some() obj.foo("some arg") produces the next traceback Traceback (most recent call last): File "", line 231, in

Re: Compress a string

2008-05-18 Thread Marc Christiansen
Matt Porter <[EMAIL PROTECTED]> wrote: > Hi guys, > > I'm trying to compress a string. > E.g: > "BBBC" -> "ABC" You mean like this? >>> ''.join(c for c, _ in itertools.groupby("BBBCAADCASS")) 'ABCADCAS' HTH Marc -- http://mail.python.org/mailman/listinfo/python-list

is there a bug in urlunparse/urlunsplit

2008-05-18 Thread Alex
Hi all. Is there a bug in the urlunparse/urlunsplit functions? Look at this fragment (I know is quite silly): urlunparse(urlparse('www.example.org','http')) ---> 'http:///www.example.org' ^ There are too many slashes, isn't it? Is it a known bug or maybe I missed something... Ale

Re: Rpy Module

2008-05-18 Thread Mike P
Superb, thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python for programming algorithms

2008-05-18 Thread sturlamolden
On May 18, 4:20 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote: > Are you going to be doing research _about_ the > algorithms in question or is it going to be research > _using_ these algorithms to draw conclusions > about other things? > > Most of the replies seem to be assuming the latter. > If

Re: python confusion possibly related to pickle

2008-05-18 Thread Derek Martin
On Sun, May 18, 2008 at 08:28:34PM +0100, Dennis wrote: > The problem that's got me annoyed is that after getting said error I > close the shell window, open a new one, run the python interpreter > and type "import pickle" and get the error that the script I'd run > earlier caused. Why is this ? W

Re: python confusion possibly related to pickle

2008-05-18 Thread Dennis
Never mind. I solved it. I had a file called pickle in the same folder I was in when I ran python, and that's the file it was trying to import. Duh @ me :s Dennis wrote: I have a problem that I don't understand at all. I run a python script, which uses pickle, and it fails. That alone is,

Re: Compress a string

2008-05-18 Thread Peter Otten
Matt Porter wrote: > I'm trying to compress a string. > E.g: > "BBBC" -> "ABC" Two more: >>> from itertools import groupby >>> "".join(k for k, g in groupby("aabbcc")) 'abc' >>> import re >>> re.compile(r"(.)\1*").sub(r"\1", "aaa") 'abc' Peter -- http://ma

python confusion possibly related to pickle

2008-05-18 Thread Dennis
I have a problem that I don't understand at all. I run a python script, which uses pickle, and it fails. That alone is, perhaps, no big deal. The problem that's got me annoyed is that after getting said error I close the shell window, open a new one, run the python interpreter and type "impo

Re: What's the api tat I should use to connect python to a MS Access Db?

2008-05-18 Thread Henry Chang
A simple google search: http://bytes.com/forum/thread637384.html On Sun, May 18, 2008 at 10:57 AM, David Anderson <[EMAIL PROTECTED]> wrote: > Please answer me the question of the subject =) > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/

Re: Compress a string

2008-05-18 Thread Paul McGuire
On May 18, 1:45 pm, Gary Herron <[EMAIL PROTECTED]> wrote: > Matt Porter wrote: > > Hi guys, > > > I'm trying to compress a string. > > E.g: > >  "BBBC" -> "ABC" > I'm partial to using (i)zip when I need to look at two successive elements of a sequence: >>> from itertools import izip >>> inst

Re: Get all the instances of one class

2008-05-18 Thread Tommy Nordgren
On 17 maj 2008, at 01.44, Terry wrote: Hi, Is there a simple way to get all the instances of one class? I mean without any additional change to the class. br, Terry -- http://mail.python.org/mailman/listinfo/python-list class MyClass : a_base_class memberlist=[] # Insert object in

Re: howto use pylint from Eric IDE?

2008-05-18 Thread dmitrey
Since I have no project (and willing to create the one), just several py-files, the Project->Check button is disabled. Are there any other methods in v4.1.1 or more recent? Thx, D. On 18 Тра, 16:48, Detlev Offenbach <[EMAIL PROTECTED]> wrote: > dmitrey wrote: > > Hi all, > > > I have Eric 4.1.1, p

Re: Compress a string

2008-05-18 Thread Gary Herron
Matt Porter wrote: Hi guys, I'm trying to compress a string. E.g: "BBBC" -> "ABC" The code I have so far feels like it could be made clearer and more succinct, but a solution is currently escaping me. def compress_str(str): new_str = "" for i, c in enumerate(str): try:

Re: Compress a string

2008-05-18 Thread Arnaud Delobelle
"Matt Porter" <[EMAIL PROTECTED]> writes: > Hi guys, > > I'm trying to compress a string. > E.g: > "BBBC" -> "ABC" > > The code I have so far feels like it could be made clearer and more > succinct, but a solution is currently escaping me. > > > def compress_str(str): > new_str = "" >

Re: Compress a string

2008-05-18 Thread Salvatore DI DI0
Try this t = set("bbc") list(t) Regards Salvatore "Matt Porter" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Hi guys, > > I'm trying to compress a string. > E.g: > "BBBC" -> "ABC" > > The code I have so far feels like it could be ma

Re: [EMAIL PROTECTED]: Re: Compress a string]

2008-05-18 Thread Matt Porter
On Sun, 18 May 2008 19:13:57 +0100, J. Clifford Dyer <[EMAIL PROTECTED]> wrote: On Sun, May 18, 2008 at 07:06:10PM +0100, Matt Porter wrote regarding Compress a string: Hi guys, I'm trying to compress a string. E.g: "BBBC" -> "ABC" The code I have so far feels like it could be made c

Fwd: Re: [EMAIL PROTECTED]: Re: Compress a string]

2008-05-18 Thread python
> I'm trying to compress a string. > E.g: > > "BBBC" -> "ABC" Doesn't preserve order, but insures uniqueness: line = "BBBC" print ''.join( set( line ) ) Malcolm -- http://mail.python.org/mailman/listinfo/python-list

[EMAIL PROTECTED]: Re: Compress a string]

2008-05-18 Thread J. Clifford Dyer
On Sun, May 18, 2008 at 07:06:10PM +0100, Matt Porter wrote regarding Compress a string: > > Hi guys, > > I'm trying to compress a string. > E.g: > "BBBC" -> "ABC" > > The code I have so far feels like it could be made clearer and more > succinct, but a solution is currently escaping me.

Compress a string

2008-05-18 Thread Matt Porter
Hi guys, I'm trying to compress a string. E.g: "BBBC" -> "ABC" The code I have so far feels like it could be made clearer and more succinct, but a solution is currently escaping me. def compress_str(str): new_str = "" for i, c in enumerate(str): try: if c !=

What's the api tat I should use to connect python to a MS Access Db?

2008-05-18 Thread David Anderson
Please answer me the question of the subject =) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python library for clustering from distance vector

2008-05-18 Thread jay graves
On May 17, 11:49 pm, Sengly <[EMAIL PROTECTED]> wrote: > I am looking for a python library which can cluster similar objects > into their respective groups given their similarity score of each two > of them. I have searched the group but I couldn't find any helpful > information yet. How about goo

Re: usage of python

2008-05-18 Thread Paddy
On May 13, 6:10 pm, Rajarshi <[EMAIL PROTECTED]> wrote: > Hi, I teach an introductory programming course in Python. As part of > the introduction I'd like to highlight theusage of Pythonin > industry. The idea is to show that there are big players using Python > for a variety of tasks. Given that t

Re: Distributing applications that use 3rd party modules

2008-05-18 Thread Mike Driscoll
On May 17, 10:13 am, eliben <[EMAIL PROTECTED]> wrote: > On May 17, 3:23 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On May 17, 4:42 am, eliben <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > I'm getting into Python now after years of Perl, and as part of my > > > research I must under

Re: Write bits in file

2008-05-18 Thread John Nagle
Monica Leko wrote: Hi I have a specific format and I need binary representation. Does Python have some built-in function which will, for instance, represent number 15 in exactly 10 bits? The "struct" module will let you format Python data as a binary object of specified format. But it doe

Re: Get all the instances of one class

2008-05-18 Thread Gabriel Genellina
En Sun, 18 May 2008 12:32:28 -0300, Terry <[EMAIL PROTECTED]> escribió: > On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]> >> escribió: >> >> > Is there a simple way to get all the instances of one class? I mean >

Re: "indexed properties"...

2008-05-18 Thread pataphor
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Is there some reason that would be better? It would make a lot > of the code more complicated. Ok, it would require only one > bit of added code, I suppose, but I don't see the plus side. The plus side is you give up an untenable positi

Re: waiting on an event blocks all signals

2008-05-18 Thread Rhamphoryncus
On May 18, 9:05 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > alan schrieb: > > > This ignores CTRL-C on every platform I've tested: > > > python -c "import threading; threading.Event().wait()" > > ^C^C^C^C > > > It looks to me like all signals are masked before entering wait(). Can > > someo

Re: Shelve or pickle module

2008-05-18 Thread Ville M. Vainio
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > A shelve is just a persistent dictionary that uses pickle to store > the objects. If you want to store one or a few objects, using > pickle directly may be easier. Any problem you may have with pickle > (nonpickleable objects, security risks) wi

Re: explain this function to me, lambda confusion

2008-05-18 Thread inhahe
> > Both the responses offer lambda free alternatives. That's fine, and > given the terse documentation and problems that I had understanding > them, I would agree. So what applications are lambdas suited to? I > think the parameterised function model is one. > What else? i've hardly ever used lam

Re: Get all the instances of one class

2008-05-18 Thread Diez B. Roggisch
Terry schrieb: On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]> escribió: Is there a simple way to get all the instances of one class? I mean without any additional change to the class. Try with gc.get_referrers()

Re: Get all the instances of one class

2008-05-18 Thread Terry
On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]> > escribió: > > > Is there a simple way to get all the instances of one class? I mean > > without any additional change to the class. > > Try with gc.get_referrers() >

Re: Get all the instances of one class

2008-05-18 Thread Terry
On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]> > escribió: > > > Is there a simple way to get all the instances of one class? I mean > > without any additional change to the class. > > Try with gc.get_referrers() >

ANN: Pyrex 0.9.8.2

2008-05-18 Thread Greg Ewing
Pyrex 0.9.8.2 is now available: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ A block of external functions can now be declared nogil at once. cdef extern from "somewhere.h" nogil: ... Also some minor nogil-related bugs have been fixed. What is Pyrex? -- Pyre

Re: Write bits in file

2008-05-18 Thread Ken Starks
I admit that I was mostly just interested in getting your question clarified, rather than having any great experise. But a bit of Googling took me to the 'Bit vector' module, [I googled: 'python ("bit array" OR "bit vector")'] which might be what you are after. I have no experience with it, mysel

Re: waiting on an event blocks all signals

2008-05-18 Thread Diez B. Roggisch
alan schrieb: This ignores CTRL-C on every platform I've tested: python -c "import threading; threading.Event().wait()" ^C^C^C^C It looks to me like all signals are masked before entering wait(). Can someone familiar with the internals explain and/or justify this behavior? Thanks, They aren't

Re: Write bits in file

2008-05-18 Thread Gabriel Genellina
En Sun, 18 May 2008 10:36:28 -0300, Monica Leko <[EMAIL PROTECTED]> escribió: > On May 18, 2:20 pm, Ken Starks <[EMAIL PROTECTED]> wrote: >> You want your file considered as a sequence of bits rather >> than a sequence of 8-bit bytes, do you? > > Yes. > >> is the 10-bit >> bit-pattern to be stored

Re: writing python extensions in assembly

2008-05-18 Thread Diez B. Roggisch
Also, from the gcc manpage, apparently 387 is the default when compiling for 32 bit architectures, and using sse instructions is default on x86-64 architectures, but you can use -march=(some architecture with simd instructions), -msse, -msse2, -msse3, or -mfpmath=(one of 387, sse, or sse,387) to g

Re: python newbie: some surprises

2008-05-18 Thread Lie
On May 8, 2:06 pm, v4vijayakumar <[EMAIL PROTECTED]> wrote: > When I started coding in python, these two things surprised me. > > 1. my code is inconsistently indented with the combination of tabs and > spaces. Even lines looked intended, but it is not. The problem is in tab not Python, there is n

Re: Using Python for programming algorithms

2008-05-18 Thread David C. Ullrich
On Sat, 17 May 2008 15:32:29 -0700 (PDT), Vicent Giner <[EMAIL PROTECTED]> wrote: >Hello. > >I am new to Python. It seems a very interesting language to me. Its >simplicity is very attractive. > >However, it is usually said that Python is not a compiled but >interpreted programming language —I mea

Re: "indexed properties"...

2008-05-18 Thread David C. Ullrich
On Sun, 18 May 2008 08:50:23 +0200, pataphor <[EMAIL PROTECTED]> wrote: >In article <[EMAIL PROTECTED]>, >[EMAIL PROTECTED] says... > >> >> window.pos = (x,y) >> >> >> >> seems more natural than >> >> >> >> window.SetPos(x,y); > >Yes, and to assign a row in a matrix I'd also like to use eithe

Re: howto use pylint from Eric IDE?

2008-05-18 Thread Detlev Offenbach
dmitrey wrote: > Hi all, > > I have Eric 4.1.1, pylint and Eric pylint plugin installed, but I > cannot find how to use pylint from Eric IDE GUI. > Does anyone know? > > Thank you in advance, D. Project->Check->Run PyLint Regards, Detlev -- Detlev Offenbach [EMAIL PROTECTED] -- http://mail.py

Re: explain this function to me, lambda confusion

2008-05-18 Thread Arnaud Delobelle
Lie <[EMAIL PROTECTED]> writes: > Lambda can actually be safely removed from python and no other > features would be missing. It is always possible to create a def > version of any lambda, so lambda is useless. It is just a convenience > for the times where we're just too lazy to invent a name and

Re: Write bits in file

2008-05-18 Thread Monica Leko
On May 18, 2:20 pm, Ken Starks <[EMAIL PROTECTED]> wrote: > You want your file considered as a sequence of bits rather > than a sequence of 8-bit bytes, do you? Yes. > is the 10-bit > bit-pattern to be stored at an arbitrary bit-position in > the file Yes. I need arbitrary, 8bits, than 10 bits

Re: explain this function to me, lambda confusion

2008-05-18 Thread Lie
On May 9, 12:12 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 08 May 2008 22:57:03 -0300,   > <[EMAIL PROTECTED]> escribió: > > > > > On May 8, 6:11 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > > >> No, no, no, no, no! > > Geez.  Go easy. > >> You have got it entirely wrong here. Yo

Re: explain this function to me, lambda confusion

2008-05-18 Thread Lie
On May 9, 8:57 am, [EMAIL PROTECTED] wrote: > On May 8, 6:11 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > > > > > No, no, no, no, no! > > Geez.  Go easy. > > > > > You have got it entirely wrong here. Your XOR function simply returns a > > function which gives you the result of xoring the paramete

Re: How to modify meaning of builtin function "not" to "!"?

2008-05-18 Thread Lie
On May 9, 8:41 pm, grbgooglefan <[EMAIL PROTECTED]> wrote: > I am creating functions, the return result of which I am using to make > decisions in combined expressions. > In some expressions, I would like to inverse the return result of > function. > > E.g. function contains(source,search) will ret

Re: secret code?

2008-05-18 Thread Duncan Booth
Sanoski <[EMAIL PROTECTED]> wrote: > What would you guys says about this secret code? The key was > apparently lost. The guy never sent it, and he was never seen again. > It must stand for letters in the alphabet, but it almost looks like > trajectory tables. I don't know. What do you guys think?

Re: multiple databases, what's the best interface ?

2008-05-18 Thread M.-A. Lemburg
On 2008-05-17 20:54, Stef Mientki wrote: hello, I need to switch fluently between 2 or 3 types of dbases: SQLite, Sybase ( and in the future MS SQL-server). I need both closed application and general purpose database manager, which should run on different platforms (windows, windows mobile, not

Re: Write bits in file

2008-05-18 Thread Ken Starks
You want your file considered as a sequence of bits rather than a sequence of 8-bit bytes, do you? is the 10-bit bit-pattern to be stored at an arbitrary bit-position in the file, or is the whole file regularly subdivided at 10-bit intervals? Monica Leko wrote: Hi I have a specific format and

Re: Using Python for programming algorithms

2008-05-18 Thread sturlamolden
On May 18, 5:46 am, "inhahe" <[EMAIL PROTECTED]> wrote: > The numbers I heard are that Python is 10-100 times slower than C. Only true if you use Python as if it was a dialect of Visual Basic. If you use the right tool, like NumPy, Python can be fast enough. Also note that Python is not slower th

secret code?

2008-05-18 Thread Sanoski
What would you guys says about this secret code? The key was apparently lost. The guy never sent it, and he was never seen again. It must stand for letters in the alphabet, but it almost looks like trajectory tables. I don't know. What do you guys think? http://i243.photobucket.com/albums/ff273/ez

Re: Error when calling superclass __init__ method

2008-05-18 Thread Peter Otten
Maese Fernando wrote: > I'm getting an odd error while trying to call the __init__ method of a > super class: > > BaseField.__init__(self) > TypeError: unbound method __init__() must be called with BaseField > instance as first argument (got nothing instead) > > > This is the code: No, it isn'

Re: addendum Re: working with images (PIL ?)

2008-05-18 Thread Ken Starks
Oops. I meant: WhiteArea=Result.histogram()[255] of course, not WhiteArea=Result.histogram()[0] Ken Starks wrote: As others have said, PIL has the 'histogram' method to do most of the work. However, as histogram works on each band separately, you have a bit of preliminary programming first t

Re: Psyco alternative

2008-05-18 Thread Jacob Hallen
In article <[EMAIL PROTECTED]>, sturlamolden <[EMAIL PROTECTED]> wrote: >On Mar 27, 4:44 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >> PyPy is self-hosted and has been for some time (a year or so?). > >This is technically not correct. PyPy is hosted by RPython, which is >not Python but a

Re: how would you...?

2008-05-18 Thread inhahe
"Sanoski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm pretty new to programming. I've just been studying a few weeks off > and on. I know a little, and I'm learning as I go. Programming is so > much fun! I really wish I would have gotten into it years ago, but > here's my qu

Write bits in file

2008-05-18 Thread Monica Leko
Hi I have a specific format and I need binary representation. Does Python have some built-in function which will, for instance, represent number 15 in exactly 10 bits? -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python for programming algorithms

2008-05-18 Thread dmitrey
Along with numpy & scipy there is some more Python scientific soft worse to be mentioned: http://scipy.org/Topical_Software http://pypi.python.org/pypi?:action=browse&show=all&c=385 On 18 Тра, 06:25, Henrique Dante de Almeida <[EMAIL PROTECTED]> wrote: > once I > looked for linear programming too

Re: morning in Python

2008-05-18 Thread inhahe
> My ideal language would be a natively compiling cross between C++ and > Python. Objects declared with a type would be statically typed, objects > not declared with a type would be dynamically typed. There would also be > keywords to declare that class names won't be reassigned and class > a

Error when calling superclass __init__ method

2008-05-18 Thread Maese Fernando
Hi, I'm getting an odd error while trying to call the __init__ method of a super class: BaseField.__init__(self) TypeError: unbound method __init__() must be called with BaseField instance as first argument (got nothing instead) This is the code: class BaseField(object): def _addFieldsTo

Re: morning in Python

2008-05-18 Thread inhahe
"inhahe" <[EMAIL PROTECTED]> wrote in message news:... > >>It is not clear that the first (cheapest best) human->computer language >>is a computer language, though if two were orthonormal >in comparison >>to life, Python's fine. Not my first. > > The utterly dry, closed, logical, definitive, hier

Re: morning in Python

2008-05-18 Thread inhahe
>It is not clear that the first (cheapest best) human->computer language >is a computer language, though if two were orthonormal >in comparison >to life, Python's fine. Not my first. The utterly dry, closed, logical, definitive, hierarchical, consistent, determinate nature of a computer languag

Re: morning in Python

2008-05-18 Thread Ivan Illarionov
On Sun, 18 May 2008 11:15:06 +0200, Martin v. Löwis wrote: > There is also the issue of aliases. Some call it Moscow, some Moskau, > when it is really called Москва. Of course, the same issue exists for > states: some call it Kalifornien, others California. I don't see any issues here. Everybody

Re: morning in Python

2008-05-18 Thread Marc 'BlackJack' Rintsch
On Sun, 18 May 2008 11:15:06 +0200, Martin v. Löwis wrote: >> Full day later, I think it, to emphasize state, would prioritize >> context. The reason for the huge ramble was, believe it or not, >> namespace conflict... as though any other states around here might >> nose in. > > I think the name

Re: morning in Python

2008-05-18 Thread Martin v. Löwis
> Full day later, I think it, to emphasize state, would prioritize > context. The reason for the huge ramble was, believe it or not, > namespace conflict... as though any other states around here might > nose in. I think the namespace conflict is rather in cities than in states. For example, ther

GOZERBOT 0.8.1-BETA released

2008-05-18 Thread Bart Thate
working to a new 0.8.1 release we make a BETA available to be tested by interested users. new features: * ssl connections are now supported * third party software included into gozerbot: o feedparser (used by RSS) .. makes atom feeds possible o simplejson (used by COL

  1   2   >