Re: Module/package hierarchy and its separation from file structure

2008-01-24 Thread Carl Banks
On Jan 23, 4:49 am, Peter Schuller <[EMAIL PROTECTED]> wrote: > I do *not* want to simply break out X into org.lib.animal.x, and have > org.lib.animal import org.lib.animal.x.X as X. While this naively > solves the problem of being able to refer to X as org.lib.animal.X, > the solution is anything

Re: translating Python to Assembler

2008-01-24 Thread Tim Roberts
Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: >Grant Edwards wrote: > >> Trying to find assembly language stuff to look at is futile. >> Python doesn't get compiled into assembly language. > >So, how do processors execute Python scripts? :) Is that a rhetorical question? Grant is quite correct;

Re: sudoku solver in Python ...

2008-01-24 Thread Tim Roberts
Derek Marshall <[EMAIL PROTECTED]> wrote: >This is just for fun, in case someone would be interested and because >I haven't had the pleasure of posting anything here in many years ... > > http://derek.marshall.googlepages.com/pythonsudokusolver > >Appreciate any feedback anyone who takes the

Re: Module/package hierarchy and its separation from file structure

2008-01-24 Thread Gabriel Genellina
En Thu, 24 Jan 2008 05:16:51 -0200, Peter Schuller <[EMAIL PROTECTED]> escribió: >>> I do *not* want to simply break out X into org.lib.animal.x, and >>> have org.lib.animal import org.lib.animal.x.X as X. >> >>> While this naively solves the problem of being able to refer to X as >>> org.lib.an

Re: Stripping whitespace

2008-01-24 Thread cokofreedom
On Jan 24, 8:21 am, ryan k <[EMAIL PROTECTED]> wrote: > On Jan 23, 6:30 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > On Jan 24, 9:50 am, ryan k <[EMAIL PROTECTED]> wrote: > > > > Steven D'Aprano, you are a prick. > > > And your reasons for coming to that stridently expressed conclusion > > afte

ENMAC Mobile Phones, iPods EQ100 www.enmac.com.hk

2008-01-24 Thread Farooq
www.enmac.com.hk GSM Mobile Phones, Digital iPods, Digital Clocks, Digital Pens, Digital Quran. Enjoy these products with Islamic Features (Complete Holy Quran with Text and Audio, Tafaseer books, Ahadees Books, Daily Supplications, Universal Qibla Direction, Prayer Timing and much more) visit our

Re: Some questions about decode/encode

2008-01-24 Thread Marc 'BlackJack' Rintsch
On Wed, 23 Jan 2008 19:49:01 -0800, glacier wrote: > My second question is: is there any one who has tested very long mbcs > decode? I tried to decode a long(20+MB) xml yesterday, which turns out > to be very strange and cause SAX fail to parse the decoded string. That's because SAX wants bytes,

The Way to Paradise

2008-01-24 Thread abdo911
We are all in quest of true happiness. In this world, the idea of true/perfect happiness is not feasible because this world is inevitably doomed to total annihilation. True happiness is found only in dwelling upon Paradise, and enjoying its blessings. However, none would enter Paradise except

The Way to Paradise

2008-01-24 Thread abdo911
We are all in quest of true happiness. In this world, the idea of true/perfect happiness is not feasible because this world is inevitably doomed to total annihilation. True happiness is found only in dwelling upon Paradise, and enjoying its blessings. However, none would enter Paradise except

Re: A GUI framework for running simulations

2008-01-24 Thread Nick Craig-Wood
Martin Manns <[EMAIL PROTECTED]> wrote: > If you want to keep things simple, pygame could be an alternative for > visualizing simulations and setting parameters even though it does not > provide all these fancy widgets around. I'd second that. pygame will give you a window you can draw on whic

Re: Increment Variable Name

2008-01-24 Thread Diez B. Roggisch
Grant Edwards schrieb: > On 2008-01-23, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> David Brochu schrieb: >>> This is probably really trivial but I'm stumped :-( >>> >>> Does anyone know how to increment a variable name? >>> >>> For example: >>> >>> I know the length of a list and I want to

Re: Lxml on mac

2008-01-24 Thread marcroy . olsen
On Jan 23, 5:08 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > > But do anybody know if there is an easy way to use schema validation > > in python(on a mac) ? > > You mean: easier than the above? Likely not many... > Well thanks for the reply's. I found GenerateDS make by Dave Kuhlman. I wil

