Re: JINI service -- Python client

2006-01-10 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Roedy Green <[EMAIL PROTECTED]> wrote: >On 6 Jan 2006 11:17:58 -0800, [EMAIL PROTECTED] wrote, >quoted or indirectly quoted someone who said : > >>does anybody knows how to use JINI service from Python? > >IF you use it from JPython, it is almost identical to using

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

2006-01-10 Thread Cameron Laird
QOTW: "I'm a huge fan of single digit numbers ..." - Jim Hugunin, illustrating his undiminished grasp on the Pythonic ethos "It's hard to say exactly what constitutes research in the computer world, but as a first approximation, it's software that doesn't have users." - Paul Graham Microsof

Re: OT: introduction to computing clusters?

2006-01-20 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: > >Sorry for the off-topic post, but I know of no better collection of brains >than this one. I'm starting to investigate clustering as a means to address >some growing computing needs at work, but know essentially zip about the >concept.

Re: tkinter cursors name&display reference

2006-07-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >I made a document on Tkinter cursors (mouse pointers?), pairing the >cursor image with its name... >Not a great deal of magic here since anyone can program something to >see the different cursors on screen rather easily... BUT to have a >

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

2006-07-11 Thread Cameron Laird
QOTW: "Write code, not usenet posts." - Fredrik Lundh "If an embedded return isn't clear, the method probably needs to be refactored with 'extract method' a few times until it is clear." - John Roth The comp.lang.python collective has become quite expert at answering "Which book should

Re: Python for Embedded Systems?

2006-07-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Jack <[EMAIL PROTECTED]> wrote: >Yes, I mean Lua, not Loa :-p > >Lua is a nice language. Like you said, it doesn't have many libraries >as Python does. Plus, it's still evolving and the libraries are changing. >I found a few functions not working last time I tried k

Re: Python for Embedded Systems?

2006-07-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: . . . >This raises a good question. Is there a need for python to change >somewhat to work better in an embedded profile? Are there many people

Re: Python for Embedded Systems?

2006-07-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Rubin <http://[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Cameron Laird) writes: >> Yes and no. Python could thrive for the next decade while >> utterly surrendering the small-and-embedded domain to Forth, >> Lua, Tcl, Sche

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 fil

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,s

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

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 compe

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 i

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 t

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 detai

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

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 intend

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: 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 questio

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

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.

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: 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. . .

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 m

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

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 la

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: 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."

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 >tak

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 disassembler

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: 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

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 thi

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

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: 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

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: 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: >> >> &

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

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: > >http://pyfaq.infogami.co

Re: Where is Python in the scheme of things?

2006-10-04 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: . . . >I'm a complete windows novice (as in I've forced myself to forget my >experiences with it), but does windows not run vim?

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

user modules

2006-10-04 Thread Cameron Walsh
m, such as for module in imported_modules: module.initialise() module.get_tab_window() How do I get from the first bit to the second bit, or is there a better way of obtaining the functionality I need? --Cameron. -- http://mail.python.org/mailman/listinfo/python-list

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 >>

Re: user modules

2006-10-05 Thread Cameron Walsh
Tuomas wrote: > Cameron Walsh wrote: >> Hi, >> >> I'm writing a python program to analyse and export volumetric data. >> To make development and extension easier, and to make it more useful >> to the public when it is released (LGPL), I would like to enab

Re: user modules

2006-10-05 Thread Cameron Walsh
Juho Schultz wrote: > Juho Schultz wrote: >> Cameron Walsh wrote: >>> Hi, >>> >>> I'm writing a python program to analyse and export volumetric data. To >>> make development and extension easier, and to make it more useful to the >>> publ

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: How to share session with IE

2006-10-10 Thread Cameron Walsh
and to be honest I haven't looked into how to do it. Thereafter, you will have to pass the environment to every page request so the server can read the cookie. Which brings me to question whether or not it is possible to do this manually once, export the environment variable to a file, and r

Re: How to share session with IE

2006-10-10 Thread Cameron Walsh
I just thought, your original question was whether or not it was possible to share your browser session with IE. Unless you do this explicitly, you may require a different login for your Python program and for your IE user. If the Python program does not get the same cookie as used by IE, or

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 comi

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 provid

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: Cannot import a module from a variable

2006-10-18 Thread Cameron Walsh
>>> user_modules = import_extension_modules("user_modules") >>> user_modules {'user_modules.funky_module': } Woah, that actually works? Having the "finally" after the "return"? That could make some things easier, and some things harder... Hope that helps, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot import a module from a variable

