Re: dynamic unittest

2006-07-16 Thread Peter Otten
Oleg Paraschenko wrote: > Hello, > > I decided to re-use functionality of "unittest" module for my purposes. > More precisely, I have a list of folders. For each folder, code should > enter to the folder, execute a command and assert the output. It's > reasonable to use "unittest" here, but the

Re: Cool Python Ebooks Site

2006-07-16 Thread John Bokma
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 17 Jul 2006 01:39:27 GMT, John Bokma <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> But everything to make a little AdSense money no? How would you like >> it if everybody who read your message clicks 10 times on each ad?

Re: General Hash Functions In Python

2006-07-16 Thread Paul Rubin
"Arash Partow" <[EMAIL PROTECTED]> writes: > I've ported various hash functions to python if anyone is interested: Are these useful for any particular interoperability purposes? Otherwise I'd say just one such hash is plenty, or maybe don't even bother, since Python's built-in dicts are sufficient

General Hash Functions In Python

2006-07-16 Thread Arash Partow
Hi all, I've ported various hash functions to python if anyone is interested: def RSHash(key): a= 378551 b= 63689 hash = 0 for i in range(len(key)): hash = hash * a + ord(key[i]) a = a * b return (hash & 0x7FFF) def JSHash(key): hash = 131

dynamic unittest

2006-07-16 Thread Oleg Paraschenko
Hello, I decided to re-use functionality of "unittest" module for my purposes. More precisely, I have a list of folders. For each folder, code should enter to the folder, execute a command and assert the output. It's reasonable to use "unittest" here, but the problem is that "unittest" doesn't sup

Using Bandwidth throtlling with python!

2006-07-16 Thread Manpreet Singh
Hi, I am using python2.4 for one of my application where I need to use paramiko for doing sftp. My application sftp to a server and get all the data needed locally. Now I have a utility names TRICKLE which does bandwidth throtlling. i.e. it control the data flow. Now if I use trickle with my

Re: What is a type error?

2006-07-16 Thread Zoltan Somogyi
Andreas Rossberg <[EMAIL PROTECTED]> writes: >Uh, aliasing all over the place! Actually, I think that logic >programming, usually based on deep unification, brings by far the worst >incarnation of aliasing issues to the table. I agree that deep unification, as implemented in Prolog, brings with

Re: embedding executable code in a regular expression in Python

2006-07-16 Thread Stefan Behnel
Avi Kak wrote: > Does regular expression processing in Python allow for executable > code to be embedded inside a regular expression? > > For example, in Perl the following two statements > > $regex = qr/hello(?{print "saw hello\n"})mello(?{print "saw > mello\n"})/; > "jellohellomello" =~ /$reg

Re: compiling 2.3.5 on ubuntu

2006-07-16 Thread Justin Azoff
Py PY wrote: > (Apologies if this appears twice. I posted it yesterday and it was held > due to a 'suspicious header') > > I'm having a hard time trying to get a couple of tests to pass when > compling Python 2.3.5 on Ubuntu Server Edition 6.06 LTS. I'm sure it's > not too far removed from the desk

unsynchronized text streams in OGG (lyrics)

2006-07-16 Thread matej . cepl
Hi, I heard somewhere that OGG container format is capable of storing arbitrary long text streams inside OGG container. I would love to use it for storing lyrics inside the .ogg files. Is it true? Could anybody provide more information how to do it? Is there any Python code for doing this? Thank

Re: how to know if socket is still connected

2006-07-16 Thread nephish
cool enough, thanks ! -sk Grant Edwards wrote: > On 2006-07-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >> If the server has closed the connection, then a recv() on the > >> socket will return an empty string "", and a send() on the > >> socket will raise an exception. > > > like this ?

Re: Calling python functions from C

2006-07-16 Thread John Machin
On 17/07/2006 6:47 AM, [EMAIL PROTECTED] wrote: > Could anybody tell me how to call python modules from C. > > e.g. my Python module : > def add(a,b) > return(a+b) > > How can I call "add.py" from C? Please post any simple example. I've never contemplated embedding before, but have done

Re: Cool Python Ebooks Site

