SonomaSunshine Get's a Little Peppier

2007-04-30 Thread SamFeltus
http://samfeltus.com/as3/codetalking.html SonomaSunshine - The Redneck Riviera's Best Python Powered Folk Art Server :) -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-30 Thread Antoon Pardon
On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Antoon Pardon a écrit : >> On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >> >>>7stud a écrit : >>> [EMAIL PROTECTED] wrote: >Annoyances: > Every language has annoyances. Python is no exceptio

Re: fastest way to find the intersection of n lists of sets

2007-04-30 Thread Raymond Hettinger
[Prateek] > I have 3 variable length lists of sets. I need to find the common > elements in each list (across sets) really really quickly. . . . > l1 = reduce(operator.add, list(x) for x in l1) > l2 = reduce(operator.add, list(x) for x in l2) > l3 = reduce(operator.add, list(x) for x in l3) > s = f

Re: fastest way to find the intersection of n lists of sets

2007-04-30 Thread Raymond Hettinger
[Prateek] > The reason why I'm casting to a list first is because I found that > creating a long list which I convert to a set in a single operation is > faster (although probably less memory efficient - which I can deal > with) than doing all the unions. That would be a surprising result because

I/O Operations .....

2007-04-30 Thread saif . shakeel
Hi, I am parsing an XML file and sending the output to two files.The code asks the user to enter the input file,something like: file_input = raw_input("Enter The ODX File Path:") input_xml = open(file_input,'r') Now suppose the user enters the path as : C:\Projects\ODX Import\Sample Files\

Qustion about struct.unpack

2007-04-30 Thread OhKyu Yoon
Hi! I have a really long binary file that I want to read. The way I am doing it now is: for i in xrange(N): # N is about 10,000,000 time = struct.unpack('=', infile.read(8)) # do something tdc = struct.unpack('=LiLiLiLi',self.lmf.read(32)) # do something Each loop takes about

regexp match string with word1 and not word2