Re: Some questions about decode/encode

2008-01-24 Thread John Machin
On Jan 24, 2:49 pm, glacier <[EMAIL PROTECTED]> wrote: > I use chinese charactors as an example here. > > >>>s1='你好吗' > >>>repr(s1) > > "'\\xc4\\xe3\\xba\\xc3\\xc2\\xf0'" > > >>>b1=s1.decode('GBK') > > My first question is : what strategy does 'decode' use to tell the way > to seperate the words. I

Re: pairs from a list

2008-01-24 Thread Matthew_WARREN
:) I knew it was too simple to be true and appropriately slows down when corrected, dang. :) Matt. Internet

Re: wxpython

2008-01-24 Thread Tim Golden
[Tim Golden] >> wxPython is trying to interpret your byte stream as a Unicode >> text stream encoded as cp1252. But it's not, so it gives up >> in a heap. One solution is to pass the repr of file_content. >> Another solution is for you to prefilter the text, replacing >> non-printables by their hex

Navigating through python packages

2008-01-24 Thread Marcelo de Moraes Serpa
Hello, I work with Zope and Plone, hence I deal with lots of eggs and python packages and modules. I'm always opening source files inside packages, closing them, opening again, searching through them... The main issue here is the level of directory nesting.. you need to write a lot (in emacs) or

Designing website

2008-01-24 Thread joe jacob
Hi All, I am planning to design a website using windows, apache, mysql, python. But I came to know that python cgi is very slow. I came across mod_python also but no good documentation are available for learning mod_python. Suggest me a good solution for this as I don't know other languages like P

Re: wxpython

2008-01-24 Thread joe jacob
On Jan 24, 4:20 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > [Tim Golden] > > > > >> wxPython is trying to interpret your byte stream as a Unicode > >> text stream encoded as cp1252. But it's not, so it gives up > >> in a heap. One solution is to pass the repr of file_content. > >> Another solution

Re: wxpython

2008-01-24 Thread Tim Golden
[... snip stuff from TJG ...] joe jacob wrote: > Thanks for the information. I'll try to manage it some how. If you haven't already, try posting to a wxPython or wxWidgets mailing list; maybe someone's already done this kind of thing? TJG -- http://mail.python.org/mailman/listinfo/python-list

Re: Designing website

2008-01-24 Thread Tim Chase
> I am planning to design a website using windows, apache, mysql, > python. You don't mention what sort of website...low-volume or high-volume, basic text or graphic-intensive, simple design or complex web-application logic. Each of these factors into one's choice. > But I came to know that pyth

Re: Increment Variable Name

2008-01-24 Thread janislaw
On Jan 23, 11:45 pm, David Brochu <[EMAIL PROTECTED]> wrote: > This is probably really trivial but I'm stumped :-( > > Does anyone know how to increment a variable name? > > For example: > > I know the length of a list and I want to pass each element of a list   > to a unique variable, thus I w

Re: Terminology: "script" versus "program"

2008-01-24 Thread samwyse
Ben Finney wrote: > George Sakkis <[EMAIL PROTECTED]> writes: > > >>On Jan 23, 8:14 pm, [EMAIL PROTECTED] wrote: >> >>>The annual Linux Journal survey is online now for any Linux users >>>who want to vote for Python. >>>http://www.linuxjournal.com/node/1006101 >> >>... >>18. What is your favorite

Re: Increment Variable Name

2008-01-24 Thread Paul Hankin
On Jan 24, 12:02 pm, janislaw <[EMAIL PROTECTED]> wrote: > On Jan 23, 11:45 pm, David Brochu <[EMAIL PROTECTED]> wrote: > > > This is probably really trivial but I'm stumped :-( > > > Does anyone know how to increment a variable name? > > > For example: > > > I know the length of a list and I w

Test driven development

2008-01-24 Thread ajcppmod
Hi Sorry if this is a bit off topic but as unit testing is such a cornerstone of python development I thought a few of you may be able to share your knowledge/experiences. I like the concept of TDD but find it difficult to put into practice most of the time. I think this primarily because I tend

Re: sudoku solver in Python ...

2008-01-24 Thread Boris Borcic
Shawn Milochik wrote: > On Jan 23, 2008, at 10:02 PM, Derek Marshall wrote: > >> This is just for fun, in case someone would be interested and because >> I haven't had the pleasure of posting anything here in many years ... >> >> http://derek.marshall.googlepages.com/pythonsudokusolver >> >> A

