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

2007-04-03 Thread Cameron Laird
QOTW: This whole charset mess is not meant to be solved by mere mortals. - Thorsten Kampe, a day or so before solving his symptom with a codecs method: http://groups.google.com/group/comp.lang.python/msg/a2e573ccc54f66db

Re: Extract information from HTML table

2007-04-02 Thread Cameron Laird
In article [EMAIL PROTECTED], anjesh [EMAIL PROTECTED] wrote: On Apr 2, 12:54 am, Dotan Cohen [EMAIL PROTECTED] wrote: On 1 Apr 2007 07:56:04 -0700, Ulysse [EMAIL PROTECTED] wrote: I have seen the Beautiful Soup online help and tried to apply that to my problem. But it seems to be a little

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

2007-04-02 Thread Cameron Laird
QOTW: This whole charset mess is not meant to be solved by mere mortals. - Thorsten Kampe, a day or so before solving his symptom with a codecs method: http://groups.google.com/group/comp.lang.python/msg/a2e573ccc54f66db

Re: Memory testing in Python

2007-03-30 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Hi all I want to test my python code for memory efficiency in gnu/linux.How can I do this? . . . What does memory efficiency mean to you? Are you asking how to

Re: PyPy for dummies

2007-03-30 Thread Cameron Laird
In article [EMAIL PROTECTED], Paddy [EMAIL PROTECTED] wrote: . . . It is also European funding for an open source project with sprints. I'm sure some eurocrat will be dissecting the project to see if it is aa good way to fund

Re: Memory testing in Python

2007-03-30 Thread Cameron Laird
In article [EMAIL PROTECTED], mkPyVS [EMAIL PROTECTED] wrote: While I have a great deal of interest in memory management, my general reaction to your question as you've posed it is, Don't; concentrate for now on good Python style. I agree but for monitoring... I've had good luck with executing a

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

2007-03-30 Thread Cameron Laird
QOTW: I have a fake supervisor reference generator for job interviews, a fake house inspection generator for real estate transactions, and a fake parole testimony generator - maybe you could adapt one of them (unfortunately, they are written in dissembler). - Paul McGuire ... I think that [PyPy]

Re: Newbie Question (real-time communication between apps: audio, 3d, PD, Blender)

2007-03-30 Thread Cameron Laird
In article [EMAIL PROTECTED], Grant Edwards [EMAIL PROTECTED] wrote: On 2007-03-30, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm just beginning my exploration of Python and I have a rather general question. If two particular programs have Python scripting capabilities, does that mean those

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Cameron Laird
In article [EMAIL PROTECTED], Beliavsky [EMAIL PROTECTED] wrote: . . . Your experience with Fortran is dated -- see below. I'll be more clear: Fortran itself is a distinguished language with many meritorious

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 26 Mar 2007 06:20:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are Python is hugely easier to read. quite useful in creating scientific

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: . . . You can get the speed of fortran in Python by using libraries like Numeric without losing the readability of Python. Can you back this up with

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: . . . Is there a mac version?? Thanks Chris Yes. Several, in fact--all available at no charge. The Python world is different from what experience

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ... So I'ld suggest to start with downloading the Enthought edition of Python, and you can judge for yourself within 10 minutes, if it's fast enough. cheers, Stef Mientki

Re: call to function by text variable

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], Steve Holden [EMAIL PROTECTED] wrote: Cameron Laird wrote: In article [EMAIL PROTECTED], Jan Schilleman [EMAIL PROTECTED] wrote: Hi, try this: func = getattr(operations, [Replace, ChangeCase, Move][n]) HTH, Jan ianaré [EMAIL PROTECTED] schreef in bericht

Re: Tkinter Toplevel geometry

2007-03-25 Thread Cameron Laird
In article [EMAIL PROTECTED], Chris [EMAIL PROTECTED] wrote: After playing with this an inordinate amount of time, I found that one does need to supply parameters, namely the null parameter of an empty string. Try: sometop.geometry('') This repacks according to the widgets. Not quite

Re: call to function by text variable

