Using python to extend a python app

2005-03-24 Thread dataangel
I'm writing a python app that works as a replacement for the menu that comes with most minimalist wms when you right click the root window. It's prettier and written completely in python. I'd like to provide hooks or some system so that people can write their own extensions to the app, for

Re: Sending hex number as is

2005-03-24 Thread Antoon Pardon
Op 2005-03-21, [EMAIL PROTECTED] schreef [EMAIL PROTECTED]: This question may be ased before, but I couldn't find the answer searching the archive. Basically, I just want to send a hex number from one machine to the next: Hex numbers don't exist. You have just numbers. Those numbers can be

Re: IronPython 0.7 released!

2005-03-24 Thread Robin Becker
Thomas Heller wrote: well that's nice, but I don't do blogs and certainly don't do M$ Passport logins which it seems the gotdotnet site requires. Robin - we're too old for blogs ;-) But I could download the thingie with Mozilla without logging in into somewhere - although the bug tracker

Re: IronPython 0.7 released!

2005-03-24 Thread Robin Becker
Luis M. Gonzalez wrote: James wrote: http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742 This is what I get when I follow this link: Operational Troubleshooting in Progress I've been visiting ironpython's site all day long searching for news but nothing...

Re: IronPython 0.7 released!

2005-03-24 Thread Robert Kern
Robin Becker wrote: yes, but the simple download is a bit bare, I was hoping to find out more and then the passport login seems to come into play. Is there no other homepage somewhere? I assumed wsa www.ironpython.com, but that seems a bit out of date now. The mailing list seems to go to end of

Suggestions for a Java programmer

2005-03-24 Thread Ray
Hello there, I've been programming in Java for about 8 years now, but lately I've been hearing a lot about Python and I'm really interested in learning more about it. I've read the tutorial, and some books (core python programming is one), but there's one thing that's still missing: how to use

Re: IronPython 0.7 released!

2005-03-24 Thread Robin Becker
Robert Kern wrote: Robin Becker wrote: yes, but the simple download is a bit bare, I was hoping to find out more and then the passport login seems to come into play. Is there no other homepage somewhere? I assumed wsa www.ironpython.com, but that seems a bit out of date now. The mailing list

Re: Python for a 10-14 years old?

2005-03-24 Thread MyHaz
Well i don't know of any tutorials but i thought of a cool little assignment that might interest someone of that age assuming english is her first language. Its a neat little trick with english and the way that we proccess letter combinations (or should i say permuations). But a program that

Re: looking for programmer

2005-03-24 Thread MyHaz
Well your welcolme to send me the specs, im always up for making a few pennys. As for the yahoo account, i have me a spam catcher account and seems to work rather well. Hope To Here From You - Haz -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple account program

2005-03-24 Thread Igorati
ah thank you again. Anyone know of a good place to get information about TK inter. I am gonna try and make this program somewhat of a GUI. Thank you again. -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython 0.7 released!

2005-03-24 Thread Josef Meile
well that's nice, but I don't do blogs and certainly don't do M$ Passport logins which it seems the gotdotnet site requires. I agree, even for reading the FAQ and the Readme you need a password :-( -- http://mail.python.org/mailman/listinfo/python-list

execfile() on file subclass or string

2005-03-24 Thread Brano Zarnovican
Hi ! I have a python script represented by a string. I need to execute it in a context. 'exec' does the job, but doesn't display the filename in tracebacks. 'execfile' is displaying the filename but it can only exec a script in a filesystem. I have tried: - to give exec a filename, like: exec

Re: Anonymus functions revisited

2005-03-24 Thread bruno modulix
George Sakkis wrote: bruno modulix [EMAIL PROTECTED] wrote: in message news:[EMAIL PROTECTED] (snip) Note that you don't have anything like list unpacking, now tuple unpacking is pretty common in Python (swap, multiple return values, formatted strings and outputs, ...). All the following are

Re: Anonymus functions revisited

2005-03-24 Thread Duncan Booth
Ron wrote: A working makeVars seems not to be different from def makeVars(**nameVals): globals().update(nameVals) Not quite. If Ron can come up with a working makeVars it would update the caller's globals whereas what you just posted updates makeVar's globals so there is a difference

The Running Time of += on Char Strings ?

2005-03-24 Thread Edg Bamyasi
This Is A Late Cross Post from comp.lang.python. It seems the mistery is deeper then i expected. What is the running time of conactination on character strings. i.e. joe=123 joe+=9 is it Amortized Constant time? I don't think it would be O((number of chars)^2) but i really