Re: When is min(a, b) != min(b, a)?

2008-01-24 Thread Antoon Pardon
On 2008-01-21, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 20 Jan 2008 21:15:02 -0600, Albert Hopkins wrote: > > According to the IEEE-754 standard the usual trichotomy of "x is less > than y, x is equal to y, or x is greater than y" has to be extended to > include "x and y are unordered

Re: Test driven development

2008-01-24 Thread Neil Cerutti
On 1/24/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > Sorry if this is a bit off topic but as unit testing is such a > cornerstone of python development I thought a few of you may be able > to share your knowledge/experiences. Test driven development, simplistically, means to write the

Re: Module/package hierarchy and its separation from file structure

2008-01-24 Thread Peter Schuller
>> Not necessarily. In part it is the name, in that __name__ will be >> different. But to the extent that calling code can potentially import >> them under differents names, it's identity. Because importing the same >> module under two names results in two distinct modules (two distinct >> module o

Re: csv to xls using python 2.1.3

2008-01-24 Thread LizzyLiz
Unfortunately we have to stick with python 2.1.3 for this project. -- http://mail.python.org/mailman/listinfo/python-list

Re: csv to xls using python 2.1.3

2008-01-24 Thread LizzyLiz
On Jan 23, 5:15 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > FYI - Excel can read .CSV files directly and convert them to .XLS. > > -Larry Thanks Larry The customer wants 2 buttons - one for csv, one for xls. Kind regards Liz -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython

2008-01-24 Thread Mike Driscoll
On Jan 24, 5:37 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [... snip stuff from TJG ...] > > joe jacob wrote: > > Thanks for the information. I'll try to manage it some how. > > If you haven't already, try posting to a wxPython or wxWidgets > mailing list; maybe someone's already done this kind of

Which reportlab version for python 2.1.3?

2008-01-24 Thread LizzyLiz
Hiya Probably me being thick but I can't find which version of reportlab I should use for python 2.1.3. Many thanks Liz -- http://mail.python.org/mailman/listinfo/python-list

Re: Test driven development

2008-01-24 Thread A.T.Hofkamp
On 2008-01-24, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I like the concept of TDD but find it difficult to put into practice > most of the time. I think this primarily because I tend to like top- > down development and functional/object decomposition and TDD feels > more like a bottom-up appr

Re: When is min(a, b) != min(b, a)?

2008-01-24 Thread Christian Heimes
Antoon Pardon wrote: > That doesn't follow. The problem is not that x < nan returns False > because that is correct since x isn't smaller than nan. The problem > is cmp(x, nan) returning 1, because that indicates that x is greater > than nan and that isn't true. Please report the problem. cmp(),

piping into a python script

2008-01-24 Thread Donn Ingle
Hi, (Gnu/Linux - Python 2.4/5) Given these two examples: 1. ./fui.py *.py 2. ls *.py | ./fui.py How can I capture a list of the arguments? I need to get all the strings (file or dir names) passed via the normal command line and any that may come from a pipe. There is a third case: 3. ls *.jpg |

Re: Test driven development

2008-01-24 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > So my question is when approaching a project that you want to employ > test driven development on how and where do you start? And also if > anyone uses top-down design with TDD I would be interested in how you > do it (does it involve lo

Re: When is min(a, b) != min(b, a)?

2008-01-24 Thread Paddy
On Jan 24, 2:28 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: > > That doesn't follow. The problem is not that x < nan returns False > > because that is correct since x isn't smaller than nan. The problem > > is cmp(x, nan) returning 1, because that indicates that x is grea

Re: translating Python to Assembler

2008-01-24 Thread Bjoern Schliessmann
Tim Roberts wrote: > Bjoern Schliessmann <[EMAIL PROTECTED]> >> So, how do processors execute Python scripts? :) > > Is that a rhetorical question? A little bit. > Grant is quite correct; Python scripts (in the canonical CPython) > are NOT compiled into assembly language. Scripts are compile

Re: Test driven development

2008-01-24 Thread Virgil Dupras
On Jan 24, 7:37 am, [EMAIL PROTECTED] wrote: > Hi > > Sorry if this is a bit off topic but as unit testing is such a > cornerstone of python development I thought a few of you may be able > to share your knowledge/experiences. > > I like the concept of TDD but find it difficult to put into practice

Re: piping into a python script

