Re: yet another indentation proposal

2007-08-20 Thread Michael Tobis
On Aug 19, 11:51 pm, James Stroud <[EMAIL PROTECTED]> wrote: > What's wrong with just saying the current indent level? I'd much rather > hear "indent 4" than "tab tab tab tab". Alternatively, you might also consider writing a simple pre and postprocessor so that you could read and write python th

Call for advice on how to start PyOpenGL!

2007-08-20 Thread math2life
I work with python for two years, are familiar with image processing, but beginner on PyOpenGL and OpenGL. Any advice appreciated! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python question (PyNoob)

2007-08-20 Thread Carl Banks
On Aug 19, 8:33 pm, Anonymous <[EMAIL PROTECTED]> wrote: > I have exp with C/C++ (and a few other langs). I want to use Python to > start doing the ff: > > 1). Data Munging (text processing) - instead of Perl > 2). Automating my build process > 3). (Possibly) some web data retrieval jobs > > Can an

Re: Python question (PyNoob)

2007-08-20 Thread Carl Banks
On Aug 19, 10:18 pm, Benjamin <[EMAIL PROTECTED]> wrote: > On Aug 19, 7:33 pm, Anonymous <[EMAIL PROTECTED]> wrote: > > > I have exp with C/C++ (and a few other langs). I want to use Python to > > start doing the ff: > > > 1). Data Munging (text processing) - instead of Perl > > 2). Automating my b

Re: yet another indentation proposal

2007-08-20 Thread Jakub Stolarski
Why not just use comments and some filter. Just write # _{ at the beginning and # _} at the end. Then filter just before runing indenting with those control sequences? Then there's no need to change interpreter. -- http://mail.python.org/mailman/listinfo/python-list

Re: best GUI library for vector drawing program

2007-08-20 Thread vijay . kumar . 75in
Hi All, Today I have downloaded a SWT Software which is great to its features. You can learn many GUI details out of it. The basic functionality is it lists IP Addresses of the remote PC's your system is accessing. You may find the project under sourceforge.net http://sourceforge.net/projects/ne

Re: best GUI library for vector drawing program

2007-08-20 Thread [EMAIL PROTECTED]
Hi All, Today I have downloaded a SWT Software which is great to its features. You can learn many GUI details out of it. The basic functionality is it lists IP Addresses of the remote PC's your system is accessing. You may find the project under sourceforge.net http://sourceforge.net/projects/ne

Newbie question about a web server

2007-08-20 Thread Frank Millman
Hi all I have just started to dabble in writing my own web server. I googled for 'python web server', and this is the first hit - http://fragments.turtlemeat.com/pythonwebserver.php It has the source code for a simple web server, based on HTTPServer and BaseHTTPRequestHandler. It demonstra

Re: best GUI library for vector drawing program

2007-08-20 Thread Mats
If you want to stay within Tcl/Tk you could take a look at my tkpath package: http://tclbitprint.sf.net/ and shots: http://tclbitprint.sourceforge.net/tkpath/quartz/index.html http://tclbitprint.sourceforge.net/tkpath/gdiplus/index.html http://tclbitprint.sourceforge.net/tkpath/cairo/index.html Ma

Re: Python question (PyNoob)

2007-08-20 Thread Ant
On Aug 20, 1:33 am, Anonymous <[EMAIL PROTECTED]> wrote: ... > 1). Data Munging (text processing) - instead of Perl Check out the re module (regexes) in the standard library, and the pyparsing third party library: http://pyparsing.wikispaces.com/ for more complex stuff. > 2). Automating my build

Re: Python and Tkinter Programming--Expensive!

2007-08-20 Thread peter
On 17 Aug, 18:59, "W. Watson" <[EMAIL PROTECTED]> wrote: > Why is the book in Subject (author is Grayson) so expensive? $100 on Amazon > and $195 on ABE. Aren't there alternatives? > -- > Wayne Watson (Nevada City, CA) > > Web Page: I got hold of

Where we need to use Python ?