2007-04-30 Thread Flyzone
Hello, i have again problem with regexp :-P I need to match all lines that contain one word but not contain another. Like to do "grep one | grep -v two:" The syntax of the string is: (any printable char)two:(any printable char)one(any printable char) Example: Apr 30 00:00:09 v890neg0 two: [ID 70291

Re: Free Windows Vista Download

2007-04-30 Thread DCA
Spin Dryer wrote: > On Sun, 29 Apr 2007 20:23:22 -0400, ["Alvin Bruney [MVP]" without an email address>] said :- > > >> That's a misleading post, you should indicate that this is an evaluation >> copy. >> > > > You did it again Sonny, making yourself look a total fool. > > Will you stop t

Re: fastest way to find the intersection of n lists of sets

2007-04-30 Thread Prateek
On Apr 30, 12:37 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > [Prateek] > > > The reason why I'm casting to a list first is because I found that > > creating a long list which I convert to a set in a single operation is > > faster (although probably less memory efficient - which I can deal >

Dict Copy & Compare

2007-04-30 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking for a little advice on dicts, firstly I need to learn how to copy a dict, I suppose I could just something like. Self.newdict = self.olddict But I fear that this only creates a reference rather than an actual copy, this means that as soon as I clear out the old o

Reading From an Excel Sheet

2007-04-30 Thread sagar
Hi all, I want to write a python script which reads in data from the excel sheet .Can any one help out in this ...any help will be appreciated. Thanks in Advance Sagar Meesala -- http://mail.python.org/mailman/listinfo/python-list

Reading Data From an Excel Sheet

2007-04-30 Thread sagar
Hi all, I want a python script which takes in input an EXCEL sheet and then reads the data in it. Any code snippets will be fine and this i want this in windows XP . Thanks in Advance Sagar Meesala -- http://mail.python.org/mailman/listinfo/python-list

Re: Dict Copy & Compare

2007-04-30 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > I'm looking for a little advice on dicts, firstly I need to learn how to > copy a dict, I suppose I could just something like. > Self.newdict = self.olddict > But I fear that this only creates a reference rather than an actual copy, > this means that as soon a

Re: Qustion about struct.unpack

2007-04-30 Thread Steven D'Aprano
On Mon, 30 Apr 2007 00:45:22 -0700, OhKyu Yoon wrote: > Hi! > I have a really long binary file that I want to read. > The way I am doing it now is: > > for i in xrange(N): # N is about 10,000,000 > time = struct.unpack('=', infile.read(8)) > # do something > tdc = struct.unpack('

Re: Reading Data From an Excel Sheet

2007-04-30 Thread Tim Golden
sagar wrote: > Hi all, >I want a python script which takes in input an EXCEL sheet > and then reads the data in it. > Any code snippets will be fine and this i want this in windows > XP . Might I humbly suggest that, instead of posting several somewhat demanding requests for help w

Importing a csv file

2007-04-30 Thread sagar
Hi all , I want to read data in a csv file using the python scripts. when i gave the following code : import csv reader = csv.reader(open("some.csv", "rb")) for row in reader: print row it is showing : Traceback (most recent call last): File "csv.py", line 1, in import csv

RE: Dict Copy & Compare

2007-04-30 Thread Robert Rawlins - Think Blue
Thanks for that Tim, The first part for copying the dict seems to work nicely but I'm struggling to get the second part working properly. Let me explain a little more specifically what I'm trying to do. I have two dicts, one named 'this' and the other named 'that'. I want to get all the unique k

What's the life time of the variable defined in a class function?

2007-04-30 Thread 人言落日是天涯,望极天涯不见家
Please see the followed example: class A: def __init__(self): pass class X: def __init__(self): n = 200 if True: j = 200 m = j k = A() print m, j a = X() # ?? what about the m, n and j? is it still alive? del a -

Re: I/O Operations .....

2007-04-30 Thread Daniel Nogradi
> I am parsing an XML file and sending the output to two files.The > code asks the user to enter the input file,something like: > > file_input = raw_input("Enter The ODX File Path:") > input_xml = open(file_input,'r') > > Now suppose the user enters the path as : > C:\Projects\ODX Import\Sample F

Re: Dict Copy & Compare

2007-04-30 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > I have two dicts, one named 'this' and the other named 'that'. > > I want to get all the unique keys from 'this' and log them into a file, I > then want to take all the unique values from 'that' and log them into a > separate file. Couple of points which are c

Re: I/O Operations .....

2007-04-30 Thread saif . shakeel
On Apr 30, 2:13 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > > I am parsing an XML file and sending the output to two files.The > > code asks the user to enter the input file,something like: > > > file_input = raw_input("Enter The ODX File Path:") > > input_xml = open(file_input,'r') > > > N

Re: Importing a csv file

2007-04-30 Thread Tim Golden
sagar wrote: > Hi all , >I want to read data in a csv file using the python scripts. > when i gave the following code : > import csv > reader = csv.reader(open("some.csv", "rb")) > for row in reader: > print row > > it is showing : > > Traceback (most recent call last): > File

Re: What's the life time of the variable defined in a class function?

2007-04-30 Thread Diez B. Roggisch
人言落日是天涯,望极天涯不见家 wrote: > Please see the followed example: > class A: > def __init__(self): > pass > > class X: > def __init__(self): > n = 200 > if True: > j = 200 > m = j > k = A() > print m, j > > a = X() > # ?? what about the

anyone has experience on cross-compile python 2.5.1?

2007-04-30 Thread Leo Jay
i have a development board based on s3c2410 arm cpu. and i want to port python on it. after googling some threads, i successfully cross compiled python. but i still encountered a weird issue that when i ran /lib/python2.5/test/testall.py, the process stuck at test_asynchat.py, i located the stuck p

Re: While we're talking about annoyances

2007-04-30 Thread Arnaud Delobelle
On Apr 30, 2:50 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > >... > > > > >> decorated.sort() >... > > > def index(sequence): > > > return sorted(range(len(sequence)), key=sequence.__getitem__) >... > > But really these two versio

Re: What's the life time of the variable defined in a class function?

2007-04-30 Thread 人言落日是天涯,望极天涯不见家
On Apr 30, 5:20 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > 人言落日是天涯,望极天涯不见家 wrote: > > Please see the followed example: > > class A: > >     def __init__(self): > >         pass > > > class X: > >     def __init__(self): > >         n = 200 > >         if True: > >             j = 200 > >  

Re: I/O Operations .....

2007-04-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, saif.shakeel wrote: > File writing can be done in that way,but my query is > something different.I have to rename the output file by default with > input file name(only changing the extension. Take a look at the functions in `os.path`. Ciao, Marc 'Blac

How do I parse a string to a tuple??

2007-04-30 Thread Soren
Hi! I have a string that contains some text and newline characters. I want to parse the string so that the string just before a newline character goes in as an element in the tuple. ex: "text1 \n text2 \n text3 \n text4" --> (text1, text2, text3, text4) Is there an easy way to do this? Thank

Re: While we're talking about annoyances

2007-04-30 Thread Michael Hoffman
Alex Martelli wrote: > Michael Hoffman <[EMAIL PROTECTED]> wrote: > >> Alex Martelli wrote: >>> Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >>>... >>> decorated.sort() >>>... > def index(sequence): > return sorted(range(len(sequence)), key=sequence.__getitem__) >>>

Re: How do I parse a string to a tuple??

2007-04-30 Thread Steven D'Aprano
On Mon, 30 Apr 2007 02:47:32 -0700, Soren wrote: > Hi! > > I have a string that contains some text and newline characters. I want > to parse the string so that the string just before a newline character > goes in as an element in the tuple. > > ex: > > "text1 \n text2 \n text3 \n text4" --> (

Re: How do I parse a string to a tuple??

2007-04-30 Thread James Stroud
Soren wrote: > Hi! > > I have a string that contains some text and newline characters. I want > to parse the string so that the string just before a newline character > goes in as an element in the tuple. > > ex: > >--> (text1, text2, text3, text4) > > Is there an easy way to do this? > >

Re: Dict Copy & Compare

2007-04-30 Thread Steven D'Aprano
On Mon, 30 Apr 2007 09:40:53 +0100, Tim Golden wrote: > Robert Rawlins - Think Blue wrote: >> I'm looking for a little advice on dicts, firstly I need to learn how to >> copy a dict, I suppose I could just something like. > >> Self.newdict = self.olddict > >> But I fear that this only creates a

RE: Dict Copy & Compare

2007-04-30 Thread Robert Rawlins - Think Blue
Hello Tim, Sorry, that 'value' was a slip up on my part, we're just dealing with keys here. I get that a dict stores unique keys only but we're comparing the two dicts, so when I say 'unique keys in dict 1' I basically mean all those keys that are in dict one but not in dict 2. So imagine my 2 di

Re: How do I parse a string to a tuple??

2007-04-30 Thread 人言落日是天涯,望极天涯不见家
On Apr 30, 5:47 pm, Soren <[EMAIL PROTECTED]> wrote: > Hi! > > I have a string that contains some text and newline characters. I want > to parse the string so that the string just before a newline character > goes in as an element in the tuple. > > ex: > > "text1 \n text2 \n text3 \n text4"   --> (

RE: Dict Copy & Compare

2007-04-30 Thread Steven D'Aprano
On Mon, 30 Apr 2007 10:05:40 +0100, Robert Rawlins - Think Blue wrote: > I have two dicts, one named 'this' and the other named 'that'. > > I want to get all the unique keys from 'this' and log them into a file, I > then want to take all the unique values from 'that' and log them into a > separat

Re: How do I parse a string to a tuple??

2007-04-30 Thread Soren
Thanks alot everyone! Soren -- http://mail.python.org/mailman/listinfo/python-list

Re: regexp match string with word1 and not word2

2007-04-30 Thread James Stroud
Flyzone wrote: > Hello, > i have again problem with regexp :-P > I need to match all lines that contain one word but not contain > another. > Like to do "grep one | grep -v two:" > The syntax of the string is: > (any printable char)two:(any printable char)one(any printable char) > Example: > Apr 30

Re: How do I parse a string to a tuple??

2007-04-30 Thread Michael Hoffman
Steven D'Aprano wrote: > On Mon, 30 Apr 2007 02:47:32 -0700, Soren wrote: >> "text1 \n text2 \n text3 \n text4" --> (text1, text2, text3, text4) > > the_string = "text1 \n text2 \n text3 \n text4" > tuple(the_string.split('\n')) > > If you don't need a tuple, and a list will do: > > the_string

Re: Dict Copy & Compare

2007-04-30 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > Hello Tim, > > Sorry, that 'value' was a slip up on my part, we're just dealing with keys > here. > > I get that a dict stores unique keys only but we're comparing the two dicts, > so when I say 'unique keys in dict 1' I basically mean all those keys that > ar

Re: My Python annoyances

2007-04-30 Thread Isaac Rodriguez
> Hmm, on my PyCon mug there are words "Python: so easy...even your BOSS > can use it!" Oh man! I would've killed for a mug like that a year ago. I was working for this guy, who had the entire build process automated in .BAT scripts. We spent more time fixing the build process than devoloping our

Re: How do I parse a string to a tuple??

2007-04-30 Thread shakil ahmad
just do like this: a="text1 \n text2 \n text3 \n text4" g=a.split('\n') g ['text1 ', ' text2 ', ' text3 ', ' text4'] d=tuple(g) d ('text1 ', ' text2 ', ' text3 ', ' text4') by Shakil -- http://mail.python.org/mailman/listinfo/python-list

Re: I/O Operations .....

2007-04-30 Thread Daniel Nogradi
> > > I am parsing an XML file and sending the output to two files.The > > > code asks the user to enter the input file,something like: > > > > > file_input = raw_input("Enter The ODX File Path:") > > > input_xml = open(file_input,'r') > > > > > Now suppose the user enters the path as : > > > C:\

RE: Dict Copy & Compare

2007-04-30 Thread Robert Rawlins - Think Blue
Thanks for that Tim, Don't feel guilty mate, I've learned a little something from you anyway, whether its applied here or not. On quick question, how can I order a dict by the 'values' (not keys) before looping? Is that possible? Thanks, Rob -Original Message- From: [EMAIL PROTECTED] [

Re: if __name__ == 'main': & passing an arg to a class object

2007-04-30 Thread Duncan Booth
Bart Willems <[EMAIL PROTECTED]> wrote: > gtb wrote: >> appear at the end of many examples I see. Is this to cause a .class >> file to be generated? > This might be obvious, but no one else mentioned it: the Python > interpreter cannot execute code that it hasn't compiled yet, which is > why the

Re: Beginner Ping program

2007-04-30 Thread Duncan Booth
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > There is no (that I am aware of) ICMP module in the standard library. > See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409689 for > an example of a Python implementation of ping. Google also finds another implementation at: http://ww

Re: regexp match string with word1 and not word2

2007-04-30 Thread James Stroud
Flyzone wrote: > P.S: i can't have more re.search, so [clip] This reminds me of a quote by the Great Researcher Roy Garcia: If it worked the first time, they'd just call it "search". James -- http://mail.python.org/mailman/listinfo/python-list

Re: Chart drawing tool in python

2007-04-30 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > Hi, > > In Perl, there is a GD module to draw custom chart. > > http://www-128.ibm.com/developerworks/opensource/library/os-perlgdchart/?ca=dgr-lnxw01Perl-GD-Charts > > Can you please tell me if there is an equivalent library in python? > > Thank you. > You may l

Re: Importing a csv file

2007-04-30 Thread John Machin
On Apr 30, 7:21 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > sagar wrote: > > Hi all , > >I want to read data in a csv file using the python scripts. > > when i gave the following code : > > import csv > > reader = csv.reader(open("some.csv", "rb")) > > for row in reader: > > print

Re: I can't inherit from "compiled" classes ?

2007-04-30 Thread Diez B. Roggisch
> I understand what you are saying, and at the same time don't > understand why it doesn't work. Isn't "everything an object" in > python? And if something is an object does it not implies it's an > instance of some class? It means that, but it seems that you can't subclass everything, especially

Restricting the alphabet of a string

2007-04-30 Thread Nathan Harmston
Hi, I ve being thinking about playing around with bit strings but use in some encoding problems I m considering and was trying to decide how to implement a bit string class. Is there a library out there for doing basic things with bit strings already is my first question? I know that I can extend

Re: Dict Copy & Compare

2007-04-30 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > On[e] quick question, how can I order a dict by > the 'values' (not keys) before looping? Is that possible? Depends on what you want to do. You can loop on the sorted values very easily: d1 = dict (a=2, b=1) for value in sorted (d1.values): print value

Re: Importing a csv file

2007-04-30 Thread Tim Golden
John Machin wrote: > On Apr 30, 7:21 pm, Tim Golden <[EMAIL PROTECTED]> wrote: >> sagar wrote: >>> Hi all , >>>I want to read data in a csv file using the python scripts. >>> when i gave the following code : >>> import csv >>> reader = csv.reader(open("some.csv", "rb")) >>> for row in

How to convert float to sortable integer in Python

2007-04-30 Thread ireyes
DEAR SIR, I SAW YOUR INTERNET QUESTION AND I HAVE THE SAME TROUBLE. CUOLD YOU HELP ME TO MAKE A FLOAT TO INTEGER CONVERTION? DO YOU HAVE ANY EXEL FILE THAT CAN DO THAT? REGARDS AND THANKS A LOT IVAN REYES ___ AVISO LEGAL: El presente correo electronico no represe

[ANN] Update to Python Quick Reference Card (for Python 2.4) (v0.67)

2007-04-30 Thread Laurent Pointal
PQRC (Python Quick Reference Card) is a condensed documentation for Python and its main libraries, targetting production of printed quick reference cards. Its available as OpenDocument .odt files and as A4 and USLetter formatted PDF files ready to print. Its distributed under a Creative Commons

RE: Dict Copy & Compare

2007-04-30 Thread Robert Rawlins - Think Blue
No that makes sense Tim, Thanks again for all your help on this one, it'll all prove invaluable I'm sure. I managed to crack all the big troubles last week with my reoccurring tasks, it's just a case of tidying up a few of these loose ends, then that'll be python project no.1 over and done with :-

Re: Reading Data From an Excel Sheet

2007-04-30 Thread garcia . marc
On Apr 30, 10:35 am, sagar <[EMAIL PROTECTED]> wrote: > Hi all, >I want a python script which takes in input an EXCEL sheet > and then reads the data in it. > Any code snippets will be fine and this i want this in windows > XP . > >Thanks in Advance > Sagar Meesala Here y

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

2007-04-30 Thread Cameron Laird
QOTW: "That is just as feasible as passing a cruise ship through a phone line." - Carsten Haese, on transporting a COM object across a network. Less vividly but more formally, as he notes, "A COM object represents a connection to a service or executable that is running on one computer. Transferrin

Re: How to convert float to sortable integer in Python

2007-04-30 Thread Larry Bates
[EMAIL PROTECTED] wrote: > DEAR SIR, > I SAW YOUR INTERNET QUESTION AND I HAVE THE SAME TROUBLE. > CUOLD YOU HELP ME TO MAKE A FLOAT TO INTEGER CONVERTION? > DO YOU HAVE ANY EXEL FILE THAT CAN DO THAT? > REGARDS AND THANKS A LOT > > IVAN REYES > > ___ > > AVISO LE

Re: Reading From an Excel Sheet

2007-04-30 Thread kyosohma
On Apr 30, 3:25 am, sagar <[EMAIL PROTECTED]> wrote: > Hi all, > I want to write a python script which reads in data from the > excel sheet .Can any one help out in this ...any help will be > appreciated. > > Thanks in Advance > Sagar Meesala "Core Python Programming" by Chun and "Py

Re: Cgi File Upload without Form

2007-04-30 Thread Karsten . G . Weinert
Thanks for your replies, however I think urlllib can not help me here. I have control over the server side (I can write a cgi-script in python), but I have very little control on the client side (I have to use VBA). Kind regards, Karsten. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading From an Excel Sheet

2007-04-30 Thread Dave Borne
> I want to write a python script which reads in data from the > excel sheet .Can any one help out in this ...any help will be > appreciated. Try here: http://cheeseshop.python.org/pypi/xlrd/0.5.2 -- http://mail.python.org/mailman/listinfo/python-list

Re: Cgi File Upload without Form

2007-04-30 Thread Dave Borne
> Since I want to upload the data programmatically, a form based > solution is not good. Karsten, Could you explain this statement? When I want to move data to a server in a CGI environment, a form post is the easiest way I can think of. What are the specific restrictions making forms a problem?

Re: My python annoyances so far

2007-04-30 Thread Sion Arrowsmith
7stud <[EMAIL PROTECTED]> wrote: >I know what you mean. I always write: > >someStringVar.len > >and then I backspace and retype: > >len(someString). > >But then again, I can never remember whether length is a member or a >method in other languages. ... or whether it's called length, size, count

Re: Launching an independent Python program in a cross-platform way (including mac)

2007-04-30 Thread Kevin Walzer
Prateek wrote: > On Apr 30, 4:32 am, André <[EMAIL PROTECTED]> wrote: >> I would like to find out how I can launch an independent Python >> program from existing one in a cross-platform way. The result I am >> after is that a new terminal window should open (for io independent of >> the original s

Re: Restricting the alphabet of a string

2007-04-30 Thread 7stud
On Apr 30, 5:53 am, "Nathan Harmston" <[EMAIL PROTECTED]> wrote: > Hi, > > I ve being thinking about playing around with bit strings but use in > some encoding problems I m considering and was trying to decide how to > implement a bit string class. Is there a library out there for doing > basic thi

Re: Python ODBC

2007-04-30 Thread kyosohma
On Apr 29, 11:34 am, Harlin Seritt <[EMAIL PROTECTED]> wrote: > Is there a Python odbc module that will work on Linux? I have a jdbc > connection to a DB2 server. I am looking hopefully for an open source > solution and not a commercial one. > > Thanks, > > Harlin I would think the odbc module wou

Re: tkinter undo

2007-04-30 Thread kyosohma
On Apr 28, 8:50 am, Gigs_ <[EMAIL PROTECTED]> wrote: > Hi > > I dont have idea how to write tkinter undo/redo function form my text editor > and > my paint program. > Could someone help? I'm not asking for code, just for some guidelines to get > me > in the right way. > > thanks >From what I've

Re: relative import broken?

2007-04-30 Thread Alan Isaac
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To me, it makes sense: if a module is top-level, and thus not part of a > package (and __main__ in particular is always in that state), then > saying "import from the current package" has no well defined meaning, > becaus

socket module - recv() method

2007-04-30 Thread mirandacascade
Currently using the following technique in serveral client applications to send a request message and receive a response: import socket bufferSize = 50 connectionHandle = socket.socket(socket.AF_INET, socket.SOCK_STREAM) connectionHandle.connect(sa) connectionHandle.sendall(requestMessage) ful

Re: Cgi File Upload without Form

2007-04-30 Thread Karsten . G . Weinert
On 30 Apr., 15:51, "Dave Borne" <[EMAIL PROTECTED]> wrote: > > Since I want to upload the data programmatically, a form based > > solution is not good. > > Karsten, > Could you explain this statement? When I want to move data to a > server in a CGI environment, a form post is the easiest way I can

Problem with PyQt4

2007-04-30 Thread [EMAIL PROTECTED]
Hi, I am having some serious problems with PyQT4, when i run pyqt script, I always get 'Segmentation fault'. the script is simple: == %less qttest.py from PyQt4 import QtGui, QtCore import sys if __name__ == '__main__': app = QtGui.QApplication(sys.argv) w = Q

Re: Restricting the alphabet of a string

2007-04-30 Thread Paul McGuire
On Apr 30, 9:00 am, 7stud <[EMAIL PROTECTED]> wrote: > On Apr 30, 5:53 am, "Nathan Harmston" <[EMAIL PROTECTED]> > wrote: > > > > > > > Hi, > > > I ve being thinking about playing around with bit strings but use in > > some encoding problems I m considering and was trying to decide how to > > imple

Re: Launching an independent Python program in a cross-platform way (including mac)

2007-04-30 Thread André
On Apr 30, 10:59 am, Kevin Walzer <[EMAIL PROTECTED]> wrote: [snip] > > There are extension modules on the Mac for integrating Python and > AppleScript (the best one is appscript). However, if you want to limit > yourself to core Python, your best best is osascript, a system > command-tool that let

Re: Update to Python Quick Reference Card (for Python 2.4) (v0.67)

2007-04-30 Thread kyosohma
On Apr 30, 7:42 am, Laurent Pointal <[EMAIL PROTECTED]> wrote: > PQRC (Python Quick Reference Card) is a condensed documentation for > Python and its main libraries, targetting production of printed quick > reference cards. > Its available as OpenDocument .odt files and as A4 and USLetter > formatt

Re-running script from Tk shell

2007-04-30 Thread gtb
I am testing a simple script by running it in the Tk shell. It imports a class from another module. I edit and save the file from which I import. When I want to re-run I delete the Tk window and run the module from the Edit window (F5 - Run Module). The script that does the importing does not see

Re: While we're talking about annoyances

2007-04-30 Thread Alex Martelli
Michael Hoffman <[EMAIL PROTECTED]> wrote: ... > >> Well, counting the index() function that is called in both cases, the > >> original rank() had one sort, but my version has two sorts. > > > > That doesn't affet the big-O behavior -- O(N log N) holds whether you > > have one sort, or three, o

import structures

2007-04-30 Thread spohle
hi, i have written a small project for myself all in seperate classes and each of the classes lives in a seperate file. now i am looking for an import structure something like import wx, and then have access to all my classes just like wx.Button or wx.BoxSizer etc. as of now i have a __init__.py

Re: import structures

2007-04-30 Thread Paul McGuire
On Apr 30, 9:56 am, spohle <[EMAIL PROTECTED]> wrote: > hi, > > i have written a small project for myself all in seperate classes and > each of the classes lives in a seperate file. now i am looking for an > import structure something like import wx, and then have access to all > my classes just li

Re: import structures

2007-04-30 Thread spohle
On Apr 30, 8:00 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Apr 30, 9:56 am, spohle <[EMAIL PROTECTED]> wrote: > > > > > hi, > > > i have written a small project for myself all in seperate classes and > > each of the classes lives in a seperate file. now i am looking for an > > import structur

Re: regexp match string with word1 and not word2

2007-04-30 Thread Steven Bethard
Flyzone wrote: > Hello, > i have again problem with regexp :-P > I need to match all lines that contain one word but not contain > another. > Like to do "grep one | grep -v two:" You don't need a regexp:; if 'one' in line and 'two:' not in line: ... do something... STeVe -- http:/

RE: import structures

2007-04-30 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of spohle > Sent: Monday, April 30, 2007 10:03 AM > To: python-list@python.org > Subject: Re: import structures > > On Apr 30, 8:00 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > > On Apr 30, 9:56 a

Re: regexp match string with word1 and not word2

2007-04-30 Thread Flyzone
James Stroud ha scritto: > The P.S: suggests homework, but this can't be homework because python > regex won't do this, so your teacher gets an F if its homework. You Not a homework, but a "workwork" :-) I'm writing a script to parse logfiles, and I have began to study python for this (bash was t

Re: regexp match string with word1 and not word2

2007-04-30 Thread Flyzone
On 30 Apr, 17:11, Steven Bethard <[EMAIL PROTECTED]> wrote: > You don't need a regexp:; I need a regexp.i'm parsing a file with a rule-file that contains also regexp and strings too Read my post to James Stroud. -- http://mail.python.org/mailman/listinfo/python-list

Re: import structures

2007-04-30 Thread spohle
On Apr 30, 8:16 am, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] > [mailto:python- > > [EMAIL PROTECTED] On Behalf Of spohle > > Sent: Monday, April 30, 2007 10:03 AM > > To: [EMAIL PROTECTED] > > Subject: Re: import structures > > > On

Re: regexp match string with word1 and not word2

2007-04-30 Thread Carsten Haese
On Mon, 2007-04-30 at 08:22 -0700, Flyzone wrote: > On 30 Apr, 17:11, Steven Bethard <[EMAIL PROTECTED]> wrote: > > > You don't need a regexp:; > > I need a regexp.i'm parsing a file with a rule-file that contains > also regexp and strings too That was not at all evident from your origin

Re: import structures

2007-04-30 Thread Duncan Booth
spohle <[EMAIL PROTECTED]> wrote: > as of now i have a __init__.py file in the directory with: > from pkgutil import extend_path > __path__ = extend_path(__path__, __name__) > > but i still have to import each class by it's own. im really looking > for something like import wx > and then get all

RE: import structures

2007-04-30 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of spohle > Sent: Monday, April 30, 2007 10:25 AM > To: python-list@python.org > Subject: Re: import structures > > On Apr 30, 8:16 am, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > > > > If y

Can python find HW/SW installed on my PC - like Belarc?

2007-04-30 Thread walterbyrd
Lets suppose, I want a listing of what hardware and software is installed on my windows box. Can I do that with Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading Data From an Excel Sheet

2007-04-30 Thread [EMAIL PROTECTED]
On Apr 30, 3:35 am, sagar <[EMAIL PROTECTED]> wrote: > Hi all, >I want a python script which takes in input an EXCEL sheet > and then reads the data in it. > Any code snippets will be fine and this i want this in windows > XP . > >Thanks in Advance > Sagar Meesala have yo

Re: Can python find HW/SW installed on my PC - like Belarc?

2007-04-30 Thread kyosohma
On Apr 30, 10:47 am, walterbyrd <[EMAIL PROTECTED]> wrote: > Lets suppose, I want a listing of what hardware and software is > installed on my > windows box. Can I do that with Python? Yes, it is possible for Windows. I don't know how to grab the info for other OS's though. There is a caveat that

Re: Launching an independent Python program in a cross-platform way (including mac)

2007-04-30 Thread [EMAIL PROTECTED]
I would like to see this as a command along with something to open web pages.. Just one command instead of trying to figure out all the different op systems. look forward to seeing your code https://sourceforge.net/projects/dex-tracker On Apr 30, 9:40 am, André <[EMAIL PROTECTED]> wrote: > On

fix an example of wxwindows listed on rentacoder.com

2007-04-30 Thread [EMAIL PROTECTED]
The code in question is at https://sourceforge.net/projects/dex-tracker I am trying to get rid of the part of the example where you have to use run.py. since I am stuck and it is driving me nuts I have put it up for bid at http://www.rentacoder.com/RentACoder/misc/BidRequests/ShowBidRequest.

OT somewhat: Do you telecommute? What do you wish the boss understood about it?

2007-04-30 Thread estherschindler
For a lot of IT people -- everyone from software developers to tech writers to network support folks -- telecommuting is the best personal option. They get a flexible schedule, they aren't bothered by noisy cube-mates, they can code during whichever hours work for them (with the help of IM and emai

Re: Tracebacks for `exec`ed code?

2007-04-30 Thread brzrkr0
On Apr 29, 2:40 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Adam Atlas schrieb: > > > Is it possible to make more traceback information available for > > exceptions code dynamically run via `exec`? Normally it just says > > things like "File '', line 3, in ?", which is not very > > helpful.

Re: Cgi File Upload without Form

2007-04-30 Thread Karsten . G . Weinert
OK, I think I have a simple solution now. I am going to use FTP in my VBA-Client (it's possible) and don't need to do any server-side programming. Kind regards, Karsten. -- http://mail.python.org/mailman/listinfo/python-list

Re: Launching an independent Python program in a cross-platform way (including mac)

2007-04-30 Thread kyosohma
On Apr 30, 11:29 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I would like to see this as a command along with something to open web > pages.. Just one command instead of trying to figure out all the > different op systems. look forward to seeing your code > > https://sourceforge.net/proj

Re: Cgi File Upload without Form

2007-04-30 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): >> Could you explain this statement? When I want to move data to a >> server in a CGI environment, a form post is the easiest way I can >> think of. What are the specific restrictions making forms a problem? > what I was thinking was: a form post is meant to be used

Re: Re-running script from Tk shell

2007-04-30 Thread kyosohma
On Apr 30, 9:51 am, gtb <[EMAIL PROTECTED]> wrote: > I am testing a simple script by running it in the Tk shell. It imports > a class from another module. I edit and save the file from which I > import. When I want to re-run I delete the Tk window and run the > module from the Edit window (F5 - Ru

Re: regexp match string with word1 and not word2

2007-04-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Flyzone wrote: > for y in range(0, len(skip_lst) ): > if (re.search(skip_lst[y], line)): > skip=1 >break Please try to avoid unnecessary indexes:: for regexp in skip_list: if re.sea

RE: Dict Copy & Compare

2007-04-30 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Robert Rawlins - > Think Blue > Sent: Monday, April 30, 2007 6:09 AM > To: 'Tim Golden' > Cc: python-list@python.org > Subject: RE: Dict Copy & Compare > > On quick question, how can I order a d

  1   2   >