2008-01-24 Thread Marc 'BlackJack' Rintsch
On Thu, 24 Jan 2008 17:17:25 +0200, Donn Ingle wrote: > Given these two examples: > 1. > ./fui.py *.py > 2. > ls *.py | ./fui.py > > How can I capture a list of the arguments? > I need to get all the strings (file or dir names) passed via the normal > command line and any that may come from a pi

Re: piping into a python script

2008-01-24 Thread Paddy
On Jan 24, 3:17 pm, Donn Ingle <[EMAIL PROTECTED]> wrote: > Hi, > (Gnu/Linux - Python 2.4/5) > Given these two examples: > 1. > ./fui.py *.py > 2. > ls *.py | ./fui.py > > How can I capture a list of the arguments? > I need to get all the strings (file or dir names) passed via the normal > command

Re: get the size of a dynamically changing file fast ?

2008-01-24 Thread Stef Mientki
Gabriel Genellina wrote: > En Wed, 23 Jan 2008 16:16:58 -0200, Stef Mientki > <[EMAIL PROTECTED]> escribió: > Yes, that's a small disadavantage of using a "high-level" language, where there's no flush available, and you assume it'll done automatically ;-) >>> >>> Uhm, there is a fl

RE: Stripping whitespace

2008-01-24 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of John Machin > Sent: Wednesday, January 23, 2008 5:48 PM > To: python-list@python.org > Subject: Re: Stripping whitespace > > On Jan 24, 7:57 am, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > >

Connecting to Sql Server from Python

2008-01-24 Thread bg_ie
Hi, I have an sql server from which I'd like to read and write to. The connection string is as follows - "Data Source=localhost\SQLExpress;Initial Catalog=Test;Integrated Security=True;Pooling=False" Other properties as they appear in Visual Studio 2005 include - Data Provider: .NET Framework D

Re: piping into a python script

2008-01-24 Thread Paddy
On Jan 24, 3:25 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Thu, 24 Jan 2008 17:17:25 +0200, Donn Ingle wrote: > > Given these two examples: > > 1. > > ./fui.py *.py > > 2. > > ls *.py | ./fui.py > > > How can I capture a list of the arguments? > > I need to get all the strings (fi

Re: A global or module-level variable?

2008-01-24 Thread Bret
On Jan 23, 2:27 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 23 Jan 2008 11:58:05 -0200, Bret <[EMAIL PROTECTED]> escribió: > > > On Jan 22, 1:00 pm, Paul Rubin wrote: > > >> If you have to do it that way, use: > > > Is there a better way? A more Pythonic

Re: piping into a python script

2008-01-24 Thread Donn Ingle
> Try the fileinput module. I did give the fileinput module a go, but I can't find much info on it and the help is ... well, it's python help ;) > in goes to its stdin where it is processed if it has an argument of - > fileinput works that way Okay, I did think of the dash, but did not know how to

Re: piping into a python script

2008-01-24 Thread Donn Ingle
Paddy wrote: > ls *.a | ./fui.py -f - *.b To be sure I grok this: I am seeing the single dash as a placeholder for where all the piped filenames will go, so *.b happens after *.a has been expanded and they all get fed to -f, right? I'm also guessing you mean that I should detect the single dash an

Re: finding memory leak in edgewall trac 0.11

2008-01-24 Thread rupert.thurner
On Jan 20, 2:59 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > rupert.thurner wrote: > > i forgot to mention that i cannot see any explicit sys._getframe(), or > > __del__ in the genshi code, while the ones intrac-core seemed to be > > there in 0.10.4. > > Does the code keep a reference to a tra

Re: Some questions about decode/encode

2008-01-24 Thread 7stud
On Jan 24, 1:44 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 23 Jan 2008 19:49:01 -0800, glacier wrote: > > My second question is: is there any one who has tested very long mbcs > > decode? I tried to decode a long(20+MB) xml yesterday, which turns out > > to be very strange an

Re: Connecting to Sql Server from Python

2008-01-24 Thread Mike Driscoll
On Jan 24, 9:44 am, [EMAIL PROTECTED] wrote: > Hi, > > I have an sql server from which I'd like to read and write to. The > connection string is as follows - > > "Data Source=localhost\SQLExpress;Initial Catalog=Test;Integrated > Security=True;Pooling=False" > > Other properties as they appear in V

Re: Connecting to Sql Server from Python