2007-03-25 Thread Cameron Laird
In article [EMAIL PROTECTED], Jan Schilleman [EMAIL PROTECTED] wrote: Hi, try this: func = getattr(operations, [Replace, ChangeCase, Move][n]) HTH, Jan ianaré [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] yeah the subject doesn't really make sense does it? anyway want I want

Re: Wikipedia and a little piece of Python History

2007-03-21 Thread Cameron Laird
In article [EMAIL PROTECTED], Paddy [EMAIL PROTECTED] wrote: On Mar 21, 8:20 pm, [EMAIL PROTECTED] (John J. Lee) wrote: Paddy [EMAIL PROTECTED] writes: I just had a link to Tim peters first post on doctest: http://groups.google.com/group/comp.lang.python/msg/1c57cfb7b3772763 removed

Re: Printing __doc__

2007-03-21 Thread Cameron Laird
In article [EMAIL PROTECTED], gtb [EMAIL PROTECTED] wrote: On Mar 21, 3:35 pm, Peter Otten [EMAIL PROTECTED] wrote: . . . import sys def docstring(): ... return sys._getframe(1).f_code.co_consts[0] ... def foo():

Re: regex reading html

2007-03-21 Thread Cameron Laird
In article [EMAIL PROTECTED], ben miller [EMAIL PROTECTED] wrote: Hello, I've a program I'm working on where we scrape some of our web pages using Mechanize libraries and then parse what we've scraped using different regex functions. However, I've noticed that no matter what I do with the scraped

Re: Garbage collection

2007-03-21 Thread Cameron Laird
In article [EMAIL PROTECTED], Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Wed, 21 Mar 2007 15:32:17 +, Tom Wright [EMAIL PROTECTED] declaimed the following in comp.lang.python: True, but why does Python hang on to the memory at all? As I understand it, it's keeping a big lump of

Python-URL! - weekly Python news and links (Mar 22)

2007-03-21 Thread Cameron Laird
This is the first time you've received Python-URL! in 2007. No, that's not the fault of your mail server; we've just been on sabbatical. Now we're back. QOTW: 'Doesn't seem to work' is effectivly even more useless than 'doesn't work' [as a symptomatic description]. - Bruno Desthuilliers

Re: Newbie help looping/reducing code

2007-02-19 Thread Cameron Laird
In article [EMAIL PROTECTED], Paul Rubin http://[EMAIL PROTECTED] wrote: Lance Hoffmeyer [EMAIL PROTECTED] writes: def even_odd_round(num): if(round(num,2) + .5 == int(round(num,2)) + 1): if num .5: if(int(num) % 2): num =

Freeze packaging for Debian

2007-02-13 Thread Cameron Laird
How is Freeze--freeze.py URL: http://wiki.python.org/moin/Freeze --packaged for Debian? *Is* it packaged for Debian? -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with PIPE

2006-12-24 Thread Cameron Laird
In article [EMAIL PROTECTED], Felix Benner [EMAIL PROTECTED] wrote: Dhika Cikul schrieb: Hello, I'm new in Python, i don't know my subject is correct or wrong. I have problem with my script. I want to change password with passwd password in python without user submitted anything from

Re: Window, Windows, Linux, client and server...

2006-12-08 Thread Cameron Laird
In article [EMAIL PROTECTED], MRAB [EMAIL PROTECTED] wrote: . . . I think he wants to be able to show the server desktop on a client (for example, to show a user how to do something) and also be able to see a client desktop on

Re: Window, Windows, Linux, client and server...

2006-12-07 Thread Cameron Laird
In article [EMAIL PROTECTED], Gabriel Genellina [EMAIL PROTECTED] wrote: At Thursday 7/12/2006 05:28, nelson - wrote: i'm trying to implement an appllication with this two requirements. I have a server and some clients. I want to be able to launch an application (openoffice impress, for

Re: Ruby/Python/REXX as a MUCK scripting language

