Re: Python user group in Portland, OR?

2007-05-01 Thread bradallen
It looks like there are a lot of folks in the Portland area at meetup.com who have expressed an interest in a meetup group. In hopes of attracting those, I went ahead and shelled out the bucks to start a meetup site for a Portland Python user group: http://python.meetup.com/183/ -- http://mai

Re: While we're talking about annoyances

2007-05-01 Thread Steven D'Aprano
On Wed, 02 May 2007 06:10:54 +, Tim Roberts wrote: > Michael Hoffman <[EMAIL PROTECTED]> wrote: >> >>Hint: if you find yourself using a decorate-sort-undecorate pattern, >>sorted(key=func) or sequence.sort(key=func) might be a better idea. > > Is it? I thought I remember reading on this ver

Re: ScrolledText?

2007-05-01 Thread half . italian
On May 1, 3:12 pm, nik <[EMAIL PROTECTED]> wrote: > I've been trying to get the scrollbar and text box always going to the > last line and have been completely unsuccessful. > > I've tried, ScrolledText, text.see, and text.yview_pickplace without > success > > for instance this was the last setup:

Re: Problem with inspect.getfile

2007-05-01 Thread Gabriel Genellina
En Wed, 02 May 2007 02:53:55 -0300, elventear <[EMAIL PROTECTED]> escribió: > Found the offending code. I was importing between files that were at > the same level of the hierarchy without using absolute references. > Coded worked fine, but inspect didn't. Was this gaffe on my part? Or > was ins

Re: While we're talking about annoyances

2007-05-01 Thread Tim Roberts
Michael Hoffman <[EMAIL PROTECTED]> wrote: > >Hint: if you find yourself using a decorate-sort-undecorate pattern, >sorted(key=func) or sequence.sort(key=func) might be a better idea. Is it? I thought I remember reading on this very list some years ago that the performance of sequence.sort becam

Re: os.path.join

2007-05-01 Thread Gabriel Genellina
En Wed, 02 May 2007 02:31:43 -0300, <[EMAIL PROTECTED]> escribió: > A better question is why this doesn't work. > pathparts = ["/foo", "bar"] os.path.join(pathparts) > ['/foo', 'bar'] > > This should return a string in my opinion. I think it's a bug, but because it should raise TypeErro

Re: os.path.join

2007-05-01 Thread Gabriel Genellina
En Wed, 02 May 2007 01:23:45 -0300, Elliot Peele <[EMAIL PROTECTED]> escribió: > On Tue, 2007-05-01 at 19:27 -0700, 7stud wrote: >> On May 1, 7:36 pm, Elliot Peele <[EMAIL PROTECTED]> wrote: >> > Why does os.path.join('/foo', '/bar') return '/bar' rather than >> > '/foo/bar'? That just seems rat

Re: Problem with inspect.getfile

2007-05-01 Thread elventear
Found the offending code. I was importing between files that were at the same level of the hierarchy without using absolute references. Coded worked fine, but inspect didn't. Was this gaffe on my part? Or was inspect supposed to handle it? Thanks! On May 1, 12:48 pm, elventear <[EMAIL PROTECTED]>

Re: pre-PEP: Standard Microthreading Pattern

2007-05-01 Thread dustin
On Tue, May 01, 2007 at 10:28:08PM -0700, Michele Simionato wrote: > >while i < n: > >latest = (latest[1], latest[0] + latest[1]) > >yield # cooperative yield > There is an infinite loop here! Whoops. To much editing, not enough actual

Dynamic File Name Open()

2007-05-01 Thread Robert Rawlins - Think Blue
Chaps, I'm trying to open a file using open() but the name of the file is created dynamically as a variable, but also has part of a static path. For instance, the file may be called 'dave' and will always be in '/my/files/here/'. Now I've tried a few combinations of getting this to work, su

Re: Why are functions atomic?

2007-05-01 Thread John Nagle
Martin v. Löwis wrote: > Michael schrieb: > >>A bit more info, but still no clear picture about why functions are >>mutable but have immutable copy symantics. There are arguments why >>functions should be immutable, but the decision was to make user- >>defined functions mutable. My question is s

Tcl-tk 8.5?

2007-05-01 Thread M�ta-MCI
Hi! See http://wiki.tcl.tk/10630 Any plan to integrate Tcl 8.5 in standard Python? @+ MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.join