2008-01-24 Thread bg_ie
On 24 Jan, 17:16, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Jan 24, 9:44 am, [EMAIL PROTECTED] wrote: > > > > > > > Hi, > > > I have an sql server from which I'd like to read and write to. The > > connection string is as follows - > > > "Data Source=localhost\SQLExpress;Initial Catalog=Test;Int

Re: piping into a python script

2008-01-24 Thread Paddy
On Jan 24, 4:02 pm, Donn Ingle <[EMAIL PROTECTED]> wrote: > > Try the fileinput module. > > I did give the fileinput module a go, but I can't find much info on it and > the help is ... well, it's python help ;) Try http://effbot.org/librarybook/fileinput.htm > > > in goes to its stdin where it is

Beginner Pyserial Question

2008-01-24 Thread JAMoore84
Hi Guys, I have a project where I'd like to save GPS data that is streamed to a Sony Vaio over bluetooth. I can monitor the data stream over Hyper Terminal, but I'd like to use python to capture it as well. I've installed Python 2.5, pyserial 2.2 and the appropriate pywin program (pywin32-210.wi

Re: piping into a python script

2008-01-24 Thread Donn Ingle
Paddy wrote: > fileinput is set to process each file a line at a time unfortunately. Wow. So there seems to be no solution to my OP. I'm amazed, I would have thought a simple list of strings, one from stdin and one from the args, would be easy to get. I *really* don't want to open each file, that

Re: piping into a python script

2008-01-24 Thread Donn
> wget -i - > it doesn't do anything, just waits for your input. Your applications > probably should behave the same. Okay, that works for me. > Paddy wrote: > > ls *.a | ./fui.py -f - *.b > It doesn't seem to me that -f parameter is necessary for your > application. Yes and no, I have another op

Re: When is min(a, b) != min(b, a)?

2008-01-24 Thread Pete Forman
Christian Heimes <[EMAIL PROTECTED]> writes: > Antoon Pardon wrote: >> That doesn't follow. The problem is not that x < nan returns False >> because that is correct since x isn't smaller than nan. The problem >> is cmp(x, nan) returning 1, because that indicates that x is greater >> than nan and

Re: Beginner Pyserial Question

2008-01-24 Thread Grant Edwards
On 2008-01-24, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I have a project where I'd like to save GPS data that is streamed to a > Sony Vaio over bluetooth. I can monitor the data stream over Hyper > Terminal, but I'd like to use python to capture it as well. I've > installed Pyt

Re: Beginner Pyserial Question

2008-01-24 Thread JAMoore84
> My guess is that for whatever reason the 'first' serial port > (which is what you're asking for by specifying a 0 when > instantiating the Serial class) doesn't actually exist. Serial > device names under Windows are broken. I realize this. I tried connecting to different port "numbers", but I

Re: translating Python to Assembler

2008-01-24 Thread Carl Banks
On Jan 24, 10:14 am, Bjoern Schliessmann wrote: > Tim Roberts wrote: > > Grant is quite correct; Python scripts (in the canonical CPython) > > are NOT compiled into assembly language. Scripts are compiled to > > an intermediate language. Processors execute Python scripts when > > the interpreter

Re: translating Python to Assembler

2008-01-24 Thread Chris Mellon
On Jan 24, 2008 9:14 AM, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Tim Roberts wrote: > > Bjoern Schliessmann <[EMAIL PROTECTED]> > > >> So, how do processors execute Python scripts? :) > > > > Is that a rhetorical question? > > A little bit. > > > Grant is quite correct; Python scripts (in

Re: Beginner Pyserial Question

2008-01-24 Thread Tim Spens
COM = 0 #for COM1 BAUD = 115200 class serial_port(): def __init__(self): self.start_time = None self.end_time = None self.asleep_duration = None self.device = serial.Serial() self.device.timeout = 1 self.device.baudrate = BAUD self.devic

Re: translating Python to Assembler

2008-01-24 Thread Torsten Bronger
Hallöchen! Carl Banks writes: > On Jan 24, 10:14 am, Bjoern Schliessmann [EMAIL PROTECTED]> wrote: > >> [...] >> >> But never mind, it depends on how you define "compile" in the >> end. > > If you define "compile" as "interpret", yeah. Well, it is just-in-time-compiled command by command. :o)

Duplicating a variable

