Re: sqlite weirdness

2007-12-12 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >Thanks Duncan and John! That makes sense. But why does the official >Python docs show an example that seems to imply that there is a "date" >type? See link below: You can certainly create fields of type "date" in sqlite, but sqlite doesn't understand any types. **ALL**

Monitoring the output of an external program

2007-12-12 Thread Caleb Marcus
I'm writing something that has to invoke an external program, and every time the external program prints something, update a UI. How would I go about doing this? signature.asc Description: This is a digitally signed message part -- http://mail.python.org/mailman/listinfo/python-list

Re: E-Mail Parsing

2007-12-12 Thread Matt Nordhoff
Merrigan wrote: > I am writing a script to administer my E-Mail Server. The One thing > I'm currently struggling with is kind of Parsing the E-Mail adress > that I supply to the script. > > I need to get the username (The part BEFORE the @ sign) out of the > address so that I can use it elsewhere.

E-Mail Parsing

2007-12-12 Thread Merrigan
Hi There, I am writing a script to administer my E-Mail Server. The One thing I'm currently struggling with is kind of Parsing the E-Mail adress that I supply to the script. I need to get the username (The part BEFORE the @ sign) out of the address so that I can use it elsewhere. The problem I ha

Re: Finding Line numbers of HTML file

2007-12-12 Thread Ramdas
Hey paul, Thanks a Ton! Never heard of pyparsing module. This is more a hobby, than any homework. This is exactly what I wanted. I am scrapping a few web pages for data. I am using Beautiful Soup for tag extraction. However for some quirky reasons, I need to reference back to the exact line n

Re: python "sounds-like" module

2007-12-12 Thread John Machin
On Dec 13, 4:12 pm, Astan Chee <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > Someone is sure to trot out the hoary old soundex ... believe me, it's > > teh suxxor. > > Plus febrl has soundex in it (as well as several modified versions of > it) among other things. Looks like this is what Im lo

RE: *SPAM*: 04.0/4.0 - Re: how to maximize a Tkinter Window in python TK???

2007-12-12 Thread Jose Ignacio Gisbert
If you want to start with your main window maximized, you can do: root = Tk() root.state("zoomed") Regards, Naxo -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Matimus Enviado el: jueves, 13 de diciembre de 2007 2:18 Para: python-list@python.org Asunto:

Re: Is Python really a scripting language?

2007-12-12 Thread Donald 'Paddy' McCarthy
Doug Morse wrote: > although perhaps not a part of the definition of scripting languages per se, > one aspect of them is that they are often used to "glue" a wide variety of > other components together. perl's initial and continued success is in no > small part to all the wrappers and interfaces i

Re: classmethod inheritance

2007-12-12 Thread Calvin Spealman
If you need multiple factories you can do so but to do what you're asking requires both a factory and an instance method initializer, just like __new__ is a class method and __init__ is an instance method. One creates and one initializes what is already created. On Dec 12, 2007, at 12:49 PM,

Re: python "sounds-like" module

2007-12-12 Thread Astan Chee
John Machin wrote: > Someone is sure to trot out the hoary old soundex ... believe me, it's > teh suxxor. > > Plus febrl has soundex in it (as well as several modified versions of it) among other things. Looks like this is what Im looking for. Thanks! Astan -- http://mail.python.org/mailman/li

Re: python "sounds-like" module

2007-12-12 Thread Astan Chee
John Machin wrote: > Someone is sure to trot out the hoary old soundex ... believe me, it's > teh suxxor. > > Plus febrl has soundex in it (as well as several modified versions of it) among other things. Looks like this is what Im looking for. Thanks! Astan -- http://mail.python.org/mailman/li

Re: python "sounds-like" module

2007-12-12 Thread Astan Chee
John Machin wrote: > Someone is sure to trot out the hoary old soundex ... believe me, it's > teh suxxor. > > plus febrl has soundex (and modified versions of it) within it. But thanks again! Looks like this is what I'm looking for. Thanks alot guys! Astan -- http://mail.python.org/mailman/lis

properties give variable docstrings

2007-12-12 Thread tjhnson
The topic of docstrings for variables has come up many times before. In fact, a PEP was proposed and rejected on this very topic. http://www.python.org/dev/peps/pep-0224/ When creating classes, I like using properties...and I like even more that these properties have docstrings. This allows one