2007-05-01 Thread half . italian
On May 1, 9:23 pm, Elliot Peele <[EMAIL PROTECTED]> wrote: > On Tue, 2007-05-01 at 19:27 -0700, 7stud wrote: > > On May 1, 7:36 pm, Elliot Peele <[EMAIL PROTECTED]> wrote: > > > Why does os.path.join('/foo', '/bar') return '/bar' rather than > > > '/foo/bar'? That just seems rather counter intuitiv

Re: pre-PEP: Standard Microthreading Pattern

2007-05-01 Thread John Nagle
[EMAIL PROTECTED] wrote: > PEP: XXX > Title: Standard Microthreading Pattern You've reinvented Modula processes. Except that Wirth did it better in Modula I. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: pre-PEP: Standard Microthreading Pattern

2007-05-01 Thread Michele Simionato
On May 1, 10:58 pm, [EMAIL PROTECTED] wrote: >def fibonacci(n): >latest, i = (1, 1), 2 >if n < 1: >raise ValueError# raise exception >while i < n: >latest = (latest[1], latest[0] + latest[1]) >yield

Re: Why are functions atomic?

2007-05-01 Thread Michael
> Your use case appears to be that you > want to make multiple copies of the same function, and those copies > should be almost, but not quite, the same. > > The Pythonic solution is to produce the copies by a factory function... > > >>> def powerfactory(exponent): > ...def inner(x): > ...

Re: Python-URL! - weekly Python news and links (Apr 30)

2007-05-01 Thread Alex Martelli
Neil Hodgson <[EMAIL PROTECTED]> wrote: > Cameron Laird: > > > ... but the *references* in that object are unlikely to be > > meaningful on the second machine (or, in many cases, on the > > original machine, if at a sufficiently later time). > > The marshaling of the object is responsible fo

Re: Why are functions atomic?

2007-05-01 Thread Martin v. Löwis
Michael schrieb: > A bit more info, but still no clear picture about why functions are > mutable but have immutable copy symantics. There are arguments why > functions should be immutable, but the decision was to make user- > defined functions mutable. My question is still: why the present > ummu

Re: pre-PEP: Standard Microthreading Pattern

2007-05-01 Thread dustin
On Tue, May 01, 2007 at 08:34:39PM -0400, Terry Reedy wrote: > Sounds like a good idea to me. Travis Oliphant has spent over a year on > http://www.python.org/dev/peps/pep-3118/ > so array-making-using programs can better operate together. I hope you > have the same patience and persistance. I

Re: Python user group in Portland, OR?

2007-05-01 Thread bradallen
On May 1, 5:09 pm, Matimus <[EMAIL PROTECTED]> wrote: > Python.org lists PORPIG (PORtland Python Intrest Group) but the site > that it points to no longer seems to represent that. Also, when I > looked into going to a meeting a while back, the last one listed was > some time in 2004. I will put thi

Re: os.path.join

2007-05-01 Thread Elliot Peele
On Tue, 2007-05-01 at 19:27 -0700, 7stud wrote: > On May 1, 7:36 pm, Elliot Peele <[EMAIL PROTECTED]> wrote: > > Why does os.path.join('/foo', '/bar') return '/bar' rather than > > '/foo/bar'? That just seems rather counter intuitive. > > > > Elliot > > join( path1[, path2[, ...]]) > Join one or m

Re: os.path.join

2007-05-01 Thread Elliot Peele
On Tue, 2007-05-01 at 21:26 -0500, Michael Bentley wrote: > On May 1, 2007, at 8:36 PM, Elliot Peele wrote: > > > Why does os.path.join('/foo', '/bar') return '/bar' rather than > > '/foo/bar'? That just seems rather counter intuitive. > > It's the leading slash in '/bar'. os.path.join('/foo', '

Re: relative import broken?

2007-05-01 Thread Alex Martelli
Alan Isaac <[EMAIL PROTECTED]> wrote: > "Alex Martelli" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I don't know of any "pretty" way -- I'd do it by path manipulation > > (finding mypackage from os.path.abspath(__file__) and inserting its > > _parent_ directory in sys.path).

Re: relative import broken?