2008-01-24 Thread [EMAIL PROTECTED]
I have run into a bit of a subtle problem. How do I go about duplicating a variable (particularly a list of lists) in python. I was surprised when simple assignment didn't work. For example, let y = [1,2,3] >>> x = y >>> x[2] = 5 >>> y [1,2,5] It seems that simply assigning x to y allows furthe

Re: Duplicating a variable

2008-01-24 Thread [EMAIL PROTECTED]
On Jan 24, 9:36 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have run into a bit of a subtle problem. How do I go about > duplicating a variable (particularly a list of lists) in python. I > was surprised when simple assignment didn't work. For example, let y = > [1,2,3] > > >>> x = y >

Re: Duplicating a variable

2008-01-24 Thread Jeff McNeil
Have a look at the copy module if you have a somewhat "complex" object graph to duplicate. Remember, you're essentially just creating another reference to a singular list object with simple assignment (a = b). >>> a = [1,2,3,4, ['5a', '5b', '5c', ['6a', '6b','6c']], 7,8] >>> b = a >>> a [1, 2, 3,

Re: Beginner Pyserial Question

2008-01-24 Thread JAMoore84
I've solved the problem- Thanks for steering me in the right direction. The problem is that your traditional "COM1" does not exist on this computer (Thanks Grant). A trip to the Device manager listed all the COM ports on the computer. After successfully connecting to COM7 (port = serial.Serial(6)

Re: Designing website

2008-01-24 Thread Bruno Desthuilliers
joe jacob a écrit : > Hi All, > > I am planning to design a website using windows, apache, mysql, > python. But I came to know that python cgi is very slow. The problem here is not with Python, but with how cgi works - that is, by launching a new process for each request. Trying to write Java cg

Re: Duplicating a variable

2008-01-24 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I have run into a bit of a subtle problem. How do I go about > duplicating a variable (particularly a list of lists) in python. using the deepcopy function of the copy module. > I > was surprised when simple assignment didn't work. For example, let y = > [1,2,3] >

Re: piping into a python script

2008-01-24 Thread Hexamorph
Donn Ingle wrote: > Paddy wrote: >> fileinput is set to process each file a line at a time unfortunately. > Wow. So there seems to be no solution to my OP. I'm amazed, I would have > thought a simple list of strings, one from stdin and one from the args, > would be easy to get. > > I *really* don'

Re: Duplicating a variable

2008-01-24 Thread bearophileHUGS
Hans: > I have run into a bit of a subtle problem. How do I go about > duplicating a variable (particularly a list of lists) in python. I > was surprised when simple assignment didn't work. Python is quite high-level language, but now and then it too accepts some compromises to increase its spee

Re: [wxPython-users] Issue with docking wx.listctrl window

2008-01-24 Thread Robin Dunn
tarun wrote: > Hello All, > > I'm trying to create a Frame with AuiManager. The code is attached. > > *Problem:* > - I want 2 windows to be docked in the frame. One is a text control and > other is a list control. > - The text control gets docked, but on trying to dock the list control, > all

RE: piping into a python script

2008-01-24 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Donn > Sent: Thursday, January 24, 2008 12:03 PM > To: Michał Bentkowski > Cc: python-list@python.org > Subject: Re: piping into a python script > > I have tested getopt and it strips the lone '

Re: pythonic backtrace with gdb

2008-01-24 Thread Dieter Maurer
Hynek Hanke <[EMAIL PROTECTED]> writes on Wed, 23 Jan 2008 14:30:22 +0100: > ... > I've also tried to use the backtrace script here > http://mashebali.com/?Python_GDB_macros:The_Macros:Backtrace > But I get a different error: > (gdb) pbt > Invalid type combination in ordering comparison. > > I'm u

Re: Can someone explain this unexpected raw_input behavior?

2008-01-24 Thread BJörn Lindqvist
On Jan 24, 2008 8:08 AM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Thu, 24 Jan 2008 01:00:53 -0200, Mike Kent <[EMAIL PROTECTED]> escribió: > > > Gabriel, thank you for clarifying the source of this behavior. Still, > > I'm surprised it would be hard-coded into Python. Consider an > > int

Re: Test driven development

2008-01-24 Thread Roel Schroeven
Virgil Dupras schreef: > I know what you mean by top-down vs. bottom-up and I used to have the > same dilemma, but now I would tend to agree with Albert. Your issue > with top-down or bottom-up is not relevant in TDD. The only thing that > is relevant is to reach your current milestone as soon as p