2007-08-20 Thread gperumal
Hi Iam new to Python I know Perl, JScript,C,C++,Java But i want to know where excatly this python come in to picture And Is it a interpreted language or a programming language It comes in which category I very keen to know this please tell Regards Ganesh P -- http://mail.python.org/mailman/li

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-20 Thread Ingo Menger
On 20 Aug., 01:56, Xah Lee <[EMAIL PROTECTED]> wrote: > (for you math illiterates out there: ... > (for you mathematicians out there: ... Please, Xah Lee, could you possibly stop to "explain" things that are absolutely trivial? If somebody has doubts about the etymology of a word, he may use the

Re: Retry: Question about FutureWarning

2007-08-20 Thread Gabriel Genellina
En Tue, 14 Aug 2007 22:44:17 -0300, Steven W. Orr <[EMAIL PROTECTED]> escribi�: > The shell compile command I use to generate both the .pyc and the .pyo > files is: > > python=/usr/bin/python2.3 > i_python () > { > $python -c "import $1" > $python -O -c "import $1" > } This is irrel

Re: Problem with Thread.join()

2007-08-20 Thread Gabriel Genellina
En Mon, 13 Aug 2007 20:10:53 -0300, Robert Dailey <[EMAIL PROTECTED]> escribi�: > I have a class that derives from threading.Thread. To signal the thread > to > exit its infinite loop, I set an Event. Once the thread checks > Event.isSet() > and it is true, it proceeds to break out of the lo

Re: passing arguments with ampersands

2007-08-20 Thread Gabriel Genellina
En Sat, 18 Aug 2007 09:24:35 -0300, SHY <[EMAIL PROTECTED]> escribi�: > theres no special portion of code, just the one that handles filenames > with > spaces. > the problem is that when i associate a file extension to my application > and > i open it, the filename is not quoted before passed

Re: Importing DLLs

2007-08-20 Thread Gabriel Genellina
En Wed, 15 Aug 2007 14:20:26 -0300, Corbitt, Kyle <[EMAIL PROTECTED]> escribi�: > I'm running Linux with Python 2.3. I have a C shared object file (*.so) > and I need to be able to call its functions from within Python. I have > found a couple of Python modules that allow me to do this (dl

Re: swapping

2007-08-20 Thread Gabriel Genellina
En Sat, 18 Aug 2007 02:58:23 -0300, Beema shafreen <[EMAIL PROTECTED]> escribi�: > result: > klp5bub1 > > apn1apn2 > > but i have do the same for the revere ,to check the result like this for > eg: > apn2apn1 > what is the concept to do this I don't understand exactly what you want

Re: imaplib & Received: header(s)???

2007-08-20 Thread Petri Savolainen
Donn Cave wrote: > | I need to get at the Received-for header to figure out at which address > | we received an email. We subscribe to a number of mailing lists using > | per-mailing-list addresses, and often, To: field contains something else > | than our address, thus the need for Received-fo

Re: popen4 not returning output

2007-08-20 Thread Michael Bentley
On Aug 19, 2007, at 8:58 PM, [EMAIL PROTECTED] wrote: > I am trying to run the following script: > > > #!/usr/bin/python > > import popen2 > > commandToRun = """scp scp_trial.py [EMAIL PROTECTED]:/targetDirectory""" > #commandToRun = "ls" > print commandToRun > p_out, p_in = popen2.popen4 (comman

How to decompress .Z file?

2007-08-20 Thread Hyunchul Kim
Hi, all How can .Z file be decompressed? According to python library reference, .Z file might not be supported by python, yet. Best, Hyunchul Kim -- http://mail.python.org/mailman/listinfo/python-list

Re: Call for advice on how to start PyOpenGL!

2007-08-20 Thread Diez B. Roggisch
math2life wrote: > I work with python for two years, are familiar with image processing, > but beginner on PyOpenGL and OpenGL. > > Any advice appreciated! You should check out the pyweek (http://www.pyweek.org/). There you find pygame & OpenGL-based games, of a comprehensible size. Diez -- ht

building exe from script

2007-08-20 Thread vedrandekovic
Hello, Is there any solution for building exe file from python script something like bbfreeze.When user write some script in my program, it must compile script into exe without opening console ( cmd ).I'am working on Windows XP SP2 and Python 2.5. Regards, Vedran -- http://mail.python.org/ma

Re: Where we need to use Python ?

2007-08-20 Thread Olexandr Melnyk
2007/8/20, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Hi > > Iam new to Python > I know Perl, JScript,C,C++,Java > But i want to know where excatly this python come in to picture > > And Is it a interpreted language or a programming language > It comes in which category > > I very keen to know this

Re: How to decompress .Z file?

2007-08-20 Thread [EMAIL PROTECTED]
On Aug 20, 9:02 am, Hyunchul Kim <[EMAIL PROTECTED]> wrote: > How can .Z file be decompressed? > > According to python library reference, .Z file might not be supported by > python, yet. Guess you can *outsource* the process to 7zip: http://7-zip.org/download.html It supports .z archives. Lore

Re: Call for advice on how to start PyOpenGL!

2007-08-20 Thread Richard Jones
Diez B. Roggisch wrote: > math2life wrote: > >> I work with python for two years, are familiar with image processing, >> but beginner on PyOpenGL and OpenGL. >> >> Any advice appreciated! > > You should check out the pyweek (http://www.pyweek.org/). There you find > pygame & OpenGL-based games,

Re: building exe from script

2007-08-20 Thread Furkan KURU
you can embed py2exe in your program. On 8/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > Is there any solution for building exe file from python script > something like bbfreeze.When user write some script in > my program, it must compile script into exe without opening console

Re: best GUI library for vector drawing program

2007-08-20 Thread pachiburke
On Aug 17, 3:27 pm, chewie54 <[EMAIL PROTECTED]> wrote: > What would be the best cross-platform GUI library to use for a vector > based CAD program ( something like Visio on Windows ) WxWidgets, > Tk, PyQt, Java Swing, Java SWT, I need the capibility to > draw and edit in a window that

Re: Sorting a list of Unicode strings?

2007-08-20 Thread Tommy Nordgren
On 19 aug 2007, at 18.50, [EMAIL PROTECTED] wrote: > Hey Guys, > > Maybe I'm missing something fundamental here, but if I have a list of > Unicode strings, and I want to sort these alphabetically, then it > places those that begin with unicode characters at the bottom. Is > there a way to avoid t

Re: Sorting a list of Unicode strings?

2007-08-20 Thread [EMAIL PROTECTED]
Thank you all for your very quick and informative replies. I was basing this assumption that Å was classed as a standard 'A' from a list of countries I was looking at (Wikipedia sorts it like this, too - though this isn't what I was using http://en.wikipedia.org/wiki/List_of_countries#A) I will l

Re: best GUI library for vector drawing program

2007-08-20 Thread Roedy Green
>What would be the best cross-platform GUI library to use for a vector >based CAD program ( something like Visio on Windows ) I don't know about he best, but I have collected a list of them at http://mindprod.com/jgloss/graph.html -- Roedy Green Canadian Mind Products The Java Glossary http://min

Re: building exe from script

2007-08-20 Thread nih
A bit more information is clearly needed... 1. Create a file called py2exeSetup.py with the following contents: from distutils.core import setup import py2exe def compile(appName, console=False): OPTIONS = {"py2exe": {"compressed": 1, "optimize": 0, "bundle_files": 1, } } ZIPFILE = None

Re: ctypes and unsigned char*

2007-08-20 Thread [EMAIL PROTECTED]
On 19 Aug., 20:40, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > In the first case, use a plain c_char_p - the individual "chars" are > already unsigned in Python (that is, ord(xxx[i]) is always positive) > In the second case, first define the pointer type: > > c_ubyte_p = POINTER(c_ubyte) > your_

Re: Where we need to use Python ?

2007-08-20 Thread Dustan
On Aug 20, 3:02 am, [EMAIL PROTECTED] wrote: > Hi > > Iam new to Python > I know Perl, JScript,C,C++,Java > But i want to know where excatly this python come in to picture > > And Is it a interpreted language or a programming language > It comes in which category > > I very keen to know this please

Re: best GUI library for vector drawing program

2007-08-20 Thread Thomas Kellerer
Roedy Green wrote: >> What would be the best cross-platform GUI library to use for a vector >> based CAD program ( something like Visio on Windows ) > I don't know about he best, but I have collected a list of them at > http://mindprod.com/jgloss/graph.html Roedy, you might want to add NetBeans'

datetime in microseconds

2007-08-20 Thread mroeloffs
Hi I have a time in microseconds, for example 0x8C905CBA7F84AF4. I want this to a normal view in hh:mm:ss DD:MM:. I tried with datetime, but it only takes a max of 100 microseconds is there another solution? -- http://mail.python.org/mailman/listinfo/python-list

Re: Latest models of Gibson guitars

2007-08-20 Thread Lew
Twisted wrote: > On Aug 19, 2:41 pm, [EMAIL PROTECTED] wrote: >> This is a newsgroup of programming language Python, stop with this! > > Python?! Python is as off-topic here as guitars, unlike, say, Java... When referring to "this" newsgroup or "here", one must remember that this is a cross-pos

Re: LRU cache?

2007-08-20 Thread qyloxe
#simple, but effective (sometimes) class ICORCache: def __init__(self,agetfunc,amaxlen=100): self.GetValue=agetfunc self.MaxLen=amaxlen self.VDict={} self.KDict={} self.VPos=1 self.AccessRatio=0 self.HitRatio=0 def __getitem__(self,key): self.A

Shed Skin Python-to-C++ compiler 0.0.23

2007-08-20 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.0.23. It doesn't contain the type inference scalability improvements I was working on, but it does have quite a few bug fixes and minor feature additions. Here's a list of changes: -support for __iadd__, __imul__ and such (except __ipow__ and __imod__) -so

Re: desperately in need of a tool

2007-08-20 Thread A.T.Hofkamp
On 2007-08-19, yagyala <[EMAIL PROTECTED]> wrote: > Hi. > > one of those standards is that the comments for each routine must > indicate every other routine that it calls. As I try to keep my > to do this by hand. Does anyone know of a tool that could do this for > me, or at least a tool that can

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-20 Thread Carsten Haese
On Mon, 2007-08-20 at 01:23 -0700, Ingo Menger wrote: > On 20 Aug., 01:56, Xah Lee <[EMAIL PROTECTED]> wrote: > > > (for you math illiterates out there: ... > > (for you mathematicians out there: ... > > Please, Xah Lee, could you possibly stop to "explain" things that are > absolutely trivial? I

Re: datetime in microseconds

2007-08-20 Thread kyosohma
On Aug 20, 6:52 am, [EMAIL PROTECTED] wrote: > Hi I have a time in microseconds, for example 0x8C905CBA7F84AF4. I > want this to a normal view in hh:mm:ss DD:MM:. I tried with > datetime, but it only takes a max of 100 microseconds is there > another solution? Just truncate the value so th

Server-side scripting in python

2007-08-20 Thread Nagarajan
Hi group, I need to develop a web application. I am in a fix as to choose among the various server-side scripting options. I want to explore python (am a newbie) to gain expertise and upon search, I learnt about PSP(Python Server Pages) that uses Jython as its scripting language. Is it a better opt

Re: Public Telnet Server?

2007-08-20 Thread Dave
On Aug 12, 2:03 pm, Jorgen Grahn <[EMAIL PROTECTED]> wrote: > On Sat, 11 Aug 2007 15:07:25 -, Dave <[EMAIL PROTECTED]> wrote: > > Hi there. I'm a beginner at Python and I'm writing my first Python > > script. It's a text adventure about coffee and mixing drinks and being > > crazy and such. I k

Re: datetime in microseconds

2007-08-20 Thread John Machin
On Aug 20, 9:52 pm, [EMAIL PROTECTED] wrote: > Hi I have a time in microseconds, for example 0x8C905CBA7F84AF4. I > want this to a normal view in hh:mm:ss DD:MM:. I tried with > datetime, but it only takes a max of 100 microseconds is there > another solution? Your question can be interpre

Re: Where we need to use Python ?

2007-08-20 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | And Is it a interpreted language or a programming language | It comes in which category Python is an algorithm programming language. The CPython implementation of the langauge compiles Python to proprietary byte code and then interp

Handwriting Recognition

2007-08-20 Thread Ian Dickinson
Hi My name is Ian Dickinson and I am a professional software developer working in the UK and reasonably familiar with Python. However a friend of mine who is a special educational needs teacher was asking me if I could write some handwriting recognition software for her, which would allow here

Re: How do I call anonymous classes from imported modules?

2007-08-20 Thread JoeSox
On 8/19/07, James Stroud <[EMAIL PROTECTED]> wrote: > This was the poor design I was hinting to. do_foobar is type-checking > for ticker. "Casting" as you might think of it does not exist in python. > Creating new objects based on the values of existing objects (lets call > it "conversion" for lack

Re: yet another indentation proposal

2007-08-20 Thread Aaron
"Michael Tobis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Alternatively, you might also consider writing a simple pre and > postprocessor so that you could read and write python the way you > would prefer > > In that you could cope with the existing code base and the existing

Python-URL! - weekly Python news and links (Aug 20)

2007-08-20 Thread Gabriel Genellina
QOTW: "So I never let the age of the universe intimidate me." - mensanator, on (roughly) the occurrence of large integral exponents in combinatorics and more "You're coming from a Perl background, right? No one else would think of using a regexp for such a simple thing." - Sion Arrowsmith

regular expression dictionary search

2007-08-20 Thread dorje tarap
Hi I have a dictionary with a list of patterns: Code: ( text ) 1. >>> words = {'sho.':6, '.ilk':8,'.an.':78 } Where the "." character means any pattern - this can easily be changed to the "*" symbol if need be. When the user submits a word, I want to be able to look for a corresponding pat

Python equivalent of Perl's $/

2007-08-20 Thread John K Masters
I am currently working my way through Jeffrey Friedl's book Mastering Regular Expressions. Great book apart from the fact it uses Perl for the examples. One particular expression that interests me is '$/ = ".\n"' which, rather than splitting a file into lines, splits on a period-newline boundary.

Re: Where we need to use Python ?

2007-08-20 Thread Michael Bentley
On Aug 20, 2007, at 1:02 AM, [EMAIL PROTECTED] wrote: > And Is it a interpreted language or a programming language > It comes in which category > > I very keen to know this please tell [ open on suburban kitchen, Wife and Husband arguing ] Wife: New Shimmer is a floor wax! Husband: No, new Shi

Mouse control with ctypes in OS X

2007-08-20 Thread Niklas Ottosson
Hi all I need to get hold of the mouse position and also need to be able to change it. In windows I have used ctypes.windll.user32.getCursorPos() and ctypes.windll.user32.setCursorPos() with great success in my program but now I also need to make a Mac OS X version of the program. Does anyone

I Need help from all the group participants

2007-08-20 Thread Boris Ozegovic
Hi, I am working on some system, and the communication will take place through the chatterbot which will be written in AIML (interpreter is written in Python). English is not my mother tongue, so I need huge favor: if all of you can write two sentences, so that I could have greater pattern base

Re: Python equivalent of Perl's $/

2007-08-20 Thread kyosohma
On Aug 19, 1:13 pm, John K Masters <[EMAIL PROTECTED]> wrote: > I am currently working my way through Jeffrey Friedl's book Mastering > Regular Expressions. Great book apart from the fact it uses Perl for the > examples. > > One particular expression that interests me is '$/ = ".\n"' which, > rathe

Re: datetime in microseconds

2007-08-20 Thread mroeloffs
On Aug 20, 3:15 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Aug 20, 9:52 pm, [EMAIL PROTECTED] wrote: > > > Hi I have a time in microseconds, for example 0x8C905CBA7F84AF4. I > > want this to a normal view in hh:mm:ss DD:MM:. I tried with > > datetime, but it only takes a max of 100 mic

Newbee Question

2007-08-20 Thread HD1956
This is probably a simple code. I am a truck driver who gets paid by stops and cases. I am trying to figure out how to code my stop pay. I get 40 cents per stop up to 22 stops, and $1.40 per stops after that. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbee Question

2007-08-20 Thread kyosohma
On Aug 20, 9:23 am, "HD1956" <[EMAIL PROTECTED]> wrote: > This is probably a simple code. I am a truck driver who gets paid by > stops and cases. I am trying to figure out how to code my stop pay. I > get 40 cents per stop up to 22 stops, and $1.40 per stops after that. def calc(num): if n

Re: Newbee Question

2007-08-20 Thread Shawn Milochik
#!/usr/bin/env python normalPay = 0.4 overPay = 1.4 normalLimit = 22 def calcPay(numStops): pay = 0 if numStops > normalLimit: pay = overPay * (numStops - normalLimit) numStops = normalLimit return pay + (numStops * normalPay) if __name__ == "__main__": print

Re: How to decompress .Z file?

2007-08-20 Thread Thomas Jollans
On Monday 20 August 2007, Hyunchul Kim wrote: > Hi, all > > How can .Z file be decompressed? > > According to python library reference, .Z file might not be supported by > python, yet. The GNU zip program (gzip) supports .Z and .z archives, so if you only want to support UNIX-like systems you cou

Re: Problem with Thread.join()

2007-08-20 Thread James Matthews
Post some code so we can see the issue! I would say that the issue is where your function that you are calling isn't exiting! On 8/20/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > En Mon, 13 Aug 2007 20:10:53 -0300, Robert Dailey <[EMAIL PROTECTED]> > escribi�: > > > I have a class that der

Re: Newbee Question

2007-08-20 Thread Shawn Milochik
On 8/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Aug 20, 9:23 am, "HD1956" <[EMAIL PROTECTED]> wrote: > > This is probably a simple code. I am a truck driver who gets paid by > > stops and cases. I am trying to figure out how to code my stop pay. I > > get 40 cents per stop up to 22 st

Re: datetime in microseconds

2007-08-20 Thread mroeloffs
On Aug 20, 4:17 pm, [EMAIL PROTECTED] wrote: > On Aug 20, 3:15 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On Aug 20, 9:52 pm, [EMAIL PROTECTED] wrote: > > > > Hi I have a time in microseconds, for example 0x8C905CBA7F84AF4. I > > > want this to a normal view in hh:mm:ss DD:MM:. I trie

Re: Newbee Question

2007-08-20 Thread Diez B. Roggisch
HD1956 schrieb: > This is probably a simple code. I am a truck driver who gets paid by > stops and cases. I am trying to figure out how to code my stop pay. I > get 40 cents per stop up to 22 stops, and $1.40 per stops after that. > Sounds a bit like homework. Which usually isn't simply delive

Re: Newbee Question

2007-08-20 Thread kyosohma
On Aug 20, 9:58 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: > On 8/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > On Aug 20, 9:23 am, "HD1956" <[EMAIL PROTECTED]> wrote: > > > This is probably a simple code. I am a truck driver who gets paid by > > > stops and cases. I am trying

Re: Where we need to use Python ?

2007-08-20 Thread Wildemar Wildenburger
Michael Bentley wrote: > On Aug 20, 2007, at 1:02 AM, [EMAIL PROTECTED] wrote: > > >> And Is it a interpreted language or a programming language >> It comes in which category >> >> I very keen to know this please tell >> > > [ open on suburban kitchen, Wife and Husband arguing ] > > Wife: N

Re: Call for advice on how to start PyOpenGL!

2007-08-20 Thread Mike C. Fletcher
math2life wrote: > I work with python for two years, are familiar with image processing, > but beginner on PyOpenGL and OpenGL. > > Any advice appreciated! > As has been mentioned, the NeHe tutorials[1] are a good starting point. There are (multiple) translations of the first 8 or so and then

Re: yet another indentation proposal

2007-08-20 Thread Terry Reedy
If there is not one already, a page for blind and visually impaired programmers on the Python site would be a good addition. -- http://mail.python.org/mailman/listinfo/python-list

Re: Latest models of Gibson guitars

2007-08-20 Thread RickH
On Aug 19, 9:24 pm, Randall Ainsworth <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, Hermit > > <[EMAIL PROTECTED]> wrote: > > How does the image quality compare with a DSLR? > > Depends on whether it's a Paul or a Strat. A Strat is a Fender, but I'd rather win a Gibson es175. --

Re: clarification

2007-08-20 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > > turn indicates that both implementations actually work about same and > > your "O(n squared)" argument is irrelevant. > > It's indeed irrelevant when the behavior _isn't_ quadratic (as in the > case of intersections) -- but unfortunately it _is_ needle

Re: Newbee Question

2007-08-20 Thread Shawn Milochik
> I like to write code, so it's not a big deal when it's something so > simple. Still, that is beyond dumb! Nice code, by the way. > > Mike Yeah, it was fun to write anyway. Thanks for the compliment on the code. I still consider myself a Python newbie, so it's good to know I'm not trying to write

Re: Newbee Question

2007-08-20 Thread Wildemar Wildenburger
Diez B. Roggisch wrote: > Sounds a bit like homework. Which usually isn't simply delivered here. > > Wrong! Usually that happens pretty quickly here (as proven again in this case). Not that it should, but only the seniors seem to detect lazy learners. /W -- http://mail.python.org/mailman/lis

Re: Python equivalent of Perl's $/

2007-08-20 Thread Mark T
"John K Masters" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am currently working my way through Jeffrey Friedl's book Mastering > Regular Expressions. Great book apart from the fact it uses Perl for the > examples. > > One particular expression that interests me is '$/ = ".\n"

Re: Newbee Question

2007-08-20 Thread Paul McGuire
On Aug 20, 9:23 am, "HD1956" <[EMAIL PROTECTED]> wrote: > This is probably a simple code. I am a truck driver who gets paid by > stops and cases. I am trying to figure out how to code my stop pay. I > get 40 cents per stop up to 22 stops, and $1.40 per stops after that. You'll get top marks for tu

Re: Python equivalent of Perl's $/

2007-08-20 Thread Nick Craig-Wood
John K Masters <[EMAIL PROTECTED]> wrote: > I am currently working my way through Jeffrey Friedl's book Mastering > Regular Expressions. Great book apart from the fact it uses Perl for the > examples. > > One particular expression that interests me is '$/ = ".\n"' which, > rather than splitti

Re: How to decompress .Z file?

2007-08-20 Thread Nick Craig-Wood
Hyunchul Kim <[EMAIL PROTECTED]> wrote: > How can .Z file be decompressed? The old unix program compress used to generate these files. http://packages.debian.org/unstable/utils/ncompress You'll find the command line programs gzip/gunzip/zcat can decompress them too. > According to python li

Re: regular expression dictionary search

2007-08-20 Thread Shawn Milochik
#!/usr/bin/env python import re patterns = { 'sho.' : 6, '.ilk' : 8, '.an.' : 78 } def returnCode(aWord): for k in patterns: p = "^%s$" % k regex = re.compile(p) if re.match(regex, aWord): return patterns[k] if __name__ == "__main__": print "The retu

Re: yet another indentation proposal

2007-08-20 Thread Alex Martelli
Jakub Stolarski <[EMAIL PROTECTED]> wrote: > Why not just use comments and some filter. Just write # _{ at the > beginning and # _} at the end. Then filter just before runing > indenting with those control sequences? Then there's no need to change > interpreter. As I pointed out in another post t

Re: yet another indentation proposal

2007-08-20 Thread Alex Martelli
Aaron <[EMAIL PROTECTED]> wrote: ... > That's probably what I'll end up doing. The only drawback to that is that > it solves the problem for me only. Perhaps I will open source the scripts > and write up some documentation so that other folks in a similar situation > don't have to reinvent the

Re: yet another indentation proposal

2007-08-20 Thread Alex Martelli
Michael Tobis <[EMAIL PROTECTED]> wrote: > On Aug 19, 11:51 pm, James Stroud <[EMAIL PROTECTED]> wrote: > > > What's wrong with just saying the current indent level? I'd much rather > > hear "indent 4" than "tab tab tab tab". > > Alternatively, you might also consider writing a simple pre and >

Re: question

2007-08-20 Thread Shawn Milochik
> And Shawn, I didn't post any of my work because the network I work on > isn't > connected to the internet. So it didn't seem constructive to re-type > all of my > failed code just to satisfy your "standards" of proving that I've been > trying to > hack this myself for the past few days. All in a

Re: regular expression dictionary search

2007-08-20 Thread mkPyVS
On Aug 20, 9:35 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: > #!/usr/bin/env python > > import re > > patterns = { 'sho.' : 6, '.ilk' : 8, '.an.' : 78 } > > def returnCode(aWord): > for k in patterns: > p = "^%s$" % k > regex = re.compile(p) > if re.match(regex, aWor

Re: regular expression dictionary search

2007-08-20 Thread Paul McGuire
On Aug 20, 10:35 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: > #!/usr/bin/env python > if __name__ == "__main__": > > print "The return for 'fred' : %s" % returnCode('fred') > print "The return for 'silk' : %s" % returnCode('silk') > print "The return for 'silky' : %s" % returnCode

Re: regular expression dictionary search

2007-08-20 Thread Shawn Milochik
On 8/20/07, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Aug 20, 10:35 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: > > #!/usr/bin/env python > > > if __name__ == "__main__": > > > > print "The return for 'fred' : %s" % returnCode('fred') > > print "The return for 'silk' : %s" % returnC

str().join() isn't working

2007-08-20 Thread Robert Dailey
Hi, First have a look at the following code: In main.py: --- space = " " includes = space.join( system._user_includes ) + " " + space.join( system._system_includes ) In system.py: -

Re: Problem with Thread.join()

2007-08-20 Thread Robert Dailey
Hey guys, Sorry for taking so long to respond. I had actually figured out what this issue is over on the wxPython mailing list. The issue was that I was attempting to configure wxPython controls from a remote thread, which is apparently illegal due to some state persistance issues. Thanks all for

Re: yet another indentation proposal

2007-08-20 Thread Paddy
On Aug 19, 5:22 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > Paddy <[EMAIL PROTECTED]> wrote: > >... > > > Can screen reaaderss be customized? > > Open-source ones surely can (e.g., NVDA is an open-source reader for > Windows written in Python, -- alas, if > you

Re: Newbee Question

2007-08-20 Thread Neil Cerutti
On 2007-08-20, HD1956 <[EMAIL PROTECTED]> wrote: > This is probably a simple code. I am a truck driver who gets > paid by stops and cases. I am trying to figure out how to code > my stop pay. I get 40 cents per stop up to 22 stops, and $1.40 > per stops after that. I wish *I* could make a deal li

Re: I Need help from all the group participants

2007-08-20 Thread [EMAIL PROTECTED]
On Aug 20, 9:16 am, Boris Ozegovic <[EMAIL PROTECTED]> wrote: > Hi, > > I am working on some system, and the communication will take place through > the chatterbot which will be written in AIML (interpreter is written in > Python). English is not my mother tongue, so I need huge favor: if all of

Re: I Need help from all the group participants

2007-08-20 Thread Boris Ozegovic
[EMAIL PROTECTED] wrote: > The only sentence that comes to mind is: > > "I hope I never find myself in a hospital that uses your system." You are not funny. The system isn't for hospitals, it is for university purposes. -- Ne dajte da nas lažljivac Bandić truje: http://cnn.blog.hr/arhiva-2007

Re: I Need help from all the group participants

2007-08-20 Thread Shawn Milochik
On 8/20/07, Boris Ozegovic <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > The only sentence that comes to mind is: > > > > "I hope I never find myself in a hospital that uses your system." > > You are not funny. The system isn't for hospitals, it is for university > purposes. > > -- >

Re: Hot subject: a good python editor and/or IDE?

2007-08-20 Thread Dave Cook
On 2007-08-19, Sébastien <[EMAIL PROTECTED]> wrote: > I am currently using Eclipse+PyDev when developping Python projects but > I lack a fast, simple editor for tiny bit of scripts. So here is my > question: what is, for you, the current best ( but still kind of light! > ) Python editor/IDE ? A

Re: Mouse control with ctypes in OS X

2007-08-20 Thread Paul McNett
Niklas Ottosson wrote: > I need to get hold of the mouse position and also need to be able to > change it. In windows I have used ctypes.windll.user32.getCursorPos() > and ctypes.windll.user32.setCursorPos() with great success in my program > but now I also need to make a Mac OS X version of the

Re: reading a line in file

2007-08-20 Thread Shawn Milochik
Write some code, even if it doesn't quite work, and post it. We'll help you fix it. You can open a file with: input = open("file.txt", "r") You can read a line with: someText = input.readline() You can loop through an open file like this: for line in input: #do something with line That s

reading a line in file

2007-08-20 Thread Brian McCann
Hi, does anyone have a good example of how to read a line in a file? say you have a file build.log and in the file are values like buildnum = 1 date = 20070820 I know how to read the contents and write them to a file, but how would one grab just the date or build number in order to create a

Re: I Need help from all the group participants

2007-08-20 Thread ŠućMućPaProlij
"Shawn Milochik" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 8/20/07, Boris Ozegovic <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> >> > The only sentence that comes to mind is: >> > >> > "I hope I never find myself in a hospital that uses your system." >> >> You a

'REPL' style IDE

2007-08-20 Thread beginner
Hi Everyone, I am using the Wing IDE. It works great when developing applications, but the workflow is like Visual Studio -- after you execute it or debug it, the python script ends. What I want is an interactive interpreting environment. I want the IDE to execute a boot script to initialize my e

Re: 'REPL' style IDE

2007-08-20 Thread beginner
On Aug 20, 12:50 pm, beginner <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > I am using the Wing IDE. It works great when developing applications, > but the workflow is like Visual Studio -- after you execute it or > debug it, the python script ends. > > What I want is an interactive interpreting en

Re: str().join() isn't working

2007-08-20 Thread Robert Dailey
here is a more realized example of the lists I'm trying to join: _user_includes = [ "../src", "../resource", "../inc", "../src", "../data", "../gui", "../script", "../script/actions", "../gui/dispatch", "../gui/factor

  1   2   >