2006-12-01 Thread Cameron Laird
In article [EMAIL PROTECTED], Laurent Pointal [EMAIL PROTECTED] wrote: . . . there's the security issue that really worries me. . . I have to be able to limit what the interpreter can execute. I can't have my users

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-30 Thread Cameron Laird
In article [EMAIL PROTECTED], Laurent Pointal [EMAIL PROTECTED] wrote: Fred Bayer a écrit : Tony Belding wrote: I'm interested in using an off-the-shelf interpreted language as a user-accessible scripting language for a MUCK. I'm just not sure if I .

Re: Python v PHP: fair comparison?

2006-11-27 Thread Cameron Laird
In article [EMAIL PROTECTED], I reported: . . . I appreciate your clarification. I can report back that we certainly move in different circles; I, for example, knew of people with multi-million-dollar budgets deciding on

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-25 Thread Cameron Laird
In article [EMAIL PROTECTED], Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Fri, 24 Nov 2006 18:11:21 -0600, Tony Belding [EMAIL PROTECTED] declaimed the following in comp.lang.python: the security issue that really worries me. . . I have to be able to limit what the interpreter can execute.

Re: Dynamic function execution

2006-11-25 Thread Cameron Laird
In article [EMAIL PROTECTED], Fredrik Lundh [EMAIL PROTECTED] wrote: Andy Wu wrote: def func(seconds = None, minutes = None, hours = None): ... In my program I can get a string object('seconds', 'minutes', 'hours') to specify which parameter to use, the problem is I don't know how to

Re: Python v PHP: fair comparison?

2006-11-16 Thread Cameron Laird
In article [EMAIL PROTECTED], Luis M. González [EMAIL PROTECTED] wrote: . . . Perhaps it's timely to clarify the newer above: Guido made Python public in '89-90, and Rasmus showed PHP to others in '94-95. OK. But since when has

Re: About alternatives to Matlab

2006-11-16 Thread Cameron Laird
In article [EMAIL PROTECTED], sturlamolden [EMAIL PROTECTED] wrote: Boris wrote: Hi, is there any alternative software for Matlab? Although Matlab is powerful popular among mathematical engineering guys, it still costs too much not publicly open. So I wonder if there's similar software/lang

Re: Python v PHP: fair comparison?

2006-11-15 Thread Cameron Laird
In article [EMAIL PROTECTED], Luis M. González [EMAIL PROTECTED] wrote: . . . Then look no further. Learn python and go kick php developers asses in the market place. There are thousands of php developers out there. Do you

Dr. Dobb's Python-URL! - weekly Python news and links (Nov 13)

2006-11-14 Thread Cameron Laird
QOTW: It is humbling to see how simple yet powerfull python`s view on things is - Éric Daigneault http://groups.google.com/group/comp.lang.python/msg/bbd842715bb5b6eb [I]f a machine is expected to be infallible, it cannot also be intelligent. - Alan Turing, 20 February 1947, lecture to

Dr. Dobb's Python-URL! - weekly Python news and links (Nov 13)

2006-11-13 Thread Cameron Laird
QOTW: It is humbling to see how simple yet powerfull python`s view on things is - Éric Daigneault http://groups.google.com/group/comp.lang.python/msg/bbd842715bb5b6eb [I]f a machine is expected to be infallible, it cannot also be intelligent. - Alan Turing, 20 February 1947, lecture to

Re: Is python for me?

2006-11-13 Thread Cameron Laird
In article [EMAIL PROTECTED], lennart [EMAIL PROTECTED] wrote: Hi, I'm planning to learn a language for 'client' software. Until now, i 'speak' only some web based languages, like php. As a kid i programmed in Basic (CP/M, good old days :'-) ) Now i want to start to learn a (for me) new computer

Re: Is python for me?

2006-11-13 Thread Cameron Laird
In article [EMAIL PROTECTED], lennart [EMAIL PROTECTED] wrote: . . . At least: i use the dutch portal http://python.startpagina.nl/ to start with. Can you advice me a good Python interpreter, or a good startpage (as in Python

Help with gateway