Re: Which reportlab version for python 2.1.3?

2008-01-24 Thread Mike Driscoll
On Jan 24, 8:17 am, LizzyLiz <[EMAIL PROTECTED]> wrote: > Hiya > > Probably me being thick but I can't find which version of reportlab I > should use for python 2.1.3. > > Many thanks > Liz Since ReportLab's website lists dlls for Python 2.1 - 2.5, I think you can just use the latest version. Just

Re: creating .pyo with make

2008-01-24 Thread Yann Leboulanger
Diez B. Roggisch wrote: > Yann Leboulanger schrieb: >> Yann Leboulanger wrote: >>> Hi, >>> >>> I use autoconf / automake to manage my python project, and I'l like >>> make / make install to create / install .pyo files instead of .py files. >>> >>> Is there something I should add to my Makefile.am

Re: Problems getting Python scripts to run on server

2008-01-24 Thread 7stud
On Jan 23, 11:30 pm, 7stud <[EMAIL PROTECTED]> wrote: I just wanted to point out that the tag below would go in the httpd.conf file(a config file for apache), which you apparently do not have access to. I was suggesting that you check with your host to make sure they have the right AllowOverride

Re: Test driven development

2008-01-24 Thread Virgil Dupras
On Jan 24, 1:30 pm, Roel Schroeven <[EMAIL PROTECTED]> wrote: > Virgil Dupras schreef: > > > I know what you mean by top-down vs. bottom-up and I used to have the > > same dilemma, but now I would tend to agree with Albert. Your issue > > with top-down or bottom-up is not relevant in TDD. The only

Re: Linux Journal Survey

2008-01-24 Thread Russ P.
On Jan 23, 7:42 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jan 23, 8:14 pm, [EMAIL PROTECTED] wrote: > > > The annual Linux Journal survey is online now for any Linux users who > > want to vote for Python. http://www.linuxjournal.com/node/1006101 > > ... > > 18. What is your favorite progra

Re: Linux Journal Survey

2008-01-24 Thread Paul Boddie
On 24 Jan, 04:42, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jan 23, 8:14 pm, [EMAIL PROTECTED] wrote: > > > The annual Linux Journal survey is online now for any Linux users who > > want to vote for Python. http://www.linuxjournal.com/node/1006101 > > 18. What is your favorite programming lang

Sorting Large File (Code/Performance)

2008-01-24 Thread Ira . Kovac
Hello all, I have an Unicode text file with 1.6 billon lines (~2GB) that I'd like to sort based on first two characters. I'd greatly appreciate if someone can post sample code that can help me do this. Also, any ideas on approximately how long is the sort process going to take (XP, Dual Core 2.0

Re: piping into a python script

2008-01-24 Thread Donn
Thanks for the tips, I'll decode and try 'em all out. > Ah yes, Groo. Ever wonder who would win if Groo and Forrest Gump fought > each other? Heh ;) I reckon they'd both die laughing. Be fun to watch -- if anyone else survived! \d -- "A computer without Windows is like chocolate cake without

Email module, how to add header to the top of an email?

2008-01-24 Thread David Erickson
I have been using the Email module and Message class for awhile, however I have been unable to find a way to add a header to the top of the email similar to what is done with Received: headers... the add_header method only appends to the bottom. Is there someway this can be done? Thanks David --

Re: Sorting Large File (Code/Performance)

2008-01-24 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I have an Unicode text file with 1.6 billon lines (~2GB) that I'd like > to sort based on first two characters. > > I'd greatly appreciate if someone can post sample code that can help > me do this. Use the unix sort command: sort inputfile -o outputfile I think

Re: Test driven development

2008-01-24 Thread Roel Schroeven
Virgil Dupras schreef: > On Jan 24, 1:30 pm, Roel Schroeven <[EMAIL PROTECTED]> > wrote: >> Virgil Dupras schreef: >> >>> I know what you mean by top-down vs. bottom-up and I used to have the >>> same dilemma, but now I would tend to agree with Albert. Your issue >>> with top-down or bottom-up is n

Re: Linux Journal Survey

2008-01-24 Thread Tim Chase
>> want to vote for Python. http://www.linuxjournal.com/node/1006101 > > 18. What is your favorite programming language? > > (15 choices, Python not included) I'm not sure why some folks have their knickers in a knot...I took the survey and there was an "Other" box, so I just wrote in "Python

Re: Duplicating a variable