2007-05-01 Thread Alex Martelli
Alan Isaac <[EMAIL PROTECTED]> wrote: > > "Alex Martelli" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > I don't know of any "pretty" way -- I'd do it by path manipulation > > > (finding mypackage from os.path.abspath(__file__) and inserting its > > > _parent_ directory in s

RE: Dict Copy & Compare

2007-05-01 Thread Steven D'Aprano
On Tue, 01 May 2007 08:14:53 -0500, Hamilton, William wrote: >> -Original Message- >> From: Steven D'Aprano >> Sent: Monday, April 30, 2007 10:14 PM >> To: python-list@python.org >> Subject: RE: Dict Copy & Compare >> >> On Mon, 30 Apr 2007 12:50:58 -0500, Hamilton, William wrote: >> >

Re: Read and Write the same file

2007-05-01 Thread Grant Edwards
On 2007-05-01, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Tue, 01 May 2007 20:03:28 -0300, JonathanB <[EMAIL PROTECTED]> > escribió: > >> Ok, so this is the scenario. I need to create a simple, no-frills XML >> editor for non-technical users. It doesn't have to do anything fancy, >> what I

Re: ScrolledText?

2007-05-01 Thread Basilisk96
Ah.. wx is wxPython in this case, a GUI toolkit like Tkinter, but based on wxWidgets. I don't know if Tk has a text control with a method similar to the AppendText method I showed here.. I used to have the exact same problem as you until I discovered that AppendText always kept the text box scrolle

RE: test

2007-05-01 Thread Robert Rawlins - Think Blue
Test response :-D -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ray Sent: 02 May 2007 04:05 To: python-list@python.org Subject: test test only -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-li

test

2007-05-01 Thread Ray
test only -- http://mail.python.org/mailman/listinfo/python-list

Re: python win32com excel problem

2007-05-01 Thread NO_SPAM
Bart Willems wrote: > Ray wrote: >> Hi, >> I tried to call "xlApp.Columns.AutoFit=1" the whole program will crash, >> but without xlApp.Columns.AutoFit=1, everything just fine. > > Autofit is a method. Also, columns are a method of a worksheet - try: > xlApp.Worksheets.Columns("C:K").Autofit() > (

Re: os.path.join

2007-05-01 Thread 7stud
On May 1, 7:36 pm, Elliot Peele <[EMAIL PROTECTED]> wrote: > Why does os.path.join('/foo', '/bar') return '/bar' rather than > '/foo/bar'? That just seems rather counter intuitive. > > Elliot join( path1[, path2[, ...]]) Join one or more path components intelligently. If any component is an abso

Re: os.path.join

2007-05-01 Thread Michael Bentley
On May 1, 2007, at 8:36 PM, Elliot Peele wrote: > Why does os.path.join('/foo', '/bar') return '/bar' rather than > '/foo/bar'? That just seems rather counter intuitive. It's the leading slash in '/bar'. os.path.join('/foo', 'bar') returns '/foo/bar'. -- http://mail.python.org/mailman/listi

Killing Threads

2007-05-01 Thread Robert Rawlins - Think Blue
Hello Guys, I've got an application which I've fearfully placed a couple of threads into however when these threads are running it seems as if I try and quite the application from the bash prompt it just seems to freeze the SSH client. I've also seen that if I have my app running in the backgro

Re: scaling

2007-05-01 Thread Charles Sanders
Gabriel Genellina wrote: [snip] > if x elif x>maxvalue: yield top > else: yield (x-minvalue)*top/(maxvalue-minvalue) [snip] Personally, I find yield min(top,max(0,(x-minvalue)*top/(maxvalue-minvalue))) or scaled_value = (x-minvalue)*top/(maxvalue-minvalue) yiel

os.path.join

2007-05-01 Thread Elliot Peele
Why does os.path.join('/foo', '/bar') return '/bar' rather than '/foo/bar'? That just seems rather counter intuitive. Elliot -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are functions atomic?

2007-05-01 Thread Carsten Haese
On Tue, 2007-05-01 at 17:28 -0700, Michael wrote: > A bit more info, but still no clear picture about why functions are > mutable but have immutable copy symantics. There are arguments why > functions should be immutable, but the decision was to make user- > defined functions mutable. My question

Re: How can I get the ascii code of a charter in python?

2007-05-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, John Machin <[EMAIL PROTECTED]> wrote: >On May 2, 7:06 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> How can I get the ascii code of a charter in python? > >E.g. download from here: >http://www.gutenberg.org/ebooks/1 >then in Python, use: >text = open(

Re: Read and Write the same file

2007-05-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Ian Clark <[EMAIL PROTECTED]> wrote: . . . >the file, overwriting the oringinal copy. Now, this only really works >if you're dealing with small files. .

Re: pre-PEP: Standard Microthreading Pattern

2007-05-01 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Sounds like a good idea to me. Travis Oliphant has spent over a year on http://www.python.org/dev/peps/pep-3118/ so array-making-using programs can better operate together. I hope you have the same patience and persistance. | .. [2]

Re: Why are functions atomic?

2007-05-01 Thread Michael
A bit more info, but still no clear picture about why functions are mutable but have immutable copy symantics. There are arguments why functions should be immutable, but the decision was to make user- defined functions mutable. My question is still: why the present ummutable copy symantics? http

Re: relative import broken?

2007-05-01 Thread Alan Isaac
> "Alex Martelli" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I don't know of any "pretty" way -- I'd do it by path manipulation > > (finding mypackage from os.path.abspath(__file__) and inserting its > > _parent_ directory in sys.path). > "Alan Isaac" <[EMAIL PROTECTED]> wro

Re: python win32com excel problem

2007-05-01 Thread Bart Willems
Bart Willems wrote: > Autofit is a method. Also, columns are a method of a worksheet - try: > xlApp.Worksheets.Columns("C:K").Autofit() Silly me. That is of course xlApp.Activesheet.Columns("C:K").Autofit() On a sidenote, you can refer to a worksheet with xlApp.Worksheets(Name) as well. -- http

Re: python win32com excel problem

2007-05-01 Thread Bart Willems
Ray wrote: > Hi, > I tried to call "xlApp.Columns.AutoFit=1" the whole program will crash, > but without xlApp.Columns.AutoFit=1, everything just fine. Autofit is a method. Also, columns are a method of a worksheet - try: xlApp.Worksheets.Columns("C:K").Autofit() (or whatever columns you need of c

Re: Read and Write the same file

2007-05-01 Thread JonathanB
> Well the most straight forward approach is to read data from the file > into memory. Let the user make any changes. Then save the data back to > the file, overwriting the oringinal copy. Now, this only really works > if you're dealing with small files. > > Regardless though, you never really need

Re: Why are functions atomic?

2007-05-01 Thread Michael
>From TFM "Function objects also support getting and setting arbitrary attributes, which can be used, for example, to attach metadata to functions. Regular attribute dot-notation is used to get and set such attributes. Note that the current implementation only supports function attributes on user-

Re: Error in python.org homepage.

2007-05-01 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi to all!!! | | I sended an email to webmaster at python dot org, but was blocked... | why? No idea | In the homepage of python.org there is an error: the link that point | to source distribution is not | updated to Python 2.5.1

Re: ScrolledText?

2007-05-01 Thread nik
Thank you, but I am not sure. What is wx in this case? I should have mentioned that I am using Tkinter, am pretty new to python and had previously tried just a plain text box with a scrollbar without success. The scrollbar always works manually, nothing I've tried yet has scrolled down automatical

Re: Read and Write the same file

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 20:03:28 -0300, JonathanB <[EMAIL PROTECTED]> escribió: > Ok, so this is the scenario. I need to create a simple, no-frills XML > editor for non-technical users. It doesn't have to do anything fancy, > what I want is a series of text boxes with the text contents of the > elem

Re: Read and Write the same file

2007-05-01 Thread Ian Clark
On 1 May 2007 16:03:28 -0700, JonathanB <[EMAIL PROTECTED]> wrote: > Ok, so this is the scenario. I need to create a simple, no-frills XML > editor for non-technical users. It doesn't have to do anything fancy, > what I want is a series of text boxes with the text contents of the > elements pre-pri

Re: scaling

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 11:22:28 -0300, Ashok <[EMAIL PROTECTED]> escribió: > IDL language contains a function called BYTSCL to scale all values of > Array that lie in the range (Min £ x £ Max) into the range (0 £ x £ > Top). Is there a similar function available in python? > > I need this to scale th

Read and Write the same file

2007-05-01 Thread JonathanB
Ok, so this is the scenario. I need to create a simple, no-frills XML editor for non-technical users. It doesn't have to do anything fancy, what I want is a series of text boxes with the text contents of the elements pre-printed. Then the users can type their changes into the text boxes and click s

python win32com excel problem

2007-05-01 Thread Ray
Hi, I'm working on something with mysql and excel. I'm using python and win32com. All major function works, But I have two problems: 1. the output need to do "auto fit" to make it readable. I tried to call "xlApp.Columns.AutoFit=1" the whole program will crash, but without xlApp.Columns.AutoFit

Re: How can I get the ascii code of a charter in python?

2007-05-01 Thread John Machin
On May 2, 7:06 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > How can I get the ascii code of a charter in python? E.g. download from here: http://www.gutenberg.org/ebooks/1 then in Python, use: text = open("the_file.txt").read() HTH, John -- http://mail.python.org/mailman/listinfo/p

Re: removing module

2007-05-01 Thread Gabriel Genellina
En Mon, 30 Apr 2007 18:08:30 -0300, Bart <[EMAIL PROTECTED]> escribió: > I have static linked module in application plugin. > > Thirst thing how to remove this module from memory after Py_Finalize(); > Because there is segfault after - deactivate,activate this plugin. > > PyImport_AppendInittab("m

Re: read list of dirnames and search for filenames

2007-05-01 Thread fscked
On May 1, 2:36 pm, Rob Wolfe <[EMAIL PROTECTED]> wrote: > Rob Wolfe <[EMAIL PROTECTED]> writes: > > fscked <[EMAIL PROTECTED]> writes: > > >> I cannot seem to get this to work. I am hyst trying to read in a list > >> of paths and see if the directory or any sub has a filename pattern. > >> Here is

Re: Having problems accepting parameters to a function

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 18:42:18 -0300, rh0dium <[EMAIL PROTECTED]> escribió: > Let me expand a bit more - I am working on a threading class and I > want to be able to push on the Queue a list of args. If you run the > following program - I am failing to understand how to push items onto > the queu

Re: Having problems accepting parameters to a function

2007-05-01 Thread 7stud
kwargs is not a built in name--it's a made up name used in the docs.Would you expect this function to work: def somefunc(x=10, y=20): print a The best way to figure out a feature of a programming language that you don't understand is not in the middle of some complex program. Instead, yo

Re: Python for Windows other way to getting it?

2007-05-01 Thread Stef Mientki
[EMAIL PROTECTED] wrote: > On May 1, 5:17 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] schrieb: >> >>> Hello >>> I don't have permission to install new application on the PC I'm >>> using, I need a zipped version of python that I can copy on my >>> external drive. Where ca

Re: ScrolledText?

2007-05-01 Thread Basilisk96
Would this work? self.text = wx.TextCtrl(panel, style=wx.TE_MULTILINE) ... line = '\n' + "Hello world!" self.text.AppendText(line) -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp-like macros in Python?

2007-05-01 Thread John Nagle
Duane Rettig wrote: > sturlamolden <[EMAIL PROTECTED]> writes: > > >>Hello >> >>The Lisp crowd always brags about their magical macros. I used LISP back when LISP macros were popular. You don't want to go there. It degrades readability without improving the language. Check out the ori

Re: Python for Windows other way to getting it?

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 17:38:36 -0300, <[EMAIL PROTECTED]> escribió: > I don't have permission to install new application on the PC I'm > using, I need a zipped version of python that I can copy on my > external drive. Where can I get a zip version? It's enough to copy the Python folder + pythonNN.d

ScrolledText?

2007-05-01 Thread nik
I've been trying to get the scrollbar and text box always going to the last line and have been completely unsuccessful. I've tried, ScrolledText, text.see, and text.yview_pickplace without success for instance this was the last setup: self.text = ScrolledText(master, relief=RIDGE) self

Re: Comparing bitmap images for differences?

2007-05-01 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I know it's a long shot but does anyone have any pointers to generic | algorithms - or, even better, Python code - for comparing images and | computing a value for the "difference" between them? If PIL and the other posted ideas are no

Re: Python user group in Portland, OR?

2007-05-01 Thread Matimus
Python.org lists PORPIG (PORtland Python Intrest Group) but the site that it points to no longer seems to represent that. Also, when I looked into going to a meeting a while back, the last one listed was some time in 2004. I will put this out there though, if someone wants to start a PIG back up fo

Re: Removing the continous newline characters from the pythong string

2007-05-01 Thread Basilisk96
What was I thinking? split() will only work if you have no other whitespace characters in the string. A regex like "[\n\r]+" is indeed much more appropriate and robust. Cheers -Basilisk96 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for Windows other way to getting it?

2007-05-01 Thread noagbodjivictor
On May 1, 5:50 pm, Tal Einat <[EMAIL PROTECTED]> wrote: > On May 2, 12:43 am, [EMAIL PROTECTED] wrote: > > > > > On May 1, 5:17 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > > [EMAIL PROTECTED] schrieb: > > > > > Hello > > > > I don't have permission to install new application on the PC I

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 16:23:44 -0300, Bob Phillips <[EMAIL PROTECTED]> escribió: > That is the oft-quoted, idiotic type of example. The reality is that if > we > follow the thread, we know the question, we only want to see the answer, > not > wade through a morass of stuff we have already seen

Re: Lisp-like macros in Python?

2007-05-01 Thread Andy Freeman
On May 1, 9:10 am, sturlamolden <[EMAIL PROTECTED]> wrote: > I was > wondering if it is possible to emulate some of the functionality in > Python using a function decorator that evals Python code in the stack > frame of the caller. The macro would then return a Python expression > as a string. Gran

Re: Removing the continous newline characters from the pythong string

2007-05-01 Thread Basilisk96
why not use split: >>>s = " >>>a\n\n\n\n\n\n\n\n\nsss\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvsa\n\n\n\nasf... >>>\n\nafs" >>>s.split() ['a', 'sss', '', 'vsa', 'asf...', 'afs'] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for Windows other way to getting it?

2007-05-01 Thread Tal Einat
On May 2, 12:43 am, [EMAIL PROTECTED] wrote: > On May 1, 5:17 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] schrieb: > > > > Hello > > > I don't have permission to install new application on the PC I'm > > > using, I need a zipped version of python that I can copy on my

Re: Grabbing the output of a long-winded shell call (in GNU/Linux)

2007-05-01 Thread Efrat Regev
Diez B. Roggisch wrote: > Efrat Regev schrieb: >> [EMAIL PROTECTED] wrote: >>> On May 1, 2:23 pm, Efrat Regev <[EMAIL PROTECTED]> wrote: >>> So my question is if there's a way to "grab" the output as it's being generated. It doesn't matter if the solution is blocking (as opposed to c

Re: Removing the continous newline characters from the pythong string

2007-05-01 Thread Ian Clark
On 1 May 2007 14:30:12 -0700, mobil <[EMAIL PROTECTED]> wrote: > Hi guys i m trying out newline characters and to clean them up > a\n\n\n\n\n\n\n\n\nsss\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvsa\n\n\n\nasf > \n\nafs > > hello guys > > im trying to replace > \n\n\n\n\n\n\n\n\n with \n > > thanks for help

Re: Python for Windows other way to getting it?

2007-05-01 Thread noagbodjivictor
On May 1, 5:17 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > Hello > > I don't have permission to install new application on the PC I'm > > using, I need a zipped version of python that I can copy on my > > external drive. Where can I get a zip version? > > ht

Re: Having problems accepting parameters to a function

2007-05-01 Thread rh0dium
Thanks to all who helped!! Let me expand a bit more - I am working on a threading class and I want to be able to push on the Queue a list of args. If you run the following program - I am failing to understand how to push items onto the queue in a manner so that func2 recognizes them as kwargs not

Re: read list of dirnames and search for filenames

2007-05-01 Thread Rob Wolfe
Rob Wolfe <[EMAIL PROTECTED]> writes: > fscked <[EMAIL PROTECTED]> writes: > >> I cannot seem to get this to work. I am hyst trying to read in a list >> of paths and see if the directory or any sub has a filename pattern. >> Here is the code: >> >> import os, sys >> from path import path >> >> myf

Re: pre-PEP: Standard Microthreading Pattern

2007-05-01 Thread Paul McGuire
On May 1, 3:58 pm, [EMAIL PROTECTED] wrote: > I've been hacking away on this PEP for a while, and there has been some > related discussion on python-dev that went into the PEP: > > http://mail.python.org/pipermail/python-dev/2007-February/070921.html > http://mail.python.org/pipermail/python-dev/

Removing the continous newline characters from the pythong string

2007-05-01 Thread mobil
Hi guys i m trying out newline characters and to clean them up a\n\n\n\n\n\n\n\n\nsss\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvsa\n\n\n\nasf \n\nafs hello guys im trying to replace \n\n\n\n\n\n\n\n\n with \n thanks for help \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n also with \n as the browser gives \r carr

Cleaning up repeated whitespaces and newlines

2007-05-01 Thread mobiledreamers
Hi guys i m trying out newline characters and to clean them up a\n\n\n\n\n\n\n\n\nsss\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvsa\n\n\n\nasf\n\nafs hello guys im trying to replace \n\n\n\n\n\n\n\n\n with \n thanks for help \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n also with \n as the browser gives \r carr

Python user group in Portland, OR?

2007-05-01 Thread bradallen
I've been visiting Portland, OR on a multi-week client project, and am wondering if there are any local Python or Zope programmers in the Portland area. I am only going to be here for a couple more weeks, and the client is getting nervous about whether there are any Python/Zope programmers in the

Re: Using python with MySQL

2007-05-01 Thread HMS Surprise
> hi, > download this module:http://sourceforge.net/projects/mysql-python > and look at the tutorial here:http://www.kitebird.com/articles/pydbapi.html Done, thank you too. jh -- http://mail.python.org/mailman/listinfo/python-list

pre-PEP: Standard Microthreading Pattern

2007-05-01 Thread dustin
I've been hacking away on this PEP for a while, and there has been some related discussion on python-dev that went into the PEP: http://mail.python.org/pipermail/python-dev/2007-February/070921.html http://mail.python.org/pipermail/python-dev/2007-February/071155.html http://mail.python.org/

Re: Python for Windows other way to getting it?

2007-05-01 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hello > I don't have permission to install new application on the PC I'm > using, I need a zipped version of python that I can copy on my > external drive. Where can I get a zip version? http://www.voidspace.org.uk/python/movpy/ Diez -- http://mail.python.org/mailma

Re: read list of dirnames and search for filenames

2007-05-01 Thread Rob Wolfe
fscked <[EMAIL PROTECTED]> writes: > I cannot seem to get this to work. I am hyst trying to read in a list > of paths and see if the directory or any sub has a filename pattern. > Here is the code: > > import os, sys > from path import path > > myfile = open("boxids.txt", "r") > for line in myfile

Re: How can I get the ascii code of a charter in python?

2007-05-01 Thread Michael Bentley
On May 1, 2007, at 4:06 PM, [EMAIL PROTECTED] wrote: > Hi, > a python newbe needs some help, > > I read the python doc at > http://docs.python.org/lib/module-curses.ascii.html > > I tried > Import curses.asciicurses.ascii > Print ascii('a') > > I get an error saying module curses.ascii8 does not

Re: How can I get the ascii code of a charter in python?

2007-05-01 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi, > a python newbe needs some help, > > I read the python doc at > http://docs.python.org/lib/module-curses.ascii.html > > I tried > Import curses.asciicurses.ascii > Print ascii('a') > > I get an error saying module curses.ascii8 does not exsist. > > How can I ge

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Michael Bentley
On May 1, 2007, at 3:45 PM, Tobiah wrote: > I wanted to do: > > query = "query text" % tuple() > > but the append() method returns none, so I did this: > > fields = rec[1:-1] > fields.append(extra) > query = "query text" % tuple(fields) > As you learned. .append() adds to

Re: How can I get the ascii code of a charter in python?

2007-05-01 Thread dustin
On Tue, May 01, 2007 at 02:06:21PM -0700, [EMAIL PROTECTED] wrote: > How can I get the ascii code of a charter in python? It's a builtin: >>> ord('*') 42 Dustin -- http://mail.python.org/mailman/listinfo/python-list

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Carsten Haese
On Tue, 2007-05-01 at 14:00 -0700, Paul McGuire wrote: > On May 1, 3:45 pm, Tobiah <[EMAIL PROTECTED]> wrote: > > I wanted to do: > > > > query = "query text" % tuple(rec[1:-1].append(extra)) > > > > but the append() method returns none, so I did this: > > > > fields = rec[1:-1] > >

How can I get the ascii code of a charter in python?

2007-05-01 Thread [EMAIL PROTECTED]
Hi, a python newbe needs some help, I read the python doc at http://docs.python.org/lib/module-curses.ascii.html I tried Import curses.asciicurses.ascii Print ascii('a') I get an error saying module curses.ascii8 does not exsist. How can I get the ascii code of a charter in python? -Ted -- h

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Paul McGuire
On May 1, 3:45 pm, Tobiah <[EMAIL PROTECTED]> wrote: > I wanted to do: > > query = "query text" % tuple(rec[1:-1].append(extra)) > > but the append() method returns none, so I did this: > > fields = rec[1:-1] > fields.append(extra) > query = "query text" % tuple(fiel

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Rob Wolfe
Tobiah <[EMAIL PROTECTED]> writes: > I wanted to do: > > query = "query text" % tuple(rec[1:-1].append(extra)) > > but the append() method returns none, so I did this: > > fields = rec[1:-1] > fields.append(extra) > query = "query text" % tuple(fields) What about this?

I wish that [].append(x) returned [x]

2007-05-01 Thread Tobiah
I wanted to do: query = "query text" % tuple(rec[1:-1].append(extra)) but the append() method returns none, so I did this: fields = rec[1:-1] fields.append(extra) query = "query text" % tuple(fields) -- Posted via a free Usenet account from http://www.teranews.c

Python for Windows other way to getting it?

2007-05-01 Thread noagbodjivictor
Hello I don't have permission to install new application on the PC I'm using, I need a zipped version of python that I can copy on my external drive. Where can I get a zip version? Thanks -- http://mail.python.org/mailman/listinfo/python-list

read list of dirnames and search for filenames

2007-05-01 Thread fscked
I cannot seem to get this to work. I am hyst trying to read in a list of paths and see if the directory or any sub has a filename pattern. Here is the code: import os, sys from path import path myfile = open("boxids.txt", "r") for line in myfile.readlines(): d = path(line) for f i

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread Dom Robinson
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > You bottom posters really are a bunch of supercilious, self-righteous > bigots. > > Personally, I find bottom-posting like reading a book backwards ... it > doesn't work for me. > > And regardless of his response, Mr Bruney IS an MVP,

Re: relative import broken?

2007-05-01 Thread Alan Isaac
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I don't know of any "pretty" way -- I'd do it by path manipulation > (finding mypackage from os.path.abspath(__file__) and inserting its > _parent_ directory in sys.path). Yes, that seems to be the standard solution. I

Re: Grabbing the output of a long-winded shell call (in GNU/Linux)

2007-05-01 Thread Diez B. Roggisch
Efrat Regev schrieb: > [EMAIL PROTECTED] wrote: >> On May 1, 2:23 pm, Efrat Regev <[EMAIL PROTECTED]> wrote: >> >>> So my question is if there's a way to "grab" the output as it's being >>> generated. It doesn't matter if the solution is blocking (as opposed to >>> callback based), since threads ca

Re: Lisp-like macros in Python?

2007-05-01 Thread Duane Rettig
sturlamolden <[EMAIL PROTECTED]> writes: > Hello > > The Lisp crowd always brags about their magical macros. I was > wondering if it is possible to emulate some of the functionality in > Python using a function decorator that evals Python code in the stack > frame of the caller. The macro would th

Re: Using python with MySQL

2007-05-01 Thread HMS Surprise
On May 1, 2:58 pm, "Greg Donald" <[EMAIL PROTECTED]> wrote: > On 1 May 2007 12:40:20 -0700, HMS Surprise <[EMAIL PROTECTED]> wrote: > > > I need to peform some simple queries via MySQL. Searching the list I > > see that folks are accessing it with python. I am very new to python > > and pretty new

Re: Using python with MySQL

2007-05-01 Thread Shafik
On May 1, 10:40 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > Greetings, > > I need to peform some simple queries via MySQL. Searching the list I > see that folks are accessing it with python. I am very new to python > and pretty new to MySQL too. Would appreciate it if you could point me > to some

  1   2   >