2006-10-18 Thread Cameron Walsh
Gabriel Genellina wrote: > At Wednesday 18/10/2006 22:51, Cameron Walsh wrote: > >> previous_directory = os.getcwd() >> try: >> os.chdir(directory) >> [ ... ] >> return modules >> finally: >> os.chdir(pre

Sorting by item_in_another_list

2006-10-23 Thread Cameron Walsh
that I could use to define a new function with 3 parameters, feed it the third (the list to sort by), and have the A.sort(sort_by_in_list) provide the other 2 variables? Regards to all, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting by item_in_another_list

2006-10-23 Thread Cameron Walsh
Cameron Walsh wrote: > Hi, > > I have two lists, A and B, such that B is a subset of A. > > I wish to sort A such that the elements in B are at the beginning of A, > and keep the existing order otherwise, i.e. stable sort. The order of > elements in B will always be corr

Re: Sorting by item_in_another_list

2006-10-23 Thread Cameron Walsh
Paul McGuire wrote: > "Cameron Walsh" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hi, >> >> I have two lists, A and B, such that B is a subset of A. >> >> I wish to sort A such that the elements in B are at the beginning

Re: python GUIs comparison (want)

2006-10-23 Thread Cameron Walsh
m/toolkits.html as the first result. Every variation on the values I entered seemed to point me to wxPython, which I'm still using now. However, they seem to think that EasyGUI is the easiest to learn, but that it suffers on "Maturity, documentation, breadth of widget selection"

Re: Sorting by item_in_another_list

2006-10-24 Thread Cameron Walsh
Delaney, Timothy (Tim) wrote: > Cameron Walsh wrote: > >> Hi, >> >> I have two lists, A and B, such that B is a subset of A. >> >> I wish to sort A such that the elements in B are at the beginning of >> A, and keep the existing order otherwise, i.e. s

Re: Sorting by item_in_another_list

2006-10-25 Thread Cameron Walsh
solution: B = set(B) A = B + list(x for x in A if x not in B) be faster than this solution: B = set(B) A.sort(key=B.__contains__, reverse=True) My guess is yes, since while the __contains__ method is only run once for each object, the list still does not require sorting. Thanks everyone for all your helpful replies, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting by item_in_another_list

2006-10-26 Thread Cameron Walsh
op In conclusion, it appears I should use the clearest of all the methods, since for the data sizes I am dealing with, they are of approximately the same speed, and the time taken is negligible anyway. Thanks for all your help, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: Insert Content of a File into a Variable

2006-10-26 Thread Cameron Walsh
x27;, 'readinto', 'readline', 'readlines', 'seek', 'softspace', 'tell', 'truncate', 'write', 'writelines', 'xreadlines'] >>> #That read attribute looks interesting... >>> my_file.read >>> my_file.read() Ye gads! I wish I'd chosen a shorter file! Or used a variable to put it in! >>> text = my_file.read() >>> print text Ye gads! I wish I'd chosen a shorter file! You might also try: >>> lines = my_file.readlines() >>> for line in lines: >>> print line Hope it helps, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Split Chinese Character with backslash representation?

2006-10-26 Thread Cameron Walsh
Wijaya Edward wrote: > Hi all, > > I was trying to split a string that > represent chinese characters below: > > str = '\xc5\xeb\xc7\xd5\xbc' print str2, > ??? fields2 = split(r'\\',str) print fields2, > ['\xc5\xeb\xc7\xd5\xbc'] > > But why the split function here doesn't

Re: How to Split Chinese Character with backslash representation?

2006-10-26 Thread Cameron Walsh
limodou wrote: > On 10/27/06, Wijaya Edward <[EMAIL PROTECTED]> wrote: >> >> Thanks but my intention is to strictly use regex. >> Since there are separator I need to include as delimiter >> Especially for the case like this: >> >> >>> str = '\xc5\xeb\xc7\xd5\xbc--FOO--BAR' >> >>> field = list(str)

Re: Cards deck problem

2006-10-26 Thread Cameron Walsh
[EMAIL PROTECTED] wrote: > Dennis Lee Bieber wrote: >> On Fri, 27 Oct 2006 03:48:25 GMT, Michael Naunton >> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: >> >>> This may seem pendantic, but CS is mostly about thinking about (and thus >> Someday I should arrange to do a lost

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 >> ini

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 f

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,

Re: Python cgi Apache os.system()

2006-11-08 Thread Cameron Walsh
or python (which could be "nobody"). Depending on how securely your server is configured, you may be able to access whichever file it is looking for if you specify the full path to the file, or the relative path from the server root directory (watch out for hardlinks/softlinks.) Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to tell what is the IP of my PC .

2006-11-08 Thread Cameron Walsh
cipe/162994>http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/162994 >> >> >> import >> win32api raise the error "module not exsit" http://sourceforge.net/projects/pywin32/ >> and >> socket.gethostbyname(name)the router doesn't hav

Printing to file, how do I do it efficiently?

2006-11-09 Thread Cameron Walsh
ations take negligible amounts of time, all it does is allow the data to be accessed differently.) I'm guessing that the slow part is the fact that I am converting the data to character format and writing it one character at a time. What is a better way of doing this, or where should I l

Re: Printing to file, how do I do it efficiently?

2006-11-10 Thread Cameron Walsh
Robert Kern wrote: > Cameron Walsh wrote: >> Hi all, >> >> I have a numpy.array of 89x512x512 uint8's, set up with code like this: > > numpy questions are best asked on the numpy list, not here. At first I thought it was a generic python question, since it had mo

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 > http://phaseit.

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 helpf

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

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

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 P