2006-07-16 Thread John Bokma
[EMAIL PROTECTED] wrote: > Here is a cool site were you can preview python ebooks. It would be more cool if your spamvertized sites had the links to the actual sites that host the free books, like Dive into Python and had no links at all to clear copyright infringements. Instead of contributing

urllib (in thread) never returns

2006-07-16 Thread Kingsley
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I've been having an intermittent problem with urllib. With an interval of around 15 minutes (i.e.: this is run every 15m) this code runs fine for about 1-2 weeks, but then gets it's knickers in a twist, and never seems to return, nor except. try:

Re: how to know if socket is still connected

2006-07-16 Thread Grant Edwards
On 2006-07-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> If the server has closed the connection, then a recv() on the >> socket will return an empty string "", and a send() on the >> socket will raise an exception. > like this ? > databack = aeris_sockobj.recv(2048) > if databack: >

Re: compiling 2.3.5 on ubuntu

2006-07-16 Thread Py PY
Sorry to be a pest but is there anybody that could help me understand a) if any of this is a problem; and b) where I can learn how to fix it. Thank you very much for any pointers. On 2006-07-10 11:45:51 -0400, Py PY <[EMAIL PROTECTED]> said: > (Apologies if this appears twice. I posted it yeste

Re: What is a type error?

2006-07-16 Thread Chris Smith
Darren New <[EMAIL PROTECTED]> wrote: > I'm not sure what linear or uniqueness typing is. It's typestate, and if > I remember correctly the papers I read 10 years ago, the folks at > TJWatson that invented Hermes also invented the concept of typestate. > They at least claim to have coined the te

Re: Cool Python Ebooks Site

2006-07-16 Thread nephish
are not most (or all) of these copywrite protected ? thats why i have not pulled some of them myself, you can get most of them used from amazon for about $10 [EMAIL PROTECTED] wrote: > http://cooldogebooks.blogspot.com/2006/05/python-ebooks.html > > Here is a cool site were you can preview python

Re: how to know if socket is still connected

2006-07-16 Thread nephish
Grant Edwards wrote: > On 2006-07-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > serverhost = 'xxx.xxx.xxx.xxx' > > serverport = 9520 > > aeris_sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > > aeris_sockobj.connect((serverhost,serverport)) > > > > while 1: > > do this or

Re: What is a type error?

2006-07-16 Thread Chris Smith
David Hopwood <[EMAIL PROTECTED]> wrote: > Chris Smith wrote: > > If checked by execution, yes. In which case, I am trying to get my head > > around how it's any more true to say that functional languages are > > compilable postconditions than to say the same of imperative languages. > > A post

Re: What is a type error?

2006-07-16 Thread Marshall
Joachim Durchholz wrote: > Marshall schrieb: > > > > Good point. Perhaps I should have said "relational algebra + > > variables with assignment." It is interesting to consider > > assignment vs. the more restricted update operators: insert, > > update, delete. > > Actually I see it the other way ro

Re: how to know if socket is still connected

2006-07-16 Thread Grant Edwards
On 2006-07-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > serverhost = 'xxx.xxx.xxx.xxx' > serverport = 9520 > aeris_sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > aeris_sockobj.connect((serverhost,serverport)) > > while 1: > do this or that with socket, > send and recei

Re: How to lock files (the easiest/best way)?

2006-07-16 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Jim Segrave <[EMAIL PROTECTED]> wrote: >except OSError, e: >if e.errno != errno.EEXIST: this should read: if e.errno != errno.ENOENT: (it was left with EEXIST from testing this code by forcing an error, as the code for this failure

Re: How to lock files (the easiest/best way)?

2006-07-16 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Eric S. Johansson <[EMAIL PROTECTED]> wrote: >Elmo Mäntynen wrote: >> Is there something better than using fnctl? It seems a bit intimidating >> with a quick look. > >try the portlocker wrapper from the active state cookbook. I have a >version which has been slight

Re: embedding executable code in a regular expression in Python

2006-07-16 Thread Ben C
On 2006-07-16, Avi Kak <[EMAIL PROTECTED]> wrote: > Folks, > > Does regular expression processing in Python allow for executable > code to be embedded inside a regular expression? > > For example, in Perl the following two statements > > $regex = qr/hello(?{print "saw hello\n"})mello(?{print "saw >

Re: embedding executable code in a regular expression in Python

2006-07-16 Thread Anthra Norell
- Original Message - From: "Avi Kak" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Sunday, July 16, 2006 11:05 PM Subject: embedding executable code in a regular expression in Python > Folks, > > Does regular expression processing in Python allow for executable > code to be

Cool Python Ebooks Site

2006-07-16 Thread bigskipster
http://cooldogebooks.blogspot.com/2006/05/python-ebooks.html Here is a cool site were you can preview python ebooks. Here are just a few listed Advanced_Python_programming.pdf 20-Oct-2004 14:23 194K EP2003CppExtensions.pdf 20-Oct-2004 14:25 2.0M GUI Programming with Python.zip 20-Oct-2004 14

Re: Embedding exe file

2006-07-16 Thread M�ta-MCI
Hi! This script : import base64 data=open("D:\\toto.exe","rb").read() data64='''import base64,os data="""'''+base64.b64encode(data)+'''""" f=open(r"C:\\temporaire.exe","wb").write(base64.b64decode(data)) os.system(r"C:\\temporaire.exe") ''' f=open("64exe.py","w").

Re: Commercial Programming

2006-07-16 Thread Boomshiki
After some consideration that is the approach I will head actually. Thank you for the help swaying my decision. "Sybren Stuvel" > In that case, I'd really go with Mark's idea of turning it into a web > service. You could use XML-RPC over SSL to secure the communication > between a client progra

embedding executable code in a regular expression in Python

2006-07-16 Thread Avi Kak
Folks, Does regular expression processing in Python allow for executable code to be embedded inside a regular expression? For example, in Perl the following two statements $regex = qr/hello(?{print "saw hello\n"})mello(?{print "saw mello\n"})/; "jellohellomello" =~ /$regex/; will produce the

Calling python functions from C

2006-07-16 Thread robert . differentone
Could anybody tell me how to call python modules from C. e.g. my Python module : def add(a,b) return(a+b) How can I call "add.py" from C? Please post any simple example. I have read Python embedding in Python Manual but I get "ImportError" all the time? Any help would be appreciated !

Re: sys.modules and __main__ obscureness

2006-07-16 Thread K.S.Sreeram
Fuzzyman wrote: > That was a quick response. :-) > > Thanks very much. Sigh.. When I'm drowning in arcane win32 c++ crap, I tend to jump on anything interesting on python-list. It feels like a breath of fresh air! [sreeram;] signature.asc Description: OpenPGP digital signature -- http://mail

Re: How to lock files (the easiest/best way)?

2006-07-16 Thread Eric S. Johansson
Elmo Mäntynen wrote: > Is there something better than using fnctl? It seems a bit intimidating > with a quick look. try the portlocker wrapper from the active state cookbook. I have a version which has been slightly updated for more modern pythons. I really need to make my darcs repository vis

Re: insert method in ElementTree

2006-07-16 Thread Carl Banks
[EMAIL PROTECTED] wrote: > My request for advice is this: instead of creating a second XML > document that represents the output, would it be possible to expand the > input XML document as needed? I was thinking that the program could > iterate through all the elements. As it is iterating, it wo

Re: What is a type error?

2006-07-16 Thread Joachim Durchholz
Marshall schrieb: > > Good point. Perhaps I should have said "relational algebra + > variables with assignment." It is interesting to consider > assignment vs. the more restricted update operators: insert, > update, delete. Actually I see it the other way round: assignment is strictly less power

how to know if socket is still connected

2006-07-16 Thread nephish
lo there, i have a simple app that connects to a socket to get info from a server i looks like this serverhost = 'xxx.xxx.xxx.xxx' serverport = 9520 aeris_sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM) aeris_sockobj.connect((serverhost,serverport)) while 1: do this or that with

Re: sys.modules and __main__ obscureness

2006-07-16 Thread Fuzzyman
K.S.Sreeram wrote: > Fuzzyman wrote: > > This code behaves differently when entered into an interactive > > interpreter session. When run as a program you will see that module and > > namespace have both become None !! > > Thats because the reference count to the current '__main__' module goes > t

Re: Very simple speed benchmark of few string substitions ways

2006-07-16 Thread Stefan Behnel
Rafal Zawadzki wrote: > I was curious of performance new Python 2.4 "Simpler String Substitutions" > so I decided to benchmark it. What I get > > [EMAIL PROTECTED]:~/python/benchmarks$ python template.py > Normal python string substition = 0.017546 seconds >PEP 292: Simpler String Sub

Re: sys.modules and __main__ obscureness

2006-07-16 Thread K.S.Sreeram
Fuzzyman wrote: > This code behaves differently when entered into an interactive > interpreter session. When run as a program you will see that module and > namespace have both become None !! Thats because the reference count to the current '__main__' module goes to 0, and the module object gets d

Re: insert method in ElementTree

2006-07-16 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > Where I'm struggling is figuring out what the index argument should > be in the insert method. Using the example above > > # assume rootElement is the root of the input XML > xList = rootElement.getiterator() > idx = 0 > for x in xList: > # mix of pseudo-code and

Re: What is a type error?

2006-07-16 Thread Chris Smith
Marshall <[EMAIL PROTECTED]> wrote: > Is it possible you're being distracted by the syntax? WHERE is a > binary operation taking a relation and a filter function. I don't > think of filters as being like array indexing; do they appear > analogous to you? (Always a difficult question because often >

sys.modules and __main__ obscureness

2006-07-16 Thread Fuzzyman
Hello all, I am messing with namespaces, so that code I exec thinks it is executing in the __main__ module. I have the following code : import imp import sys # can't call the module '__main__' or 'new_module' returns the real one module = imp.new_module('_') namespace = module.__dict__ namespac

Re: What is a type error?

2006-07-16 Thread Chris Smith
We Chris's stick together, as always. Marshall <[EMAIL PROTECTED]> wrote: > > Unfortunately, they are the right level. Actually,the right level > > might even be lower, the fields within a record, but that's moving > > even farther away from the direction you wish to go. The right level > > is t

insert method in ElementTree

2006-07-16 Thread mirandacascade
O/S: Win2K Vsn of Python: 2.4 Example: text for c text for d text for f text for g> text for i text for k text for l text for m Python script reads XML document above into ElementTree. The script outputs an XML document that is ba

RE: Regular Expression problem

2006-07-16 Thread Paul McGuire
> > Less is more: > > pat = re.compile(r'href="([^"]+)') > pat.search(your_link) > > Be sure to also catch: And it's not certain whether the OP is interested in tags like: -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-16 Thread Marshall
Chris F Clark wrote: > "Marshall" <[EMAIL PROTECTED]> wrote: > > In general, I feel that "records" are not the right conceptual > > level to think about. > > Unfortunately, they are the right level. Actually,the right level > might even be lower, the fields within a record, but that's moving > eve

Re: What is a type error?

2006-07-16 Thread Marshall
Joachim Durchholz wrote: > Marshall schrieb: > > > But what you descrbe is certainly *not* possible in the > > relational algebra; alas that SQL doesn't hew closer > > to it. Would you agree? > > Yup, SQL (particularly its update semantics) aren't relational semantics. > Still, it's SQL we've been

Re: Problem Solved

2006-07-16 Thread costello . bob
dylpkls91 wrote: > Thank you all for your responses. > > I have managed to figure out a solution using XML RPC which fits my > needs perfectly. Mind posting it for us lesser beings? ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-16 Thread Dr.Ruud
Chris F Clark schreef: > If you have a fixed database, and you do two selects which specify the > same sets of fields to be selected and the same keys to select records > with, one expects the two selects to return the same values. When your "fixed" means read-only, or (fully) locked, then yes.

Embedding exe file

2006-07-16 Thread Bayazee
hi how i can Embed an exe file in python program ? i want read an exe file then convert it to base64 and store in a string format and Embedd in python code such this : Exe='''R0lGODdhFQAVAPMAAAQ2PESapISCBASCBMTCxPxmNCQiJJya/ISChGRmzPz+/PxmzDQyZ DQyZDQyZDQyZCwAFQAVAAAElJDISau9Vh2WMD0gqHHelJwnsX

Re: instantiate all subclasses of a class

2006-07-16 Thread Simon Forman
Daniel Nogradi wrote: > > > What is the simplest way to instantiate all classes that are > > > subclasses of a given class in a module? > > > > > > More precisely I have a module m with some content: > > > > > > # m.py > > > class A: > > > pass > > > class x( A ): > > > pass > > > class y(

Re: What is a type error?

2006-07-16 Thread Chris F Clark
"Marshall" <[EMAIL PROTECTED]> wrote: > In general, I feel that "records" are not the right conceptual > level to think about. Unfortunately, they are the right level. Actually,the right level might even be lower, the fields within a record, but that's moving even farther away from the direction

Very simple speed benchmark of few string substitions ways

2006-07-16 Thread Rafal Zawadzki
I was curious of performance new Python 2.4 "Simpler String Substitutions" so I decided to benchmark it. What I get [EMAIL PROTECTED]:~/python/benchmarks$ python template.py Normal python string substition = 0.017546 seconds PEP 292: Simpler String Substitutions = 0.243750 seconds

Re: InteractiveConsole History on Linux

2006-07-16 Thread Chris Spencer
[EMAIL PROTECTED] wrote: > Chris> Yeah, "import readline" works just fine. My problem isn't hard to > Chris> replicate. Can anyone else on Linux get command history to work > Chris> with the following code? Note, it should be saved and run from a > Chris> file. > > Command history

Re: instantiate all subclasses of a class

2006-07-16 Thread Daniel Nogradi
> > What is the simplest way to instantiate all classes that are > > subclasses of a given class in a module? > > > > More precisely I have a module m with some content: > > > > # m.py > > class A: > > pass > > class x( A ): > > pass > > class y( A ): > > pass > > # all kinds of other o

Re: instantiate all subclasses of a class

2006-07-16 Thread Daniel Nogradi
> > >>> from inspect import isclass > > >>> > > >>> class x: > > ... def __getattr__( self, attr ): > > ... pass > > ... > > >>> y = x( ) > > >>> isclass( y ) > > True > > Which reinforces Michael Spencer's instinct that the inspect.isclass() > implementation is a bit too clever Wou

Re: instantiate all subclasses of a class

2006-07-16 Thread Peter Otten
Daniel Nogradi wrote: > Thanks, this looks pretty good. However there is some wierdness with > isclass: whenever a class has a __getattr__ method an instance of it > will be detected by isclass as a class (although it is not). > > >>> from inspect import isclass > >>> > >>> class x: > ... de

Re: Accessors in Python (getters and setters)

2006-07-16 Thread Gerhard Fiedler
On 2006-07-15 19:46:16, Ben C wrote: > There isn't any practical difference, as you say, if all the setter does > is set. But it might easily do a few other subtle things, in particular > wait for a good moment to actually effect the change. I agree. But even then, for me there's no practical dif

Re: instantiate all subclasses of a class

2006-07-16 Thread Daniel Nogradi
> > More precisely I have a module m with some content: > > > > # m.py > > class A: > > pass > > class x( A ): > > pass > > class y( A ): > > pass > > # all kinds of other objects follow > > # end of m.py > > > > and then in another module I have currently: > > > > # n.py > > import m >

Re: instantiate all subclasses of a class

2006-07-16 Thread Simon Forman
Daniel Nogradi wrote: > What is the simplest way to instantiate all classes that are > subclasses of a given class in a module? > > More precisely I have a module m with some content: > > # m.py > class A: > pass > class x( A ): > pass > class y( A ): > pass > # all kinds of other objec

Re: instantiate all subclasses of a class

2006-07-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Daniel Nogradi wrote: > More precisely I have a module m with some content: > > # m.py > class A: > pass > class x( A ): > pass > class y( A ): > pass > # all kinds of other objects follow > # end of m.py > > and then in another module I have currently: > > #

Re: Commercial Programming

2006-07-16 Thread Ben Finney
"Boomshiki" <[EMAIL PROTECTED]> writes: > I am aware that someone can recreate what we have done, but for them > to cut, paste, sell is kind of a rip off. Unless you factor that into your business model, and create compelling value that doesn't depend on the secrecy of something you place under t

Re: Commercial Programming

2006-07-16 Thread Ben Finney
"Boomshiki" <[EMAIL PROTECTED]> writes: > I don't mean to be the dick who does not support open source, but > the rent does not pay itself these days. Non sequitur. The license terms for the software are orthogonal to whether one charges money for it. Viz the numerous businesses worldwide happily

Re: PyQT installation /configuration

2006-07-16 Thread David Boddie
[EMAIL PROTECTED] wrote: > David Boddie wrote: > > > However, you will have difficulty using the examples in that book > > because it was written for PyQt3. > > Ah yes, it doesn't recognise "QApplication" now. Never mind. QApplication is still there. You can access it via the Qt module and create

Re: reading specific lines of a file

2006-07-16 Thread Fredrik Lundh
John Machin wrote: >> 'sed' is not recognized as an internal or external command, >> operable program or batch file. > > aarrbejaysus #2: Download the installer from > > http://gnuwin32.sourceforge.net/packages/sed.htm in a way, this kind of advice reminds me of http://thedailywtf.co

Re: Commercial Programming

2006-07-16 Thread Fredrik Lundh
Boomshiki wrote: > And trust me, I am not worried about 16 yr olds using it without paying, why > would they want to? I am worried about them cracking in to where their > grades are kept. what does "hiding your source code" has to do with that ? -- http://mail.python.org/mailman/listinfo/p

IDLE built-in help in Linux vs Windows

2006-07-16 Thread Paul Rubin
In Windows if you click the Help dropdown, IDLE launches a help window as it should. The help contents are included in the installation. In Linux, clicking Help launches a web browser, which is a perfectly good UI for viewing help. However, instead of loading a static HTML file from the disk lik

Re: Commercial Programming

2006-07-16 Thread Paul Rubin
"Boomshiki" <[EMAIL PROTECTED]> writes: > And trust me, I am not worried about 16 yr olds using it without paying, why > would they want to? I am worried about them cracking in to where their > grades are kept. You should assume they have the source code in that case. In fact you're better off

Re: Commercial Programming

2006-07-16 Thread K.S.Sreeram
Boomshiki wrote: > And trust me, I am not worried about 16 yr olds using it without paying, why > would they want to? I am worried about them cracking in to where their > grades are kept. what you need is data security... *not* code obfuscation.. [sreeram;] signature.asc Description: OpenPG

Re: Commercial Programming

2006-07-16 Thread Boomshiki
I am aware that someone can recreate what we have done, but for them to cut, paste, sell is kind of a rip off. And trust me, I am not worried about 16 yr olds using it without paying, why would they want to? I am worried about them cracking in to where their grades are kept. -- http://mail.

instantiate all subclasses of a class

2006-07-16 Thread Daniel Nogradi
What is the simplest way to instantiate all classes that are subclasses of a given class in a module? More precisely I have a module m with some content: # m.py class A: pass class x( A ): pass class y( A ): pass # all kinds of other objects follow # end of m.py and then in another m

Re: Commercial Programming

2006-07-16 Thread Paul Rubin
"Boomshiki" <[EMAIL PROTECTED]> writes: > Now the big issue at hand is how well will I be able to mask my source code? Not all that well, but it really doesn't matter. Someone who sees what the program does can write another one like it, without seeing your source code. -- http://mail.python.or

Re: Commercial Programming

2006-07-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Boomshiki wrote: > Now the big issue at hand is how well will I be able to mask my source code? > After all I wouldn't want some someone walking off to the bank with our hard > work. That and almost any 16 yr old can look at Python source and know what > it is talking ab

Re: InteractiveConsole History on Linux

2006-07-16 Thread skip
Chris> Yeah, "import readline" works just fine. My problem isn't hard to Chris> replicate. Can anyone else on Linux get command history to work Chris> with the following code? Note, it should be saved and run from a Chris> file. Command history across sessions or just command reca

Commercial Programming

2006-07-16 Thread Boomshiki
I don't mean to be the dick who does not support open source, but the rent does not pay itself these days. What I got is a huge undertaking that will change the way teachers handing their grading sytem (that is as far as I can go without breaking my terms in the contract). Now I have a variet

Python Data Explorer

2006-07-16 Thread Wojciech Morański
Does anybody know some GUI (preferably QT) application which can be use to explore pickled python objects? Similar functionality has a PyDev Debugger in Eclipse, but I would like to have a standalone application. I know that it is not hard to write it, but I don't want to again invent a wheel ;o)

Re: Regular Expression problem

2006-07-16 Thread Barry
On 13 Jul 2006 23:12:05 -0700, Paul McGuire <[EMAIL PROTECTED]> wrote: Pyparsing is also good for recognizing basic HTML tags and theirattributes, regardless of the order of the attributes.-- PaultestText = """sldkjflsa;fajhere it would be 'mystylesheet.css'. I used the following regex to getthis v

Re: Python for Embedded Systems?

2006-07-16 Thread Martin v. Löwis
Carl J. Van Arsdall wrote: > This raises a good question. Is there a need for python to change > somewhat to work better in an embedded profile? When I asked this question last on python-dev, there was exactly one response, and that was "yes, it needs to change". The natural question then is "

Re: newbie graphing recommendations ?

2006-07-16 Thread bearophileHUGS
Bryan: > do you think that pygame would be a good alternative to matplotlib to create > some graphs such simple bar and line graphs? For graphs MatPlotLib is usually better, and its antialiasing library (Anti-Grain Geometry) is wonderful. Pygame gives a bit more freedom but you have to do all for

Re: What is a type error?

2006-07-16 Thread Joachim Durchholz
Marshall schrieb: > Joachim Durchholz wrote: >> Marshall schrieb: >>> I would say, records in SQL have value, and their >>> identity is exactly their value. >> >> Definitely not. You can have two equal records and update just one of >> them, yielding non-equal records; by my definition (and by int

Re: reading specific lines of a file

2006-07-16 Thread John Machin
On 16/07/2006 5:16 PM, Fredrik Lundh wrote: > Bill Pursell wrote: > >> Some might argue that this is not really doing >> it in Python. In fact, I would argue that! But if >> you're at a command prompt and you want to >> see line 7358, it's much easier to type >> % sed -n 7358p aarrbejaysus #1:

Re: PyQT installation /configuration

2006-07-16 Thread Phil Thompson
On Sunday 16 July 2006 1:09 am, [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > Phil Thompson wrote: > > > For Qt4 use the binary installer from... > > > > > > http://www.trolltech.com/developer/downloads/qt/windows > > > > > > For PyQt4 use the binary installer from... > > > > > > http://w

Re: reading specific lines of a file

2006-07-16 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Yi Xing wrote: > I want to read specific lines of a huge txt file (I know the line #). > Each line might have different sizes. Is there a convenient and fast > way of doing this in Python? Thanks. file("myfile.txt").readlines()[LineNr] Convenient, yes. Fast, n

Re: reading specific lines of a file

2006-07-16 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Fredrik Lundh wrote: > Bill Pursell wrote: > >> Some might argue that this is not really doing >> it in Python. In fact, I would argue that! But if >> you're at a command prompt and you want to >> see line 7358, it's much easier to type >> % sed -n 7358p >> than

Re: Configuring IDLE on Linux

2006-07-16 Thread Ben C
On 2006-07-14, Adonis <[EMAIL PROTECTED]> wrote: > Satya Kiran wrote: >> Hello, >> I have upgraded to Python2.4 on my Red Hat 9.0 Linux box. >> I want to work with IDLE and ran a search to check it's presence. >> Here is what I get. >> >> [EMAIL PROTECTED] bin]# find / -iname idlelib >> /usr/local

Re: reading specific lines of a file

2006-07-16 Thread Fredrik Lundh
Bill Pursell wrote: > Some might argue that this is not really doing > it in Python. In fact, I would argue that! But if > you're at a command prompt and you want to > see line 7358, it's much easier to type > % sed -n 7358p > than it is to write the python one-liner. 'sed' is not recognized as

ANN: wxPython 2.6.3.3

2006-07-16 Thread Robin Dunn
Announcing -- The 2.6.3.3 release of wxPython is now available for download at http://wxpython.org/download.php. This is a mostly bug fix release and also includes builds for Python 2.5 on Mac and also Windows. A summary of other changes is listed below and at http://wxpython.org/recentc