Re: Difference between del and remove?

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 19:17:49 -0800, Yansky wrote: > Got a quick n00b question. What's the difference between del and remove? Everything. list.remove(value) removes the first item equal to value. del list[index] removes the item at position index. See also: help([].remove) Help on built-in func

Re: Dynamic or not?

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 19:18:20 -0800, rishiyoor wrote: > I'm trying to write a program that will find the distance between two > groups of points in space, which have cartesian co-ordinates X,Y and Z. > > I need to find the distances between each point in one group and every > point in the other gr

Re: Difference between del and remove?

2007-12-12 Thread Terry Reedy
"Yansky" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Got a quick n00b question. What's the difference between del and | remove? Python has a del statement but not a remove statement. Correspondingly, the first is a keyword and the second is not. tjr -- http://mail.python

Re: efficient data loading with Python, is that possible possible?

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 16:44:01 -0800, igor.tatarinov wrote: > Here is some of my code. Tell me what's wrong with it :) > > def loadFile(inputFile, loader): > # .zip files don't work with zlib Pardon? > f = popen('zcat ' + inputFile) > for line in f: > loader.handleLine(line)

Dynamic or not?

2007-12-12 Thread rishiyoor
I'm trying to write a program that will find the distance between two groups of points in space, which have cartesian co-ordinates X,Y and Z. I need to find the distances between each point in one group and every point in the other group. So if group 1 has 6 points and group 2 had 8 points, I will

Difference between del and remove?

2007-12-12 Thread Yansky
Got a quick n00b question. What's the difference between del and remove? -- http://mail.python.org/mailman/listinfo/python-list

Re: efficient data loading with Python, is that possible possible?

2007-12-12 Thread DouhetSukd
Back about 8 yrs ago, on pc hardware, I was reading twin 5 Mb files and doing a 'fancy' diff between the 2, in about 60 seconds. Granted, your file is likely bigger, but so is modern hardware and 20 mins does seem a bit high. Can't talk about the rest of your code, but some parts of it may be opt

Re: Improvements to the Python core

2007-12-12 Thread Christian Heimes
Paul Boddie wrote: > Then you haven't been reading the right IRC channel recently. ;-) What's the right channel? I'm on #python and #python-dev > Indeed, but there's arguably a certain amount of deadlock around > making unpatched, released versions of Python available in all these > places, unles

Re: Pascal code checker!

2007-12-12 Thread Dotan Cohen
On 13/12/2007, Tim Chase <[EMAIL PROTECTED]> wrote: > >> Oof! Fond as I am of promoting pyparsing, writing a Pascal > >> compiler (or even just syntax checker) is not a job I would > >> tackle lightly, much less suggest to a new Python developer. > > True enough...thus my weeks/months/years est

Re: Vista + Rails 2.0 upgrade => subprocess hangs

2007-12-12 Thread Christian Heimes
Eric Promislow wrote: >> Your usage of wait() is dangerous. The code can block indefinitely when >> the stdout or stderr buffer is full. >> >> Christian > > That's what it is. `rake -T` returns more data in Rails 2.0.1 > than it did in 1.2.6 -- cross-language breakage logically explained. > Thank

Re: Vista + Rails 2.0 upgrade => subprocess hangs

2007-12-12 Thread Eric Promislow
> > Your usage of wait() is dangerous. The code can block indefinitely when > the stdout or stderr buffer is full. > > Christian That's what it is. `rake -T` returns more data in Rails 2.0.1 than it did in 1.2.6 -- cross-language breakage logically explained. Thank you, Christian. - Eric -- htt

Re: Vista + Rails 2.0 upgrade => subprocess hangs

2007-12-12 Thread Christian Heimes
Eric Promislow wrote: > Here's a small Python program I use to grab the output from rake: > > = > > from subprocess import Popen, PIPE > > p = Popen(args='c:\\ruby\\bin\\ruby.exe c:\\ruby\\bin\\rake -T', > cwd=u'c:\\Users\\ericp\\testing\\file07', > shell=True, >

Re: efficient data loading with Python, is that possible possible?

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 14:48:03 -0800, igor.tatarinov wrote: > Hi, I am pretty new to Python and trying to use it for a relatively > simple problem of loading a 5 million line text file and converting it > into a few binary files. The text file has a fixed format (like a > punchcard). The columns con