2006-11-12 Thread Cameron Laird
Who knows and/or manages bag.python.org? My e-mail server and the clp gateway are having a configuration disagreement that I'd like to solve. Please e-mail me privately. I'll report back to the group as appropriate. -- http://mail.python.org/mailman/listinfo/python-list

Re: range syntax

2006-11-12 Thread Cameron Laird
In article [EMAIL PROTECTED], Colin J. Williams [EMAIL PROTECTED] wrote: . . . Your point about iterators is well taken, but it seems that the range is used sufficiently frequently that some syntactic form would be helpful.

Re: PDF to text script

2006-11-10 Thread Cameron Laird
In article [EMAIL PROTECTED], Vyz [EMAIL PROTECTED] wrote: I am looking for a PDF to text script. I am working with multibyte language PDFs on Windows Xp. I need to batch convert them to text and feed into an encoding converter program Thanks for any help in this regard URL:

Re: Python deployment options.

2006-11-08 Thread Cameron Laird
In article [EMAIL PROTECTED], Richard Charts [EMAIL PROTECTED] wrote: . . . Well on a Win machine, probably. Almost every Linux machine you come across will have (most likely a fairly recent build of) python. For Macs, I'm

Dr. Dobb's Python-URL! - weekly Python news and links (Nov 7)

2006-11-07 Thread Cameron Laird
QOTW: If you want to become a good Python programmer, you really need to get over that 'I need a oneliner' idea. - Fredrik Lundh http://groups.google.com/group/comp.lang.python/msg/9e10957173a20e73 It is the shortsightedness of the Python core developers that keeps the palindrome related

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Cameron Laird
In article [EMAIL PROTECTED], John Machin [EMAIL PROTECTED] wrote: Thomas W wrote: Ok, I've cleaned up my code abit and it seems as if I've encoded/decoded myself into a corner ;-). My understanding of unicode has room for improvement, that's for sure. I got some pointers and initial

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 16)

2006-10-16 Thread Cameron Laird
QOTW: Well, I haven't yet seen a definition of 'Integrated Development Environment' which would exclude Emacs... - Slawomir Nowaczyk Let me tell you: There are times when I'm really glad that as a German, I'm not supposed to possess any sense of humour at all. - Georg Brandl Pythoneers

Re: always raise syntax error!

2006-10-16 Thread Cameron Laird
In article [EMAIL PROTECTED], Larry Bates [EMAIL PROTECTED] wrote: daniel wrote: . . . well, I would say, the reason why I could not position the error code may partly due to the ambiguous message that python provides. the

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 16)

2006-10-16 Thread Cameron Laird
QOTW: Well, I haven't yet seen a definition of 'Integrated Development Environment' which would exclude Emacs... - Slawomir Nowaczyk Let me tell you: There are times when I'm really glad that as a German, I'm not supposed to possess any sense of humour at all. - Georg Brandl Pythoneers

Re: [Newbie] error handling

2006-10-11 Thread Cameron Laird
In article [EMAIL PROTECTED], Fulvio [EMAIL PROTECTED] wrote: *** Your mail has been scanned by InterScan MSS. *** Hello there, Simple question : how do I manage errors by the use try/except clause. Example: If I'd like to catch error coming from a

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 10)

2006-10-09 Thread Cameron Laird
QOTW: ... [N]ow that I've made the switch to python, I'm several orders of magnitude more productive ... - Rob Knapp http://groups.google.com/group/comp.lang.python/msg/8a4efd549bfb451a Hanging out around the Python community will make you a better VB, dotNet or C++ programmer ... - Carl

Re: tkinter newsgroup or mailing list

2006-10-05 Thread Cameron Laird
In article [EMAIL PROTECTED], Steve Holden [EMAIL PROTECTED] wrote: Franz Steinhaeusler wrote: Hello NG, I'm asking this, (although I know a mailing list on gmane gmane.comp.python.tkinter and there is so little traffic compared to the mailing list of wxPython also mirrored on gmane

Re: Find out the name of a variable passed as an argument