2008-01-24 Thread [EMAIL PROTECTED]
On Jan 24, 9:55 am, [EMAIL PROTECTED] wrote: > > If your variable contains a list, then you can copy it like this: > > >>> l1 = [1, 2, 3] > >>> l2 = l1[:] > >>> l2[1] = 4 > > As you can see now they are two distinct lists: > > >>> l1 > [1, 2, 3] > >>> l2 > > [1, 4, 3] > > If you want to copy any ki

Re: Sorting Large File (Code/Performance)

2008-01-24 Thread John Nagle
[EMAIL PROTECTED] wrote: > Hello all, > > I have an Unicode text file with 1.6 billon lines (~2GB) that I'd like > to sort based on first two characters. Given those numbers, the average number of characters per line is less than 2. Please check. John

Smart Debugger (Python)

2008-01-24 Thread kraman
Hi All, Please find the smart debugger for python. it is an enchanced version of python pdb with data rendering feature. http://develsdb.googlecode.com/svn/trunk/python/ http://develsdb.googlecode.com/svn/wiki/SmartDebuggerPython.wiki hope you find this useful. Regards, Karthik -- ht

Re: sudoku solver in Python ...

2008-01-24 Thread Thomas Thiel
On Wed, 23 Jan 2008 19:02:01 -0800 (PST), Derek Marshall wrote: > This is just for fun, in case someone would be interested and because > I haven't had the pleasure of posting anything here in many years ... > > http://derek.marshall.googlepages.com/pythonsudokusolver > > Appreciate any fee

a newbie regex question

2008-01-24 Thread Shoryuken
Given a regular expression pattern, for example, \([A-Z].+[a-z]\), print out all strings that match the pattern in a file Anyone tell me a way to do it? I know it's easy, but i'm completely new to python thanks alot -- http://mail.python.org/mailman/listinfo/python-list

Ignore exceptions

2008-01-24 Thread SMALLp
Hy. Is there any way to make interrupter ignore exceptions. I'm working on bigger project and i used to put try catch blocks after writing and testing code what's boring and it's easy to make mistake. I remember of something like that in C++ but I cant find anythin like that for python. SMALLp

Re: Ignore exceptions

2008-01-24 Thread Mike Driscoll
On Jan 24, 2:13 pm, SMALLp <[EMAIL PROTECTED]> wrote: > Hy. Is there any way to make interrupter ignore exceptions. I'm working > on bigger project and i used to put try catch blocks after writing and > testing code what's boring and it's easy to make mistake. I remember of > something like that i

Re: Ignore exceptions

2008-01-24 Thread Grant Edwards
On 2008-01-24, SMALLp <[EMAIL PROTECTED]> wrote: > Hy. Hi. > Is there any way to make interrupter ignore exceptions. Nope. Either handle the exceptions or write code that doesn't generate exceptions. > I'm working on bigger project and i used to put try catch > blocks after writing and testin

object vs class oriented -- xotcl

2008-01-24 Thread William Pursell
I've been away from Python for at least a year, and in the interim have spent a little time looking at the XOTcl object framework for Tcl. One of the interesting features of XOTcl is the ability for an object to change class dynamically. The XOtcl documentation makes the claim that this makes it

Re: Sorting Large File (Code/Performance)

2008-01-24 Thread John Machin
On Jan 25, 6:18 am, [EMAIL PROTECTED] wrote: > Hello all, > > I have an Unicode text file with 1.6 billon lines (~2GB) that I'd like > to sort based on first two characters. If you mean 1.6 American billion i.e. 1.6 * 1000 ** 3 lines, and 2 * 1024 ** 3 bytes of data, that's 1.34 bytes per line. If

Re: Can someone explain this unexpected raw_input behavior?

2008-01-24 Thread Mike Kent
> If it weren't for the documentation... > > "If the prompt argument is present, it is written to *standard output* > without a trailing newline." > > -- > mvh Björn I have reported this issue to the python-dev mailing list, and Guido agrees that this is a bug in Python. It turns out that the ke

Re: object vs class oriented -- xotcl

2008-01-24 Thread Jonathan Gardner
On Jan 24, 12:35 pm, William Pursell <[EMAIL PROTECTED]> wrote: > I'm not sure that describes the method well. Basically, you can > instantiate an object A of class Foo, and later change A to be an > object of class Bar. Does Python support this type of flexibility? > As I stated above, I've bee

  1   2   >