Re: reading csv problem

2006-11-14 Thread Cameron Walsh
st print row work here? > > TIA, > ajikoe > Because reader is an iterator and has no means of going back to its beginning. You could make a list out of it: lines = list(csv.reader(open('t.csv'))) for row in lines: print row for row in lines: print row Hope it helps, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

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 y

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.

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 >

Re: Any other config parsing modules besides ConfigParser ?

2006-05-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paddy <[EMAIL PROTECTED]> wrote: >ConfigObj? > http://www.voidspace.org.uk/python/configobj.html . . . Depending on what the original questioner meant by "general", I'm always happy to recommend

Re: access serial port in python

2006-05-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >hi >i hav written a code in python to send an SMS from a nokia 3310 >connected to my PC... >i wanted to receive a msg on my PC. In order to do so, the PC must know >when it has to read data frm the serial port ...thus an interrupt must >b

Re: Watching serial port activity.

2006-05-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2006-05-30, xkenneth <[EMAIL PROTECTED]> wrote: > >> I'm using linux. > >[It's generally considered good practice to quote enough context >so that your post makes sense to people without access to older >postings.] > >Und

Re: Watching serial port activity.

2006-05-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, I confused matters with: > . > . > . >!? I hadn't realized there's no such monitor ... What do you >think of http://wiki.tcl.tk/moni >? Ugh. Please ignore, all; this was a first draft of what was

Dr. Dobb's Python-URL! - weekly Python news and links (May 30)

2006-05-30 Thread Cameron Laird
QOTW: "Making a user class work anywhere you can put a mapping in Perl is deep magic, but easy in Python. Creating types that act like files and can be used wherever a file is used is SOP in Python; I'm not even sure it's possible in Perl (probably is, but it's again deep magic)." - Mike Meyer ".

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

2006-05-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fuzzyman <[EMAIL PROTECTED]> wrote: . . . >> Fuzzyman advertises yet another convenience of Movable Python: >> http://groups.google.com/group/comp.lang.python/msg/35baaa3af891c12f

Re: Tkinter - changing existing Dialog?

2006-06-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Michael Yanowitz <[EMAIL PROTECTED]> wrote: >Hello: > > > I have a Tkinter GUI Dialog with many buttons and labels and text >widgets. >What I would like to do is, can I: > >1) Disable/deactivate/hide a button, text widget that is already drawn (and > of course th

Re: Tkinter - changing existing Dialog?

2006-06-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Michael Yanowitz <[EMAIL PROTECTED]> wrote: . . . >2) Change the text of a label or button that is already drawn? > > based on actions taken by the user. Can it be done without destroying >the p

Re: Python less error-prone than Java

2006-06-03 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: >You will often hear that for reasons of fault minimization, you should >use a programming language with strict typing: >http://turing.une.edu.au/~comp284/Lectures/Lecture_18/lecture/node1.html > >I just came across a

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

2006-06-06 Thread Cameron Laird
QOTW: "You can gain substantial speed-ups in very certain cases, but the main point of Pyrex is ease of wrapping, not of speeding-up." - Simon Percivall "The rule of thumb for all your Python Vs C questions is ... 1.) Choose Python by default. . . ." - Ravi Teja Do you remember Python's ea

Re: Test tool for python code.

2006-06-08 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Is there any tool available that will tell me what are the different >test paths for any python code? . . . http://groups.google.com/groups?as_q=coverage&num=10&sc

Re: How to extract 2 integers from a string in python?

2006-06-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Klaus Alexander Seistrup <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] skrev: > >> how can I extract 2 integers from a string in python? >> >> for example, my source string is this: >> Total size: 173233 (371587) >> >> I want to extract the integer 173233 and 371587

Re: Screen Scraping for Modern Applications?

2006-06-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: . . . >For a side project I'm working on I need to be able to scrape a modern >computer desktop. Is there any basic material already available to do >this? I'd rather

Re: how to get the length of a number

2006-06-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Felipe Almeida Lessa <[EMAIL PROTECTED]> wrote: . . . >math.floor(math.log(x, 10)) + 1 > >-- >Felipe. > ... and you're restricting to the positive integers, I take it? I still have rounding pr

Re: First question on extending Python...

2006-06-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: >Redefined Horizons wrote: . . . >> There is a third-party application that I need to work with. It is >> closed-source, but it exposes a C API. I want to

Re: Screen Scraping for Modern Applications?

2006-06-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: . . . >Scrape means simply scraping pixel colors from locations on the screen. >I'll worry about assembling it into meaningful information. > >Previously, I used Java,

Dr. Dobb's Python-URL! - weekly Python news and links (Jun 12)

2006-06-12 Thread Cameron Laird
QOTW: "Check out BeautifulSoup -- you will never write HTMLParser-based screen scrapers again. :)" - Jonathan Ellis "You clearly need something instead of XML." - Paul McGuire http://groups.google.com/group/comp.lang.python/msg/09e943c8dbf1e8c5? Johann C. Rocholl donates a PNG manager i

<    13   14   15   16   17   18   19   20   21   22   >