2006-10-04 Thread Cameron Laird
In article [EMAIL PROTECTED], Fredrik Lundh [EMAIL PROTECTED] wrote: Andreas Huesgen wrote: is there a way to receive the name of an object passed to a function from within the function. objects don't have names, so in general, you cannot do that. see:

Re: Where is Python in the scheme of things?

2006-10-04 Thread Cameron Laird
In article [EMAIL PROTECTED], hg [EMAIL PROTECTED] wrote: . . . Code in Python and decide for yourself ... but again, nowadays, you're to compare with C#, VB ... if you want to be in; that is. hg One of the points that's

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 4)

2006-10-03 Thread Cameron Laird
QOTW: If you want your objects to know their name, give them a name as an attribute. - Georg Brandl Unfortunately forty years of programming experience has taught me that there's an essentially infinite supply of mistakes to make ... your mistakes just get smarter most of the time. - Steve

Re: Manipulate PDFs

2006-10-03 Thread Cameron Laird
In article [EMAIL PROTECTED], Simon Brunning [EMAIL PROTECTED] wrote: On 10/3/06, Weko Altamirano [EMAIL PROTECTED] wrote: Hi Everyone, am a developer using Zope and wanted to know if any of you have ever implemented a pdf generating/creating system using python? This just means mostly

Re: python threading and timing

2006-10-03 Thread Cameron Laird
In article [EMAIL PROTECTED], Laurent Pointal [EMAIL PROTECTED] wrote: . . . May use Python for some -non realtime- parts, but I would not use any scripting language (not specific to Python) for real-time work (prefer C, ADA,

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 4)

2006-10-03 Thread Cameron Laird
QOTW: If you want your objects to know their name, give them a name as an attribute. - Georg Brandl Unfortunately forty years of programming experience has taught me that there's an essentially infinite supply of mistakes to make ... your mistakes just get smarter most of the time. - Steve

Re: Manipulate PDFs

2006-10-03 Thread Cameron Laird
In article [EMAIL PROTECTED], I misled the newsgroup by writing: . . . On a large, Very Important Zope site I maintain, though, one which delivers thousands of dynamically-generated PDF images (not to be confused with the

Re: tkinter to mpeg

2006-10-02 Thread Cameron Laird
In article [EMAIL PROTECTED], Thomas Jollans [EMAIL PROTECTED] wrote: On Mon, 02 Oct 2006 09:18:13 -0700, dug [EMAIL PROTECTED] let this slip: Hi, I have a small program that moves some shapes around a tkinter canvas. Is there any way to save the output in a movie file, maybe mpeg? you can

Dr. Dobb's Python-URL! - weekly Python news and links (Sep 27)

2006-09-26 Thread Cameron Laird
QOTW: It's not out of the kindness of our hearts that we help. Heck, I don't know what it is. Probably I just like reading my own drivel on the internet and occasionally helping others is a good excuse. - Neil Cerutti Well, if you're only watching mtv, it's easy to think that there's

Re: Running Python script from C++ code(.NET)

2006-09-26 Thread Cameron Laird
In article [EMAIL PROTECTED], volcano [EMAIL PROTECTED] wrote: . . . But here is another question for gurus: sometimes my script fails, and I cannot figure out why. OK, I can - especially since I terminate it with sys.exit(),

Dr. Dobb's Python-URL! - weekly Python news and links (Sep 27)

2006-09-26 Thread Cameron Laird
QOTW: It's not out of the kindness of our hearts that we help. Heck, I don't know what it is. Probably I just like reading my own drivel on the internet and occasionally helping others is a good excuse. - Neil Cerutti Well, if you're only watching mtv, it's easy to think that there's

Re: Don't use regular expressions to validate email addresses (was: Ineed some help with a regexp please)

2006-09-22 Thread Cameron Laird
In article [EMAIL PROTECTED], Damjan [EMAIL PROTECTED] wrote: you'd create something to allow anyone to potentially spam the hell out of a system... I'm sorry, but I fail to see how validating (or not) an email address could prevent using a webmail form for spamming. Care to elaborate ?

Re: How to return an not string' error in function?

2006-09-21 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Thank you so much it answers my humble question perfectly:) HOWEVER, to answer you final question, yes, there is a different and, in general, better, way. While there's a lot to say about good Python style and typing, I'll summarize at a

str() vs. repr() (was: How to return an not string' error in function?)

2006-09-21 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: . . . PS: Is str() the same as repr() ? . . . No URL:

Re: tcl list to python list?

2006-09-17 Thread Cameron Laird
In article [EMAIL PROTECTED], Paul McGuire [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have a file that contains a tcl list stored as a string. The list members are sql commands ex: { begin { select * from foo where

Re: tcl list to python list?

2006-09-17 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Hi, I have a file that contains a tcl list stored as a string. The list members are sql commands ex: { begin { select * from foo where baz='whatever'} {select * from gooble } end { insert into bar values('Tom', 25) } }

Re: tcl list to python list?

2006-09-17 Thread Cameron Laird
In article [EMAIL PROTECTED], Paul McGuire [EMAIL PROTECTED] wrote: . . . Er? Thanks for the nice comments re: pyparsing, sometimes I feel a little self-conscious always posting these pyparsing snippets. So I'm glad you

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Cameron Laird
In article [EMAIL PROTECTED], Tim Golden [EMAIL PROTECTED] wrote: . . . | I know threads won't help (in CPython at least) so I'm investigating | other types of concurrency which I might be able to use. I really like | the

Re: Subprocess confusion: how file-like must stdin be?

2006-08-18 Thread Cameron Laird
In article [EMAIL PROTECTED], Nick Craig-Wood [EMAIL PROTECTED] wrote: Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Thu, 17 Aug 2006 17:16:25 +, [EMAIL PROTECTED] (Cameron Laird) declaimed the following in comp.lang.python: Question: import subprocess, StringIO input

Re: Subprocess confusion: how file-like must stdin be?

2006-08-18 Thread Cameron Laird
In article [EMAIL PROTECTED], Fredrik Lundh [EMAIL PROTECTED] wrote: Cameron Laird wrote: Your interactive session does indeed exhibit the behavior that puzzles me. My expectation was that StringIO and the std* parameters to Popen() were made for each other; certainly there are many cases

Subprocess confusion: how file-like must stdin be?

2006-08-17 Thread Cameron Laird
Question: import subprocess, StringIO input = StringIO.StringIO(abcdefgh\nabc\n) # I don't know of a compact, evocative, and # cross-platform way to exhibit this behavior. # For now, depend on cat(1). p = subprocess.Popen([cat], stdout = subprocess.PIPE,

Re: round not rounding to 0 places

2006-08-16 Thread Cameron Laird
In article [EMAIL PROTECTED], Tim Leslie [EMAIL PROTECTED] wrote: On 16 Aug 2006 00:19:24 -0700, Fuzzydave [EMAIL PROTECTED] wrote: I have been using a round command in a few places to round a value to zero decimal places using the following format, round('+value+', 0) but this consistantly

Re: yet another noob question

2006-08-13 Thread Cameron Laird
In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: mike_wilson1333 [EMAIL PROTECTED] wrote: I would like to generate every unique combination of numbers 1-5 in a 5 digit number and follow each combo with a newline. So i'm looking at .

Re: hide python code !

2006-08-12 Thread Cameron Laird
In article [EMAIL PROTECTED], Bayazee [EMAIL PROTECTED] wrote: Hi, ThnaX for Your Answers ... i am an open source programmer ... ! and i never like to write a closed source app or hide my codes ! it just a question that i must answer/solve it! one of site ( www.python.ir ) users asked this

Re: Python/Tk not working in Linux

2006-08-12 Thread Cameron Laird
In article [EMAIL PROTECTED], Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: In [EMAIL PROTECTED], BinnyVA wrote: I am using Fedora Core 3 Linux and I have a problem with Tk in Python. Whenever I try to run a tk script, I get the error... --- Traceback (most recent call

Re: semi-Newbie question

2006-08-11 Thread Cameron Laird
In article [EMAIL PROTECTED], len [EMAIL PROTECTED] wrote: . . . I have done some more reading and I think the code I need is as follows; mycode = TagToSQL['mySQLfieldname'] = Tagfile['Value'] exec mycode This is very new to

Re: semi-Newbie question

2006-08-10 Thread Cameron Laird
In article [EMAIL PROTECTED], len [EMAIL PROTECTED] wrote: I appoligize I don't think I have done a very good job of explaining my problem. . . . The program I am writing is nothing more than a conversion program to take the

Re: hide python code !

2006-08-10 Thread Cameron Laird
In article [EMAIL PROTECTED], Steven D'Aprano [EMAIL PROTECTED] wrote: On Thu, 10 Aug 2006 17:03:51 -0700, Bayazee wrote: hi in compiled languages when we compile a code to an executable file it convert to a machine code so now we cant access to source ... There are disassemblers for machine

Re: error handling

2006-08-10 Thread Cameron Laird
In article [EMAIL PROTECTED], Chris [EMAIL PROTECTED] wrote: I want to do this because there are several spots in my program where an error might occur that I want to handle the same way, but I don't want to rewrite the try..except block again. Is that clearer? .

Re: Are there any AOP project in python community?

2006-08-09 Thread Cameron Laird
In article [EMAIL PROTECTED], I teased: . . . with Python. I'd emphasize that Python *needs* AOP less than do Java and C++. I've been asked in private e-mail if I mean that Python is aspect-oriented from its beginning. Yes.

Re: Static Variables in Python?

2006-08-07 Thread Cameron Laird
In article [EMAIL PROTECTED], Paddy [EMAIL PROTECTED] wrote: . [substantial thread with many serious alternatives] . . You can do things with function attributes def foo(x):

Re: Something for PyPy developers?

2006-08-06 Thread Cameron Laird
In article [EMAIL PROTECTED], Paddy [EMAIL PROTECTED] wrote: I just found this: http://www.cs.princeton.edu/~dpw/popl/06/Tim-POPL.ppt And thought of you... :-) called The Next Mainstream Programming Languages, Tim Sweeney of Epic Games presents on problems that game writers see and muses on

Re: current recursion level

2006-08-06 Thread Cameron Laird
In article [EMAIL PROTECTED], Simon Forman [EMAIL PROTECTED] wrote: David Bear wrote: Is there an easy way to get the current level of recursion? I don't mean . . . import sys def getStackDepth(): '''Return the current

Re: Are there any AOP project in python community?

2006-08-06 Thread Cameron Laird
In article [EMAIL PROTECTED], hiaips [EMAIL PROTECTED] wrote: steve wrote: I mean Aspect-Oriented Programming. If any please give me some of links. Thanks a lot. See http://en.wikipedia.org/wiki/Aspect-oriented_programming. There is a list of AOP implementations for a number of languages

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Aug 2)

2006-08-02 Thread Cameron Laird
In article [EMAIL PROTECTED], Cameron Laird [EMAIL PROTECTED] wrote: . . . Python2.5final is under two weeks away. Watch for it. . . . ... or maybe

Re: Using Python for my web site

2006-08-01 Thread Cameron Laird
In article [EMAIL PROTECTED], northband [EMAIL PROTECTED] wrote: Just spoke with my department and looks like we still want to go with a server scripting method. Although MVC may be better fit, for the sake of the learning curve, we want to use a PSP style method. .

Re: Multiple Telnet sessions through one script

2006-08-01 Thread Cameron Laird
In article [EMAIL PROTECTED], Carl J. Van Arsdall [EMAIL PROTECTED] wrote: Well, although you spawn seperate telnet processes there is still only one thread of control in your pythons script. If you need to do two things simultaneously you'll need to setup a parallel control mechanism. For

Dr. Dobb's Python-URL! - weekly Python news and links (Aug 2)

2006-08-01 Thread Cameron Laird
QOTW: [U]sing Python is not programming, it IS a fun! - Tolga The reason for making complex a builtin is _not_ to ease a single program, but to create a convention allowing different modules which operate on complex numbers to communicate. -Scott David Daniels Komodo 4.0 debuted at last

Re: Search within running python scripts

2006-07-24 Thread Cameron Laird
In article [EMAIL PROTECTED], Simon Forman [EMAIL PROTECTED] wrote: gmax2006 wrote: . . . Yes, there are several ways. What OS are you using? ~Simon I have to use an os-independent approach. At this point I use a

Re: Which Pyton Book For Newbies?

2006-07-23 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: W. D. Allen wrote: I want to write a retirement financial estimating program. Python was suggested as the easiest language to use on Linux. I have some experience programming in Basic but not in Python. I have two questions: 1. What

Re: How to automate user input at the command prompt?

2006-07-21 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: In that case, the OP can probably use cygwin's version of python. pexpect definitely works there. . . . I suspect there are easier approaches--but

Re: execute a shell script from a python script

2006-07-18 Thread Cameron Laird
In article [EMAIL PROTECTED], Simon Forman [EMAIL PROTECTED] wrote: spec wrote: Thanks, actually there are no args, is there something even simpler? Thanks Frank you could try os.system() From the docs: system(command) . [more detail]

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Jul 17)

2006-07-18 Thread Cameron Laird
In article [EMAIL PROTECTED], Cameron Laird [EMAIL PROTECTED] wrote: . . . John Machin illustrates the rudiments of embedding: http://groups.google.com/group/comp.lang.python/browse_thread/thread/3189b10b83a6d64a

Re: execute a shell script from a python script

2006-07-18 Thread Cameron Laird
In article [EMAIL PROTECTED], Thomas Nelson [EMAIL PROTECTED] wrote: As described in the docs I pointed to before: subprocess.call(foo.sh,shell=True) Is the way to do it without args. I think it is simplest to learn the subprocess module because (quoting from the docs) this module intends to

Dr. Dobb's Python-URL! - weekly Python news and links (Jul 17)

2006-07-17 Thread Cameron Laird
QOTW: Alas, Python has extensive libraries and [is] well documented to boot. - Edmond Dantes Locking files is a complex business. - Sybren Stuvel File-locking *sounds* like an easy thing; it just isn't so in any operating system that often appears on desktops. Take advantage of

Re: Embedding exe file

2006-07-17 Thread Cameron Laird
In article [EMAIL PROTECTED], Bayazee [EMAIL PROTECTED] wrote: hi,ThanX but i dont want to save the exe file in temp file and run it . i want to run it directly from python . maybe such this : exec(file(test.exe,rw).read())) i want write a cd lock with python tp protect an binary file . and so i

Re: how to know if socket is still connected

2006-07-17 Thread Cameron Laird
In article [EMAIL PROTECTED], Grant Edwards [EMAIL PROTECTED] wrote: On 2006-07-16, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: serverhost = 'xxx.xxx.xxx.xxx' serverport = 9520 aeris_sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM) aeris_sockobj.connect((serverhost,serverport))

Re: solving equation system

2006-07-17 Thread Cameron Laird
In article [EMAIL PROTECTED], TG [EMAIL PROTECTED] wrote: Hi there. Anyone knows how to use numpy / scipy in order to solve this ? * A is an array of shape (n,) * X is a positive float number * B is an array of shape (n,) * O is an array of shape (n,) containing only zeros. A.X - B = O min(X)

Re: Commercial Programming

2006-07-17 Thread Cameron Laird
In article [EMAIL PROTECTED], Ben Finney [EMAIL PROTECTED] wrote: Boomshiki [EMAIL PROTECTED] writes: I am aware that someone can recreate what we have done, but for them to cut, paste, sell is kind of a rip off. Unless you factor that into your business model, and create compelling value

Re: Commercial Programming

2006-07-17 Thread Cameron Laird
In article [EMAIL PROTECTED], K.S.Sreeram [EMAIL PROTECTED] wrote: -=-=-=-=-=- Boomshiki wrote: And trust me, I am not worried about 16 yr olds using it without paying, why would they want to? I am worried about them cracking in to where their grades are kept. what you need is data

<    1   2   3   4   5   6   7   >