Vista + Rails 2.0 upgrade => subprocess hangs

2007-12-12 Thread Eric Promislow
Here's a small Python program I use to grab the output from rake: = from subprocess import Popen, PIPE p = Popen(args='c:\\ruby\\bin\\ruby.exe c:\\ruby\\bin\\rake -T', cwd=u'c:\\Users\\ericp\\testing\\file07', shell=True, stdin=None, stderr=PIPE,

Re: efficient data loading with Python, is that possible possible?

2007-12-12 Thread John Machin
On Dec 13, 11:44 am, [EMAIL PROTECTED] wrote: > On Dec 12, 4:03 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > Inside your function > > [you are doing all this inside a function, not at global level in a > > script, aren't you?], do this: > > from time import mktime, strptime # do this ONCE >

Re: A way of checking if a string contains a number

2007-12-12 Thread MRAB
On Dec 12, 10:59 pm, "Zero Piraeus" <[EMAIL PROTECTED]> wrote: > : > > > [...] IMHO regular > > expressions are overkill for the task you describe. You may be better > > served to > > just try to convert it to whatever number you want. > > > try: > > value=int(string1) > > Fails for the OP's

Re: Is Python really a scripting language?

2007-12-12 Thread Doug Morse
although perhaps not a part of the definition of scripting languages per se, one aspect of them is that they are often used to "glue" a wide variety of other components together. perl's initial and continued success is in no small part to all the wrappers and interfaces it has to all sorts of othe

PyAMF - communicate with Flash/Flex apps from Python

2007-12-12 Thread Arnar
Hi there, For people doing Python - Flash integrations: We are pleased to announce the first alpha version of PyAMF. PyAMF [1] is a lightweight library that allows Flash and Python applications to communicate via Adobe's ActionScript Message Format. A summary of features in this release: * AM

Re: Is Python really a scripting language?

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 08:35:40 -0800, oj wrote: > On Dec 12, 4:34 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: >> "Ron Provost" <[EMAIL PROTECTED]> wrote in message >> >> news:[EMAIL PROTECTED] But here's my problem, >> most of my coworkers, when they see my apps and learn that they are >> written i

Re: Pascal code checker!

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 16:53:15 -0600, Tim Chase wrote: > >> Oof! Fond as I am of promoting pyparsing, writing a Pascal > >> compiler (or even just syntax checker) is not a job I would tackle > >> lightly, much less suggest to a new Python developer. > > True enough...thus my weeks/months/years

Re: how to maximize a Tkinter Window in python TK???

2007-12-12 Thread Matimus
On Dec 12, 3:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hello @ all, > > subj? example: import Tkinter as tk rt = tk.Tk() rt.state("zoomed") rt.overrideredirect(True) can = tk.Canvas(rt, bg="black",borderwidth=0,highlightthickness=0) can.pack(expand=True, fill=tk.BOTH) def draw_rect

Re: python "sounds-like" module

2007-12-12 Thread John Machin
On Dec 13, 11:39 am, Astan Chee <[EMAIL PROTECTED]> wrote: > Hi, > Thanks for all the help from the previous problem. Turns out I didnt > have to use wxSizers, just change the size of my wxWidgets everytime a > EVT_SIZE is called. > Anyway, Im trying to find a python module (im not sure if it exist

Re: Best way to protect my new commercial software.

2007-12-12 Thread Florian Diesch
farsheed <[EMAIL PROTECTED]> wrote: > Thanks. But I ask this question technically, I mean I know nothing is > uncrackable and popular softwares are not well protected. But my > software is not that type and I don't want this specific software > popular. > It is some kind of in house tool and I wan

Re: python "sounds-like" module

2007-12-12 Thread Wildemar Wildenburger
Astan Chee wrote: > Anyway, Im trying to find a python module (im not sure if it exists) > that takes two words and compares if they sound the same. So 'right' and > 'write' sounds the same or 'u' and 'you' . Also I know this takes into > account the use of language and accent but is there any o

Re: how to maximize a Tkinter Window in python TK???

2007-12-12 Thread kyosohma
On Dec 12, 5:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hello @ all, > > subj? Here's a way to do it in Windows that I found with a quick Google search: http://mail.python.org/pipermail/python-list/2003-May/203675.html You might also cross-post to the Tkinter user group: http://mai

Re: python "sounds-like" module

2007-12-12 Thread kyosohma
On Dec 12, 6:39 pm, Astan Chee <[EMAIL PROTECTED]> wrote: > Hi, > Thanks for all the help from the previous problem. Turns out I didnt > have to use wxSizers, just change the size of my wxWidgets everytime a > EVT_SIZE is called. > Anyway, Im trying to find a python module (im not sure if it exists

Re: python "sounds-like" module

2007-12-12 Thread kyosohma
On Dec 12, 6:39 pm, Astan Chee <[EMAIL PROTECTED]> wrote: > Hi, > Thanks for all the help from the previous problem. Turns out I didnt > have to use wxSizers, just change the size of my wxWidgets everytime a > EVT_SIZE is called. > Anyway, Im trying to find a python module (im not sure if it exists

Re: Help needed with python unicode cgi-bin script

2007-12-12 Thread Martin v. Löwis
> It looks like your suggestions to change charset were incorrect. My example > works equally well with charset=utf8 as it does with charset=windows-1252. It rather looks like that you didn't follow the suggestions carefully. In my very first message, I wrote # Sending "Content-type: text/html"

Re: efficient data loading with Python, is that possible possible?

2007-12-12 Thread igor . tatarinov
On Dec 12, 4:03 pm, John Machin <[EMAIL PROTECTED]> wrote: > Inside your function > [you are doing all this inside a function, not at global level in a > script, aren't you?], do this: > from time import mktime, strptime # do this ONCE > ... > blahblah = int(mktime(strptime(s, "%m%d%y%H

Re:

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 21:39:21 +0100, James Matthews wrote: > Can you please explain better? Please don't top post, it hurts readability a lot. Katie, if you're still reading this, see below for my answer. > On Dec 12, 2007 2:19 AM, katie smith <[EMAIL PROTECTED]> wrote: >> >> I tried googling

Re: Improvements to the Python core (was: Is a "real" C-Python possible?)

2007-12-12 Thread Paul Boddie
On 12 Des, 18:58, Christian Heimes <[EMAIL PROTECTED]> wrote: > > I don't see an indication that anybody but the creator of Psyco does > understand the code base. *g* Then you haven't been reading the right IRC channel recently. ;-) > Guido has stated his opinion about optimizations more than onc

python "sounds-like" module

2007-12-12 Thread Astan Chee
Hi, Thanks for all the help from the previous problem. Turns out I didnt have to use wxSizers, just change the size of my wxWidgets everytime a EVT_SIZE is called. Anyway, Im trying to find a python module (im not sure if it exists) that takes two words and compares if they sound the same. So 'r

Re: Stringified list back to list of ints

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 10:38:56 -0500, Calvin Spealman wrote: > I still hold my vote that if you need to reverse the "stringification" > of a list, you shouldn't have stringified the list and lost hold of the > original list in the first place. That is the solution above all others. Naturally, but i

Re: Finding Line numbers of HTML file

2007-12-12 Thread Paul McGuire
On Dec 12, 3:56 pm, Ramdas <[EMAIL PROTECTED]> wrote: > I am doing some HTML scrapping for a side project. > > I need a method using sgmllib or HTMLParser to parse an HTML file and > get line nos of all the tags > Homework, perhaps? Well, I don't think your instructor will give many points for a p

Re: TCP reset caused by socket.py

2007-12-12 Thread Bjoern Schliessmann
Object01 wrote: > Is there something I can look for in the packet traffic that would > indicate one party is misbehaving? The sequence numbers seem ok. > *shrug* I'd expect to see data sent from server to client and > then see a sequence of packets that close the connection > gracefully. Instead

Re: problem parsing lines in a file

2007-12-12 Thread barronmo
Thanks everyone. I learned several things on this one. I ended up using the .replace() method and got the results I wanted. Thanks again, Michael Barron -- http://mail.python.org/mailman/listinfo/python-list

Re: "do" as a keyword

2007-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2007 09:46:09 -0600, Chris Mellon wrote: > On Dec 11, 2007 2:19 PM, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> On Tue, 11 Dec 2007 15:06:31 +, Neil Cerutti wrote: >> >> > When I use languages that supply do-while or do-until looping >> > constructs I rarely need them. >> ..

Re: Text widget updates only after calling method exits (threading issue?)

2007-12-12 Thread mariox19
*** SOLVED *** Thanks, Eric. I've had luck with code along these lines: # 1. Assume Text widget as instance variable: textView # 2. Assume button with method, 'start', bound to it def start(self, event=None): """ Starts the demo. """ # Print A-Z to wid

Re: efficient data loading with Python, is that possible possible?

2007-12-12 Thread John Machin
On Dec 13, 9:48 am, [EMAIL PROTECTED] wrote: > Hi, I am pretty new to Python and trying to use it for a relatively > simple problem of loading a 5 million line text file and converting it > into a few binary files. The text file has a fixed format (like a > punchcard). The columns contain integer,

Re: sqlite weirdness

2007-12-12 Thread kyosohma
On Dec 12, 2:53 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Dec 13, 7:22 am, [EMAIL PROTECTED] wrote: > > > > > Hi, > > > I am trying to use sqlite to create a local database for an > > application I am writing and I am getting some screwy results from it. > > Basically, I have a set of values

Re: A way of checking if a string contains a number

2007-12-12 Thread Bruno Desthuilliers
Larry Bates a écrit : > IMHO > regular expressions are overkill for the task you describe. There are cases where regexps are the right tool, and according to the exemple given, this may be one (now it's of course hard to tell without seeing a decent sample of real data...). -- http://mail.py

Re: efficient data loading with Python, is that possible possible?

2007-12-12 Thread George Sakkis
On Dec 12, 5:48 pm, [EMAIL PROTECTED] wrote: > Hi, I am pretty new to Python and trying to use it for a relatively > simple problem of loading a 5 million line text file and converting it > into a few binary files. The text file has a fixed format (like a > punchcard). The columns contain integer,

FREE GUARANTEED CREDIT CARD

2007-12-12 Thread jeff jenneman
DO YOU STILL OFFER THE GUARANTEED APPROVAL 4,650 VISA, MATERCARD AND LINE OF CEDIT. THANK YOU JEFF JENNEMAN [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: TCP reset caused by socket.py

2007-12-12 Thread Object01
> Is this applicable in your > case?:http://brad.livejournal.com/2152593.html?thread=10832273#t10832273 > (closing a nonblocking socket with a nonempty output queue generates a RST) Based on my stepping through the code, everything passed to _fileobject.write() makes it out onto the wire just fin

how to maximize a Tkinter Window in python TK???

2007-12-12 Thread [EMAIL PROTECTED]
hello @ all, subj? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get milliseconds when substructing datetime objects?

2007-12-12 Thread Gabriel Genellina
En Wed, 12 Dec 2007 11:40:24 -0300, Dmitri O.Kondratiev <[EMAIL PROTECTED]> escribió: > Please help to find simple solutiion for measuring times of operations > with > millisecond precision. > For this I am trying to use datetime() objects: > > import time > import datetime > > def dreamTime(s

format for storing textual data (for an edition) - formatting and additional info

2007-12-12 Thread Vlastimil Brom
Hi all, Firstly, I do apologize about this quite a long post without a concrete programming question - I'd like to ask about the availability of some tools or methods/concepts in python environment I am probably missing, hence I thought, I should describe my task in some detail as well as the ways

Re: A way of checking if a string contains a number

2007-12-12 Thread Hamish
Thanks worked Perfectly On Dec 13, 9:32 am, [EMAIL PROTECTED] wrote: > On Dec 12, 3:10 pm, Hamish <[EMAIL PROTECTED]> wrote: > > > > > > > Hey > > > I'm new to python, but I have used a fair bit of C and Perl > > > I found Perls regex's to be very easy to use however I don't find > > Pythons re

Re: A way of checking if a string contains a number

2007-12-12 Thread Zero Piraeus
: > [...] IMHO regular > expressions are overkill for the task you describe. You may be better served > to > just try to convert it to whatever number you want. > > try: > value=int(string1) Fails for the OP's example: >>> string1 = "ABC 11" >>> int(string1) Traceback (most recent c

Re: Pascal code checker!

2007-12-12 Thread Tim Chase
>> Oof! Fond as I am of promoting pyparsing, writing a Pascal >> compiler (or even just syntax checker) is not a job I would >> tackle lightly, much less suggest to a new Python developer. True enough...thus my weeks/months/years estimate for such an undertaking :) But if not mentioned, you

efficient data loading with Python, is that possible possible?

2007-12-12 Thread igor . tatarinov
Hi, I am pretty new to Python and trying to use it for a relatively simple problem of loading a 5 million line text file and converting it into a few binary files. The text file has a fixed format (like a punchcard). The columns contain integer, real, and date values. The output files are the same

Re: A way of checking if a string contains a number

2007-12-12 Thread Larry Bates
Hamish wrote: > Hey > > I'm new to python, but I have used a fair bit of C and Perl > > I found Perls regex's to be very easy to use however I don't find > Pythons regexes as good. > > All I am trying to do is detect if there is a number in a string. > > I am reading the string from an excel sp

Re: Finding Line numbers of HTML file

2007-12-12 Thread Larry Bates
Ramdas wrote: > I am doing some HTML scrapping for a side project. > > I need a method using sgmllib or HTMLParser to parse an HTML file and > get line nos of all the tags > > I tried a few things, but I am just not able to work with either if > the parsers. > > > > Can someone help > HTML d

Re: A way of checking if a string contains a number

2007-12-12 Thread jason . s . trowbridge
On Dec 12, 3:10 pm, Hamish <[EMAIL PROTECTED]> wrote: > Hey > > I'm new to python, but I have used a fair bit of C and Perl > > I found Perls regex's to be very easy to use however I don't find > Pythons regexes as good. > > All I am trying to do is detect if there is a number in a string. > > I am

Re: Newbie NameError problem

2007-12-12 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Thanks to all! > > I will put my class defs first (tho not without expressing my > disappointment that this is required in a late 20th century language); That's because you dont get the "execution model" of Python. First point, remember that Python in Python everyth

A way of checking if a string contains a number

2007-12-12 Thread Hamish
Hey I'm new to python, but I have used a fair bit of C and Perl I found Perls regex's to be very easy to use however I don't find Pythons regexes as good. All I am trying to do is detect if there is a number in a string. I am reading the string from an excel spread sheet using the xlrd module

Re: Tuples !?!?

2007-12-12 Thread aaragao
Ok people. No more discussions about this. I tought the conversion occurs automatic but it is not case. I'm a newbie on python. Thanks to everybody. ;-) On 12 Dez, 19:43, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Bjoern Schliessmann a écrit : > > > > > Bruno Desthuilliers wrote: > > >>[EMAI

Re: Pascal code checker!

2007-12-12 Thread Paul McGuire
On Dec 12, 3:03 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > OTOH, you could actually parse the pascal file(s). This gives > you infinte flexibility to do whatever you want with the > parse-tree. Things get hairy when you have included ("uses") > files, and you also have to write up a grammar for P

Finding Line numbers of HTML file

2007-12-12 Thread Ramdas
I am doing some HTML scrapping for a side project. I need a method using sgmllib or HTMLParser to parse an HTML file and get line nos of all the tags I tried a few things, but I am just not able to work with either if the parsers. Can someone help -- http://mail.python.org/mailman/listinfo/p

Windows XP unicode and escape sequences

2007-12-12 Thread jyoung79
I mainly work on OS X, but thought I'd experiment with some Python code on XP. The problem is I can't seem to get these things to work at all. First of all, I'd like to use Greek letters in the command prompt window, so I was going to use unicode to do this. But in the command prompt, the uni

Re: Is a "real" C-Python possible?

2007-12-12 Thread Kay Schluehr
On Dec 12, 8:23 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Dec 12, 2007 12:53 PM, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Dec 12, 1:12 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > > > > Kay Schluehr wrote: > > > > class A(object): > > > > foo = property: > > > >

Re: After running for four days, Python program stalled

2007-12-12 Thread Neil Hodgson
John Nagle: > Had a Python program stall, using no time, after running OK for four days. > Python 2.4, Windows. Here's the location in Python where it's stalled. > Any idea what it's waiting for? > 77FA144B int 3# STALLED HERE Its a breakpoint instru

Re: Newbie NameError problem

2007-12-12 Thread Carsten Haese
On Wed, 2007-12-12 at 12:48 -0800, [EMAIL PROTECTED] wrote: > Thanks to all! > > I will put my class defs first (tho not without expressing my > disappointment that this is required in a late 20th century language); You don't have to physically *put* class definitions first in your code. What mat

Re: Pascal code checker!

2007-12-12 Thread Grant Edwards
On 2007-12-12, SMALLp <[EMAIL PROTECTED]> wrote: > Hy! I desperately need help! > > I need to make application that would accept Pascal code and check if it > returns good results. That application is called a Pascal compiler. > My idea is (from a beginner point of view) to make application in

Re: Improvements to the Python core

2007-12-12 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul Rudin <[EMAIL PROTECTED]> wrote: >Christian Heimes <[EMAIL PROTECTED]> writes: >> >> We are happy and glad for every improvement regarding speed, memory >> usage or features if and only if: ... >> >> ... platform independent / supported on all platforms. Python

Re: Pascal code checker!

2007-12-12 Thread Tim Chase
> I need to make application that would accept Pascal code and check if it > returns good results. well, it depends on how much work you want your program to do. My understanding is that most compilers will return a non-zero error code when there's some sort of problem. Thus, you could just s

Re: Is a "real" C-Python possible?

2007-12-12 Thread George Sakkis
On Dec 12, 2:23 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Dec 12, 2007 12:53 PM, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Dec 12, 1:12 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > > > > Kay Schluehr wrote: > > > > class A(object): > > > > foo = property: > > > >

Re: sqlite weirdness

2007-12-12 Thread John Machin
On Dec 13, 7:22 am, [EMAIL PROTECTED] wrote: > Hi, > > I am trying to use sqlite to create a local database for an > application I am writing and I am getting some screwy results from it. > Basically, I have a set of values in the database and I am trying to > select a date range and sum those valu

Re: sqlite weirdness

2007-12-12 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > So the data us there, but the sql only works part of the time. My SQL > works if my database is in SQL Server, but not sqlite. Is my SQL > malformed? Is it something about dates in sqlite? Or is it something > else? Your dateworked field seems to have strings rather tha

Re:

2007-12-12 Thread Dan Upton
On Dec 11, 2007 8:19 PM, katie smith <[EMAIL PROTECTED]> wrote: > > I tried googling and yahooing to find the answer and there was to many > conflicting results so i just decided to ask to simple question here. > > How do i could the number of letters in a string no a single letter all of > them. >

Re: Newbie NameError problem

2007-12-12 Thread MartinRinehart
Thanks to all! I will put my class defs first (tho not without expressing my disappointment that this is required in a late 20th century language); learn about enumerate as it looks like exactly what I need and discard my C++/Java based object model because this is a totally other thing. If someo

Re: TCP reset caused by socket.py

2007-12-12 Thread Gabriel Genellina
En Wed, 12 Dec 2007 13:38:21 -0300, Object01 <[EMAIL PROTECTED]> escribió: > On Dec 11, 6:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Tue, 11 Dec 2007 10:51:13 -0300, Object01 <[EMAIL PROTECTED]> >> escribi�: >> >> > I've been working with the source code for Trac (http:// >> >

Re: Pascal code checker!

2007-12-12 Thread Zentrader
You can use subprocess to run the pascal program and capture the output/results. See here http://blog.doughellmann.com/2007/07/pymotw-subprocess.html -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite weirdness

2007-12-12 Thread Vladimir Rusinov
On 12/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > "SELECT SUM(reg), SUM(ot), SUM(ce), SUM(hol), SUM(sklv), SUM(vac), > SUM(ct), SUM(conv), SUM(misc) FROM tbl_TimeEntries WHERE dateworked >= > '12/31/2006' AND dateworked <= '01/13/2007' AND empid = 281" The first and third return the

Re: Best way to protect my new commercial software.

2007-12-12 Thread James Matthews
You can make it hard and annoying etc.. to crack! but you will never stop people from cracking it! On Dec 10, 2007 8:15 AM, farsheed <[EMAIL PROTECTED]> wrote: > I wrote a software and I want to protect it so can not be cracked > easily. I wrote it in python and compile it using py2exe. what is t

Pascal code checker!

2007-12-12 Thread SMALLp
Hy! I desperately need help! I need to make application that would accept Pascal code and check if it returns good results. My idea is (from a beginner point of view) to make application in python that would send code (text) to pascal compiler (Free pascal compiler that can be used from comman

Re: newbie

2007-12-12 Thread James Matthews
I really like this book! On Dec 11, 2007 3:11 AM, Joe Riopel <[EMAIL PROTECTED]> wrote: > On Dec 10, 2007 9:03 PM, Whizzer <[EMAIL PROTECTED]> wrote: > > Is OReilly's Learning Python a good place to start learning to program? > > I've been told Python is a good first language. > > I think this is

Re:

2007-12-12 Thread James Matthews
Can you please explain better? On Dec 12, 2007 2:19 AM, katie smith <[EMAIL PROTECTED]> wrote: > > I tried googling and yahooing to find the answer and there was to many > conflicting results so i just decided to ask to simple question here. > > How do i could the number of letters in a string no

Re:

2007-12-12 Thread James Matthews
you can also use a for loop =) list = [1,2,3,4,5,6,7] str = ' ' for i in list: str+=i print str On Dec 12, 2007 2:25 PM, Lee Capps <[EMAIL PROTECTED]> wrote: > > On Dec 11, 2007, at 5:14 PM, katie smith wrote: > > > "[16, 16, 2, 16, 2, 16, 8, 16]" > > Regular expressions might be a good way

Re: Is anyone happy with csv module?

2007-12-12 Thread John Machin
On Dec 13, 12:58 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-12-12, John Machin <[EMAIL PROTECTED]> wrote: > > >> It's clear that I am thinking to completely different usages > >> for CSV than what most people in this thread. I use csv to > >> export and import numerical data columns to a

Re: After running for four days, Python program stalled

2007-12-12 Thread James Matthews
INT 3 is a debug interrupt:-) On Dec 12, 2007 8:41 PM, Chris Mellon <[EMAIL PROTECTED]> wrote: > On Dec 12, 2007 1:34 PM, John Nagle <[EMAIL PROTECTED]> wrote: > > Had a Python program stall, using no time, after running OK for four > days. > > Python 2.4, Windows. Here's the location in Python

sqlite weirdness

2007-12-12 Thread kyosohma
Hi, I am trying to use sqlite to create a local database for an application I am writing and I am getting some screwy results from it. Basically, I have a set of values in the database and I am trying to select a date range and sum those values. My problem is that it only sums up every other date

Re: TCP reset caused by socket.py

2007-12-12 Thread Gabriel Genellina
En Wed, 12 Dec 2007 15:46:14 -0300, Bjoern Schliessmann <[EMAIL PROTECTED]> escribió: > Gabriel Genellina wrote: >> A RST when you close a socket is OK. > Says who? MS? ;) Nevermind... just nonsense! -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Newbie ? file structures in Dict, List, Tuples etc How

2007-12-12 Thread len
Hello Python Group I am new to python and I am trying to write a file conversion program using Python Ver 2.5 on XP. Following are the specifications of this program; I need to convert an auto policy file which is in MySQL and consists of the following tables Policy - Policy_Sid pDriver - Dr

Re: Is anyone happy with csv module?

2007-12-12 Thread J. Clifford Dyer
On Wed, Dec 12, 2007 at 11:02:04AM -0600, [EMAIL PROTECTED] wrote regarding Re: Is anyone happy with csv module?: > > J. Clifford Dyer <[EMAIL PROTECTED]> wrote: > > But the software you are dealing with probably doesn't actually > > need spreadsheets. It just needs digital ledgers. > > I saw

Re: Stringified list back to list of ints

2007-12-12 Thread bearophileHUGS
Another solution, possibly safer: >>> from cStringIO import StringIO >>> import csv >>> s = "[16, 16, 2, 16, 2, 16, 8, 16]" >>> sf = StringIO(s.strip()[1:-1]) >>> list(csv.reader(sf)) [['16', ' 16', ' 2', ' 16', ' 2', ' 16', ' 8', ' 16']] Bye, bearophile -- http://mail.python.org/mailman/listinf

Re: Tuples !?!?

2007-12-12 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : > Bruno Desthuilliers wrote: > >>[EMAIL PROTECTED] a écrit : > > >>>The problem is '2' != 2 >> >>It would indeed be a problem if this expression eval'd to True. >>That's the case in some, hem, 'languages', and believe me it's >>*not* the RightThing. > > > What kin

  1   2   >