Re: Please help for Python programming

2005-03-24 Thread bruno modulix
[EMAIL PROTECTED] wrote: I am sorry that i forgot to see the working example. Base on your example, i can show the value without missing but got the other problem. I would like to culmulate the value by users. This is (almost) exactly the same. I was rewrite your example but cannot not work. ##

Re: Submission for Python Limmerick Contest

2005-03-24 Thread Raseliarison nirinA
a penguin, a gnu and a snake and an X animal participate in a poem contest. who will win? Ellipsis -- nirinA -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestions for a Java programmer

2005-03-24 Thread TZOTZIOY
On 24 Mar 2005 00:22:09 -0800, rumours say that Ray [EMAIL PROTECTED] might have written: Can you point me to Python for Java Programmers resources? I found one blog, but that only touched the tip of the iceberg, I feel. I know that as I use Python more and read more books and read how

Re: Anonymus functions revisited : tuple actions

2005-03-24 Thread Kay Schluehr
Ron wrote: On Wed, 23 Mar 2005 06:21:30 +0100, Kay Schluehr [EMAIL PROTECTED] wrote: I think my proposal was more in mind of Rons modified exec than Pythons lambda. When George proposed his unpacking behavoir for list-comps as a pack of suggar: 1. [x*y-z for (x,y,z=0) in (1,2,3),

Re: Suggestions for a Java programmer

2005-03-24 Thread bruno modulix
Ray wrote: Hello there, I've been programming in Java for about 8 years now, but lately I've been hearing a lot about Python and I'm really interested in learning more about it. I've read the tutorial, and some books (core python programming is one), but there's one thing that's still missing: how

the problem of embedding python

2005-03-24 Thread
hi,python-chinese! environment: FreeBSD4.11, gcc2.953.4, python2.2ports. source code #include Python.h int main() { Py_Initialize(); PyRun_SimpleString(from time import time, ctime\n print 'Today is', ctime( time() )\n); Py_Finalize();

Re: The Running Time of += on Char Strings ?

2005-03-24 Thread Daniel Dittmar
Edg Bamyasi wrote: What is the running time of conactination on character strings. i.e. joe=123 joe+=9 is it Amortized Constant time? I don't think it would be O((number of chars)^2) but i really don't know. Strings are immutable, so joe+=9 is executed as joe =

Re: Python for a 10-14 years old?

2005-03-24 Thread Michele Simionato
Your post and the following answers made me think. It is widely held that the intellectual capabilities of children are inferior to the capabilities of adultes. Nevertheless, I wonder to which extent this is true. There is no doubt that the critical sense is much less developed in children than

Re: Suggestions for a Java programmer

2005-03-24 Thread Ville Vainio
bruno == bruno modulix [EMAIL PROTECTED] writes: bruno These two books should help you to get a grasp of Pythonic idioms: ... Regarding a Java programmer moving to Python, a lot of the mindset change is about the abundant use of built in data types of Python. So a Java programmer, when

unittest help

2005-03-24 Thread Qiangning Hong
I want to apply TDD (test driven development) on my project. I am working on a class like this (in plan): # file: myclass.py import _extmod class MyClass(object): def __init__(self): self.handle = _extmod.open() def __del__(self): _extmod.close(self.handle) def

Re: The Running Time of += on Char Strings ?

2005-03-24 Thread Stefan Behnel
Edg Bamyasi schrieb: What is the running time of conactination on character strings. i.e. .joe=123 .joe+=9 is it Amortized Constant time? I don't think it would be O((number of chars)^2) but i really don't know. First of all, this idiom is generally avoided in loops (where it

Re: unittest help

2005-03-24 Thread André Malo
* Qiangning Hong [EMAIL PROTECTED] wrote: I want to apply TDD (test driven development) on my project. I am working on a class like this (in plan): # file: myclass.py import _extmod class MyClass(object): def __init__(self): self.handle = _extmod.open() def

What are the required modules for ScientificPython?

2005-03-24 Thread HYUN-CHUL KIM
Hi, all I need "multiarray" package which is required for "ScientificPython". However, I couldn't find multiarray in Python Package index site. Where is this? currently, when executing example script in "Scientific Python", there are importing error for "multiarray" Sincerely,

Re: unittest help

2005-03-24 Thread Duncan Booth
Qiangning Hong wrote: As you see, it is an OO wrapper on _extmod, which is a pyrex extension module. The question is: how to unittest this class? As the _extmod is hardware-dependent, I want to use a mock class to replace it in unit test. But how can I let myclass in unittest to import the

What are the required modules for ScientificPython?

2005-03-24 Thread HYUN-CHUL KIM
Hi, all I need "multiarray" package which is required for "ScientificPython". However, I couldn't find multiarray in Python Package index site. Where is this? currently, when executing example script in "Scientific Python", there are importing error for "multiarray" Sincerely,

Re: scrollbar dependencies

2005-03-24 Thread Marion
Next mystery : a picture drawn in the canvas c1 is scrollable. a picture-containing canvas grided in the canvas c1 is not. so why ??? Marion --- from tkinter import * from PIL import * class Main: def __init__(self): ## Main window

Re: Python for a 10-14 years old?

2005-03-24 Thread MyHaz
Michele Simionato: Actually, one could even make the case that children are much better than adults at learning new things. In the case of natural languge it has been pretty much proven that children are (much) better/faster at learning then adults. Now it is left to be shown if this carries

Re: scrollbar dependencies

2005-03-24 Thread Eric Brunel
On 24 Mar 2005 03:24:34 -0800, Marion [EMAIL PROTECTED] wrote: Next mystery : a picture drawn in the canvas c1 is scrollable. a picture-containing canvas grided in the canvas c1 is not. so why ??? Marion --- [snip]

Re: The Running Time of += on Char Strings ?

2005-03-24 Thread MyHaz
Thanks Guys It Was Great Help and I have began to mark my code for the ''.join() string conatination optimization. Upon regoogling (when you know the right thing to google it can make a big diffrence, having not know how to google +=, hehe). I found this commentary and set of tests. I find it a

Re: looking for programmer

2005-03-24 Thread Fuzzyman
I'd also be interested... Regards, Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for a 10-14 years old?

2005-03-24 Thread TZOTZIOY
On 24 Mar 2005 02:35:34 -0800, rumours say that Michele Simionato [EMAIL PROTECTED] might have written: snip I am pretty much convinced I could have mastered Python at the age of nine. Of course, I cannot prove it, since when I was nine I had no computer, I did not know English, and Python was

Re: Python for a 10-14 years old?

2005-03-24 Thread Ville Vainio
Christos == TZOTZIOY Christos writes: Christos (first hw upgrade I ever did!), and one year and a half Christos later, I managed to get the Sinclair QL, with better Christos BASIC, multitasking capabilities, and something more Christos like an OS than any other home computer

Re: execfile() on file subclass or string

2005-03-24 Thread Do Re Mi chel La Si Do
Hi ! little idea : You can save the string, in temp-directory (see tempfile module), then, use execfile Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for a 10-14 years old?

2005-03-24 Thread TZOTZIOY
On 24 Mar 2005 14:50:39 +0200, rumours say that Ville Vainio [EMAIL PROTECTED] might have written: Christos == TZOTZIOY Christos writes: Christos (first hw upgrade I ever did!), and one year and a half Christos later, I managed to get the Sinclair QL, with better Christos BASIC,

Re: scrollbar dependencies

2005-03-24 Thread Marion
ok, we must redefine each canvas scroll individually ... but what a () strange language... !! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for a 10-14 years old?

2005-03-24 Thread Reinout van Schouwen
Hi, On Thu, 23 Mar 2005 [EMAIL PROTECTED] wrote: I am blessed with a *very* gifted nine-years old daughter for whom I have recently installed an old GNU/Linux Mandrake 7.2 on an equally old Pentium Pro box. FWIW. Given a reasonable amount of RAM (256MB should suffice), newer Mandrakelinux

need help with nullmailer-inject in python cgi script to send attachements ?

2005-03-24 Thread tvmaly
Due to the restrictions I have at my host, I cannot use smtplib in my email cgi script. They gave me a script they use that calls nullmailer-inject. I am trying to figure out how to add the ability to send attachments via the nullmailer-inject call. I could not find much documentation on

English to a bit of code

2005-03-24 Thread bearophileHUGS
It's still a toy, but it looks interesting. It converts in Python, Lisp and Java, and the shown image looks like Python: http://www.trnmag.com/Stories/2005/032305/Tool_turns_English_to_code_032305.html Google cache for a draft about it:

Re: Pattern matching from a text document

2005-03-24 Thread Larry Bates
Ben, Others have answered your specific questions, but I thought I'd use this opportunity to make a general statement. Unlike other programming languages, Python doesn't make its built-in functions keywords. You should never, ever, ever name a variable 'list' (the same is true of dict, tuple,

Re: Python for a 10-14 years old?

2005-03-24 Thread Jim
My kids like http://www.alice.org (although they run it under Windows). Jim Hefferon -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for a 10-14 years old?

2005-03-24 Thread moma
Well i don't know of any tutorials but i thought of a cool little assignment that might interest someone of that age assuming english is her first language. Good idea. 1) Have u noticed that whn yu raed that srcamled text luodly, it sounds like spoken by a deaf person. (because severe loss of

Re: Python for a 10-14 years old?

2005-03-24 Thread Fred Pacquier
Christos TZOTZIOY Georgiou [EMAIL PROTECTED] said : At the age of nine at school, two guys from a French computer-making company named as Loup (in french) or Lupo (in Italian), can't remember which --if either is correct--, came and gave us a demo of one of their models. OT/trivia : if it

Re: execfile() on file subclass or string

2005-03-24 Thread Fredrik Lundh
Brano Zarnovican wrote: I have a python script represented by a string. I need to execute it in a context. 'exec' does the job, but doesn't display the filename in tracebacks. 'execfile' is displaying the filename but it can only exec a script in a filesystem. I have tried: - to give exec

DBAPI Paramstyle

2005-03-24 Thread Bob Parnes
The following script is a one person's comparison of three methods for accessing a postgresql database using psycopg on a debian computer running python2.3. Following it are the results of running it six times. === from time import time, clock import psycopg MAX_COUNT =

Re: Archives and magic bytes

2005-03-24 Thread andrea
Chris Rebert (cybercobra) wrote: Have you tried the tarfile or zipfile modules? You might need to ugrade your python if you don't have them. They look pretty easy and should make this a snap. You can grab the output from the *nix file command using the new subprocess module. Good Luck - Chris

Re: looking for programmer

2005-03-24 Thread beliavsky
Peter Tyler wrote: Hi There, I'm looking for someone to write some wx/python code on a small job, but want to avoid a spam invasion. I was thinking of setting up a temp yahoo account for people to respond to. Is this the right way of going about this, or is there somewhere else I should

Re: unittest help

2005-03-24 Thread Scott David Daniels
Duncan Booth wrote: Qiangning Hong wrote: As you see, it is an OO wrapper on _extmod, which is a pyrex extension module. The question is: how to unittest this class? As the _extmod is hardware-dependent, I want to use a mock class to replace it in unit test. But how can I let myclass in

Dr. Dobb's Python-URL! - weekly Python news and links (Mar 24)

2005-03-24 Thread Cameron Laird
QOTW: [Must be seen to be believed] http://groups-beta.google.com/group/comp.lang.python/msg/7613422265cdc010 If you don't read answers, don't post questions :-/ -- bruno desthuilliers News from PyCon2005 emerges almost continuously. See, for example, this blog startpoint:

leave

2005-03-24 Thread Jaco Smuts
I will be out of the office starting 2005/03/20 and will not return until 2005/04/02. I will respond to your message when I return. This email and all contents are subject to the following disclaimer: http://www.clover.co.za/disclaimer; --

Re: DBAPI Paramstyle

2005-03-24 Thread Fredrik Lundh
Bob Parnes wrote: I must be missing something, so perhaps someone can explain the benefit of a paramstyle over the usual Python formatting style and maybe suggest a test to show it. Thanks. set the parameter to 0; DROP DATABASE template1; and see what happens. or set it to os.urandom(1000)

Re: Suggestions for a Java programmer

2005-03-24 Thread Ray
Hi Christos, Christos TZOTZIOY Georgiou wrote: On 24 Mar 2005 00:22:09 -0800, rumours say that Ray [EMAIL PROTECTED] might have written: Searching google for python for java programmers (without the quotes) produces: Python for Java programmers - Irmen's Python wiki Yes, I feel that this

Re: Suggestions for a Java programmer

2005-03-24 Thread Ray
bruno modulix wrote: These two books should help you to get a grasp of Pythonic idioms: http://www.mindview.net/Books/TIPython Will read this later. http://diveintopython.org/ I just downloaded this one and am reading it now. Thanks bruno! -- bruno desthuilliers python -c print

Re: Suggestions for a Java programmer

2005-03-24 Thread Ray
Ville Vainio wrote: Regarding a Java programmer moving to Python, a lot of the mindset change is about the abundant use of built in data types of Python. So a Java programmer, when confronted with a problem, should think how can I solve this using lists, dicts and tuples? (and perhaps also my

Re: need help with nullmailer-inject in python cgi script to send attachements ?

2005-03-24 Thread Denis S. Otkidach
On 24 Mar 2005 05:20:06 -0800 [EMAIL PROTECTED] wrote: TC Due to the restrictions I have at my host, I cannot use smtplib in TC my email cgi script. They gave me a script they use that calls TC nullmailer-inject. I am trying to figure out how to add the TC ability to send attachments via the

Convert the contents of a string into name of variable

2005-03-24 Thread Erwan VITIERE
Hello, I want to convert the contents of a string into name of variable. For example: var1=toto ... toto=5 print toto -- http://mail.python.org/mailman/listinfo/python-list

Re: need help with nullmailer-inject in python cgi script to send attachements ?

2005-03-24 Thread tvmaly
Thank you Denis Ty -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for a 10-14 years old?

2005-03-24 Thread Simon Brunning
On 23 Mar 2005 21:03:04 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is there something out there like Python for kids which would explain *basic* programming concepts in a way which is accessible and entertaining for kids aged 10-14 (that about where her brain is right now) and which

Re: embedded python example: PyString_FromString doesnt work?

2005-03-24 Thread Brano Zarnovican
Hi David ! I cannot see anything wrong on your code. So, I'm posting my working example. Hint: try to determine, why it is returning NULL (the PyErr_Print() call) BranoZ #include Python.h int main(int argc, char *argv[]) { PyObject *s; int ret; if (argc 2) return -1;

Re: Simple account program

2005-03-24 Thread Kent Johnson
Igorati wrote: ah thank you again. Anyone know of a good place to get information about TK inter. I am gonna try and make this program somewhat of a GUI. Thank you again. http://docs.python.org/lib/module-Tkinter.html http://www.pythonware.com/library/tkinter/introduction/index.htm

Re: Pattern matching from a text document

2005-03-24 Thread Ben
George Sakkis wrote: B Ben [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm currently trying to develop a demonstrator in python for an ontology of a football team. At present all the fit players are exported to a text document. The program reads the document in and

Re: Pattern matching from a text document

2005-03-24 Thread F. Petitjean
Le 24 Mar 2005 06:16:12 -0800, Ben a écrit : Below is a few sample lines. There is the name followed by the class (not important) followed by 5 digits each of which can range 1-9 and each detail a different ability, such as fitness, attacking ability etc. Finally the preferred foot is

Re: exec src in {}, {} strangeness

2005-03-24 Thread Brano Zarnovican
As Greg pointed.. g = {} exec open('t.py').read() in g, g is what you want. But you can write it also this way: exec open('t.py').read() in {} because if you specify only globals, the same dictionary is also used for locals. (locals() is used as a default only if you don't specify globals) OR

escape single and double quotes

2005-03-24 Thread Leif B. Kristensen
I'm working with a Python program to insert / update textual data into a PostgreSQL database. The text has single and double quotes in it, and I wonder: What is the easiest way to escape quotes in Python, similar to the Perlism $str =~ s/(['])/\\$1/g;? I tried the re.escape() method, but it

Re: Convert the contents of a string into name of variable

2005-03-24 Thread Fredrik Lundh
Erwan VITIERE wrote: I want to convert the contents of a string into name of variable. For example: var1=toto ... toto=5 print toto why? Python works better if you use it to write Python code. the Python solution is to use a dictionary: key1 = toto data = {} data[toto] = 5

Re: execfile() on file subclass or string

2005-03-24 Thread Brano Zarnovican
exec compile(code, filename, exec) Thanks for the tip! Works great! BranoZ -- http://mail.python.org/mailman/listinfo/python-list

Re: Save passwords in scripts

2005-03-24 Thread beaststwo
I had a similar problem a few years ago and decided that if I really had to store passwords, I could at least make them a bit harder to get at. I was using a the ConfigParser module to store other info in a config file, so I added entries for the UserID and password to the config file, as well as

Re: Getting the word to conventional programmers

2005-03-24 Thread beliavsky
Terry Reedy wrote: Cameron Laird [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] *DevSource* profiles The State of the Scripting Universe in URL: http://www.devsource.com/article2/0,1759,1778141,00.asp . Interesting quote from Guido: If the same effort were poured into speeding

Re: Python for a 10-14 years old?

2005-03-24 Thread El Pitonero
Lucas Raab wrote: [EMAIL PROTECTED] wrote: I am blessed with a *very* gifted nine-years old daughter... Now, I would like to teach her programming basics using Python Let her mess around with it on her own. I'm 15 and have been using Python for 2-3 years and had nothing to really go on.

Re: escape single and double quotes

2005-03-24 Thread Damjan
I'm working with a Python program to insert / update textual data into a PostgreSQL database. The text has single and double quotes in it, and I wonder: What is the easiest way to escape quotes in Python, similar to the Perlism $str =~ s/(['])/\\$1/g;? I tried the re.escape() method, but it

Re: IronPython 0.7 released!

2005-03-24 Thread Benjamin Niemann
Ville Vainio wrote: Robin == Robin Becker [EMAIL PROTECTED] writes: Robin well that's nice, but I don't do blogs and certainly don't You don't need to do much - just go to planetpython.org Or check out the Daily Python URL (http://www.pythonware.com/daily/) which has a pretty high

Re: escape single and double quotes

2005-03-24 Thread Jiri Barton
Hey there, str.replace('', '\\').replace(', \\') HTH, jbar -- http://mail.python.org/mailman/listinfo/python-list

Re: string join() method

2005-03-24 Thread Damjan
but perhaps the webserver sanitizes the output of CGI script and converts plain \n into \r\n Yes apache does this, since it adds its own headers anyway it will replace all '\n' in the headers with '\r\n' and '\n\n' with '\r\n\r\n'. -- damjan --

Why is a JIT compiler faster than a byte-compiler

2005-03-24 Thread RickMuller
I was talking to a friend of mine about the speed of Python code. One of the questions that came up was why is a JIT compiler like Psyco faster than the Python byte-compiler? I understand why languages like Pyrex are faster, since they set static types that the compiler can use to optimize. But

Re: escape single and double quotes

2005-03-24 Thread Leif B. Kristensen
Damjan skrev: You don't need to escape text when using the Python DB-API. DB-API will do everything for you. For example: SQL = 'INSERT into TEMP data = %s' c.execute(SQL, text containing ' and ` and all other stuff we might read from the network) You see, the SQL string contains

(no subject)

2005-03-24 Thread python-list-bounces+archive=mail-archive . com
#! rnews 2393 Newsgroups: comp.lang.python Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp From: Harry George [EMAIL PROTECTED] Subject: Re: Getting the word to conventional

Re: Win 32 - VB, Ruby, Perl VS Python with fireEvent

2005-03-24 Thread calfdog
Roger, Thank you so much! I have been pulling my hair out over this! Rob. Roger Upole wrote: I don't know why case would make a difference, but if I change the fireevent call to FireEvent, it works on XP sp2. It also works if you generate the makepy wrappers (probably because that forces

Re: possible bug?

2005-03-24 Thread Earl Eiland
There may be different ways to code it. This works. The problem is that occasionally somehow, WinRK terminates without terminating the process, or at least Python doesn't pick up the return code. It turns out that using poll() instead of wait() only reduces the error frequency, and allows me to

An Abridged Python Tutorial

2005-03-24 Thread Michael Spencer
An Abridged Python Tutorial There are tips for the novice and tricks that will add to your programming kicks. But the cardinal rule that you must learn at school is that spaces and tabs never mix. If there's syntax you don't understand, assistance is always at hand: a glance at the

ANN: Twisted version 2.0

2005-03-24 Thread Christopher Armstrong
http://twistedmatrix.com/ TASMANIA (DP) -- Found on the Internet on 2005-03-22 by an anonymous programmer, Twisted 2.0 was obtained by local authorities and kept isolated for public safety and further study. On 2005-03-25, however, nano-probes were released from the package's surface and

Re: Convert the contents of a string into name of variable

2005-03-24 Thread Erwan VITIERE
Because i don't want to use this syntax because it is too long, I want a direct access : Not : DicoUser['TOTO'].DicoTable.['MY_TABLE'].DicoLabel.['MY_LABEL'] = for exemple Finally, i want to use : TOTO.MY_TABLE.MY_LABEL = for exemple Fredrik Lundh [EMAIL PROTECTED] a écrit dans le message

Re: Why is a JIT compiler faster than a byte-compiler

2005-03-24 Thread dodoo
http://www-900.ibm.com/developerworks/cn/linux/sdk/python/charm-28/index_eng.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is a JIT compiler faster than a byte-compiler

2005-03-24 Thread RickMuller
Thanks for the link. That completely answers my question. -- http://mail.python.org/mailman/listinfo/python-list

Re: Anonymus functions revisited : tuple actions

2005-03-24 Thread George Sakkis
Kay Schluehr [EMAIL PROTECTED] wrote: [snipped] Wouldn't it be fun to use in Python? Only drawback: does not look like executable pseudo-code anymore :( Regards Kay I don't know if it would be fun, but it certainly doesn't look accessible to mere mortals :-) I'm not sure if the mind

Re: Python limericks (was Re: Text-to-speech)

2005-03-24 Thread smitty_one_each
Michael Spencer wrote: How about a category for executable limericks? Here's one to get the ball rolling: # voice only the alphanumeric tokens from itertools import repeat for feet in [3,3,2,2,3]: print .join(DA-DA-DUM for dummy in [None] for foot in repeat(metric, feet))

Re: possible bug?

2005-03-24 Thread Peter Hansen
Earl Eiland wrote: There may be different ways to code it. This works. You're right about that, *as the code now stands*. The danger is that you are using single backslashes. The *only* reason this works right now is because none of the characters you have following those backslashes happen to

Re: An Abridged Python Tutorial

2005-03-24 Thread George Sakkis
Michael Spencer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] An Abridged Python Tutorial There are tips for the novice and tricks that will add to your programming kicks. But the cardinal rule that you must learn at school is that spaces and tabs never mix. If

Bug in threading.Thread.join() ?

2005-03-24 Thread Peter Hansen
I'm still trying to understand the behaviour that I'm seeing but I'm already pretty sure that it's either a bug, or something that would be considered a bug if it didn't perhaps avoid even worse behaviour. Inside the join() method of threading.Thread objects, a Condition named self.__block is

Re: escape single and double quotes

2005-03-24 Thread Scott David Daniels
Leif B. Kristensen wrote: Damjan skrev: For example: SQL = 'INSERT into TEMP data = %s' c.execute(SQL, text containing ' and ` and all other stuff we might read from the network) Sure, but does this work if you need more than one placeholder? Yup. FWIW, here's the whole script. It will fetch

Re: Python for a 10-14 years old?

2005-03-24 Thread Scott David Daniels
Christos TZOTZIOY Georgiou wrote: For example, one could issue the following *single* instruction: MOVE.L ($18000), ($18004) But the cost of that design is that the machine state becomes more complicated -- the instruction has to have two distinct memory ops. Usually this means there is a

Data types

2005-03-24 Thread waqar
What are the user defined types in Python? Can we call lists, tuples dictionaries user-defined data types? -- http://mail.python.org/mailman/listinfo/python-list

Re: Anonymus functions revisited

2005-03-24 Thread Ron
On 24 Mar 2005 09:20:52 GMT, Duncan Booth [EMAIL PROTECTED] wrote: Ron wrote: A working makeVars seems not to be different from def makeVars(**nameVals): globals().update(nameVals) Not quite. If Ron can come up with a working makeVars it would update the caller's globals whereas what

Re: string join() method

2005-03-24 Thread Kent Johnson
Derek Basch wrote: Can anyone tell me why this CGI code outputs a blank page? Maybe because it needs a blank line between the header and the body? self.output = [] self.setContentType(text/plain) ascii_temp.seek(0) self.output.extend(ascii_temp.read())

Re: Getting the word to conventional programmers

2005-03-24 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: . . . Maybe companies such as Intel, IBM, and Sun would devote resources to optimizing Python on their hardware if the language had an ISO standard, as do C, C++, and

Re: escape single and double quotes

2005-03-24 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Leif B. Kristensen wrote: Damjan skrev: You don't need to escape text when using the Python DB-API. DB-API will do everything for you. For example: SQL = 'INSERT into TEMP data = %s' c.execute(SQL, text containing ' and ` and all other stuff we might read

Re: Data types

2005-03-24 Thread Lonnie Princehouse
Lists, tuples, and dictionaries are built-in types. Classes are the mechanism for user-defined types in Python. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >