Re: urllib2 on Windows Vista

2006-07-10 Thread Martin v. Löwis
Sriram Krishnan wrote: > I'm running Python 2.4.3 on Windows Vista June CTP. I'm not able to > open any site using the urllib2 and related family of modules I think you need to break the error further down. Try httplib instead of urllib, and see what connect does. Then break this down into socket

Re: threading troubles

2006-07-10 Thread [EMAIL PROTECTED]
sreekant wrote: > Hi folks > > What am I doing wrong in the following? I just want to run fluidsynth in > the background. Others have pointed you at os.popen. In non-crippled languages, use processes (e.g. popen) when you wish to preserve the years of hard work that OS designers put into protecte

Re: Accessors in Python (getters and setters)

2006-07-10 Thread ZeD
Bruno Desthuilliers wrote: >> I decided to change the name of an attribute. Problem is I've used the >> attribute in several places spanning thousands of lines of code. If I >> had encapsulated the attribute via an accessor, I wouldn't need to do >> an unreliable and tedious search and replace > f

Re: What is a type error?

2006-07-10 Thread Marshall
Joachim Durchholz wrote: > Marshall schrieb: > > Joachim Durchholz wrote: > >> Chris Smith schrieb: > >>> For example, I wrote that example using variables of type int. If we > >>> were to suppose that we were actually working with variables of type > >>> Person, then things get a little more comp

Python WSDL Generation Tools

2006-07-10 Thread Vedanta Barooah
Hello All,I am using Zolera SOAP Infrastructure (ZSI) to create SOAP services and I know to bind it with a WSDL proxy. Are there any wsdl generation tools avaible in python? Thanks for any links and pointersRegards, Vedanta -- http://mail.python.org/mailman/listinfo/python-list

Re: language design question

2006-07-10 Thread Bryan
Fredrik Lundh wrote: > Bryan wrote: > >> could you get the same result by putting these methods in base > > class object that everything subclasses? > > and how do you make sure that everything subclasses this base class ? > > > in this hypothetical case, i was assuming len() would be put in

Re: how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread yichao.zhang
MacDonald Thanks! John Now I know how silly a question that is ! However I'll be not so silly thanks to your help ! I'll follow your suggestions! That's very nice. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-10 Thread Chris Smith
David Hopwood <[EMAIL PROTECTED]> wrote: > Maybe I'm not understanding what you mean by "complete". Of course any > type system of this expressive power will be incomplete (whether or not > it can express conditions 3 to 5), in the sense that it cannot prove all > true assertions about the types of

Re: What is a type error?

2006-07-10 Thread Marshall
David Hopwood wrote: > Jürgen Exner wrote: > > David Hopwood wrote: > > [...] > > > > There is no such error message listed in 'perldoc perldiag'. > > Please quote the actual text of your error message and include the program > > that produced this error. > > Then people here in CLPM may be able to

Re: 3d simulation

2006-07-10 Thread placid
Erik Max Francis wrote: > alimoe wrote: > > >> Genetic Programming or Genetic Algorithms? > > > > whats the difference? > > Genetic algorithms usually involve the manipulation of bit strings. Where bit strings is the the "dna" and each bit in the string represents some value -- http://mail.pyth

Re: 3d simulation

2006-07-10 Thread Erik Max Francis
alimoe wrote: >> Genetic Programming or Genetic Algorithms? > > whats the difference? Genetic algorithms usually involve the manipulation of bit strings. Genetic programming usually involves more program-like constructs, such as Lisp s-expressions. -- Erik Max Francis && [EMAIL PROTECTED] &&

Re: how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread John Machin
On 11/07/2006 12:32 PM, yichao.zhang wrote: > I'm trying to match the characters from u'\uff00' to u'\uff0f'. > the code below and get a TypeError. > p = re.compile(u'\uff00'-u'\uff0f') That is not a valid regex. It is an attempt to subtract one unicode char from another, but this is (correctly)

Re: how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread MacDonald
yichao.zhang wrote: > I'm trying to match the characters from u'\uff00' to u'\uff0f'. > the code below and get a TypeError. > p = re.compile(u'\uff00'-u'\uff0f') > Traceback (most recent call last): > File "", line 1, in ? > TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode' >

Re: 3d simulation

2006-07-10 Thread Carl Banks
alimoe wrote: > I am interested in coding an app which uses physics and 3d and neural > nets and genetics. Any pointers? PyODE for the physics part. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread yichao.zhang
I'm trying to match the characters from u'\uff00' to u'\uff0f'. the code below and get a TypeError. p = re.compile(u'\uff00'-u'\uff0f') Traceback (most recent call last): File "", line 1, in ? TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode' so re module does NOT support th

Re: What is a type error?

2006-07-10 Thread David Hopwood
Jürgen Exner wrote: > David Hopwood wrote: > [...] > > There is no such error message listed in 'perldoc perldiag'. > Please quote the actual text of your error message and include the program > that produced this error. > Then people here in CLPM may be able to assist you. Yes, I'm well aware t

Re: What is a type error?

2006-07-10 Thread David Hopwood
Chris Smith wrote: > David Hopwood <[EMAIL PROTECTED]> wrote: > >>1 and 2 are easy enough. 3 to 5 are best expressed as assertions rather >>than types. > > One of us is missing the other's meaning here. If 3 to 5 were expressed > as assertions rather than types, then the type system would becom

Re: 3d simulation

2006-07-10 Thread placid
alimoe wrote: > I will create a "robot" that crawls over terrain that looks like the > picture here: > > http://pygp.sourceforge.net/index.php3?name=runs is this a real robot or a computer simulation? -- http://mail.python.org/mailman/listinfo/python-list

Re: 3d simulation

2006-07-10 Thread placid
alimoe wrote: > > Genetic Programming or Genetic Algorithms? > > whats the difference? Genetic Programming: is an automated methodology inspired by biological evolution to find computer programs that best perform a user-defined task. http://en.wikipedia.org/wiki/Genetic_Programming Genetic Alg

Re: What is a type error?

2006-07-10 Thread Chris Smith
David Hopwood <[EMAIL PROTECTED]> wrote: > 1 and 2 are easy enough. 3 to 5 are best expressed as assertions rather > than types. One of us is missing the other's meaning here. If 3 to 5 were expressed as assertions rather than types, then the type system would become incomplete, requiring frequ

Re: What is a type error?

2006-07-10 Thread J�rgen Exner
David Hopwood wrote: [...] There is no such error message listed in 'perldoc perldiag'. Please quote the actual text of your error message and include the program that produced this error. Then people here in CLPM may be able to assist you. jue -- http://mail.python.org/mailman/listinfo/pyth

Re: 3d simulation

2006-07-10 Thread alimoe
I will create a "robot" that crawls over terrain that looks like the picture here: http://pygp.sourceforge.net/index.php3?name=runs -- http://mail.python.org/mailman/listinfo/python-list

Re: 3d simulation

2006-07-10 Thread alimoe
> Genetic Programming or Genetic Algorithms? whats the difference? -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-10 Thread David Hopwood
Chris Smith wrote: > At the same time, though, maybe I do want > the compiler to infer that tax cannot be negative (or maybe it can; I'm > not an accountant; I know my tax has never been negative), [...] Tax can be negative, e.g. when a business is claiming back VAT (sales tax) on its purchases,

Re: What is a type error?

2006-07-10 Thread David Hopwood
Chris Smith wrote: > I <[EMAIL PROTECTED]> wrote: > >>Incidentally, I'm not saying that such a feature would be a good idea. I don't think it would be a bad idea. Silently giving incorrect results on arithmetic overflow, as C-family languages do, is certainly a bad idea. A type system that suppor

Re: Full splitting of a file's pathname

2006-07-10 Thread Simon Forman
BartlebyScrivener wrote: > I don't know if it's "standard," but why not just: > > dir = './foo/bar/moo/lar/myfile.txt' > dir.split('/') > > ['.', 'foo', 'bar', 'moo', 'lar', 'myfile.txt'] > > rd There's also os.path.sep, from the docs: "The character used by the operating system to separate pathna

Re: 3d simulation

2006-07-10 Thread placid
alimoe wrote: > I am interested in coding an app which uses physics and 3d and neural > nets and genetics. Any pointers? Open GL Python programming http://www.google.com/search?hl=en&rls=GGGL,GGGL:2006-22,GGGL:en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=opengl+python&spell=1 http://pyopengl.sour

Re: help a newbie with a IDE/book combination

2006-07-10 Thread Don Taylor
kilnhead wrote: > I have used spe and pyscripter on windows. I currently use Eclipse and > this it is the best of the lot in terms of functionality. However, it > does take some effort to get comfortable with. I only wish it had a GUI > builder for python. > I have found that wxGlade plays nicely

3d simulation

2006-07-10 Thread alimoe
I am interested in coding an app which uses physics and 3d and neural nets and genetics. Any pointers? -- http://mail.python.org/mailman/listinfo/python-list

Re: Global "except" condition

2006-07-10 Thread Simon Forman
Ernesto wrote: > Within the scope of one Python file (say myFile.py), I'd like to print > a message on ANY exception that occurs in THAT file, dependent on a > condition. > > Here's the pseudocode: > > if anyExceptionOccurs(): > if myCondition: > print "Here's my global exception

Re: mod_python fails to load under wamp

2006-07-10 Thread Luis M. González
Gaurav Agarwal wrote: > Hi, > > Am using WAMP5 and python 2.4.3. I tried to install mod_python 3.2.5 > for python2.4. When i tried starting wamp, Firstly there was no error > message in the apache error log. I saw error message in windows event > viewer : > > "The Apache service named Apache.exe re

Global "except" condition

2006-07-10 Thread Ernesto
Within the scope of one Python file (say myFile.py), I'd like to print a message on ANY exception that occurs in THAT file, dependent on a condition. Here's the pseudocode: if anyExceptionOccurs(): if myCondition: print "Here's my global exception message" Is this functionalit

Re: simulate enumerate in python 2.1

2006-07-10 Thread John Machin
On 11/07/2006 2:30 AM, [EMAIL PROTECTED] wrote: > hi, > i am using python 2.1. Can i use the code below to simulate the > enumerate() function in 2.3? I'm bemused, boggled and bamboozled -- and that's just *one* letter of the alphabet ... You are using Python 2.1, and you felt it necessary to as

Re: function that modifies a string

2006-07-10 Thread Steven D'Aprano
On Mon, 10 Jul 2006 19:30:09 +0200, Diez B. Roggisch wrote: [snip] > So: Yes, mutable strings are dangerous. I'm sorry, perhaps I'm being slow today, but just why are they dangerous? More dangerous than, say, mutable lists and mutable dicts? Unless I'm missing something, the worst that can hap

Re: About __files

2006-07-10 Thread Fredrik Lundh
venkat pathy wrote: > I came across a series of functions starting with "__". For > example, __fun() . May I know what are all these functions ? > I came across __init__ like functions starting and ending with "__". > Whether they are constructors which are overloaded ? reading the do

Re: Tkinter binding and keyboard hardware settings (WinXP)

2006-07-10 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Hello, > > I have created a simple canvas in Tkinter to display a number of > PhotoImages, I then bind a key (in my case, ) to start a loop that > plays through a list of PhotoImages to make it an animation of sorts. > What I noticed is, after holding down the key for a

Python setup script problem

2006-07-10 Thread John Ling
Hello, I have been trying to install an application which requires Python: http://chip.dfci.harvard.edu/~wli/MAT/ My environment is AIX 5.2. Below is the section of the setup that has failed, which BTW works fine on Fedora 5. I suspect it has to do with Python on AIX and/or the setup.py script.

Re: Howto or Tutorial for tokenize module for a newbie?

2006-07-10 Thread John J. Lee
"TY" <[EMAIL PROTECTED]> writes: > Can someone point me to a Howto or Tutorial for tokenize module for a > newbie? I read the documentation but it doesn't have a lot of info... Here's a simple example: http://groups.google.com/group/comp.lang.python/msg/e84e36ad10d78303 John -- http://mail.p

syslog best practices -- when to call closelog?

2006-07-10 Thread J Rice
I have a question: When should syslog.closelog() be called? I have a daemon that spends most of its time asleep and quiet, but writes messages to the mail log when active. Should I open the log at the start and keep it open until the program closes? This seems much simpler than issuing three c

Tkinter binding and keyboard hardware settings (WinXP)

2006-07-10 Thread apriebe47
Hello, I have created a simple canvas in Tkinter to display a number of PhotoImages, I then bind a key (in my case, ) to start a loop that plays through a list of PhotoImages to make it an animation of sorts. What I noticed is, after holding down the key for a certain time, it would not loop throu

Re: Restricted Access

2006-07-10 Thread iapain
Tim Chase wrote: > If you're prepared for the massive breakage that will ensue, you can > > chmod go-rwx /usr/lib/python2.3/os.* No, I cant change permission or delete the module, the best would be something to detect 'import os' in user code .. but If i go with chroot jail approch then ever

Re: xml aggregator

2006-07-10 Thread Fredrik Lundh
kepioo wrote: > Hi all, > > I am trying to write an xml aggregator, but so far, i've been failing > miserably. > > what i want to do : > > i have entries, in a list format :[[key1,value],[key2,value],[ > key3,value]], value] > > example : > [["route","23"],["equip","jr2"],["time","3pm"]],"my fi

Re: How properly manage memory of this PyObject* array?? (C extension)

2006-07-10 Thread John Machin
On 11/07/2006 4:39 AM, [EMAIL PROTECTED] wrote: >>> Q2: Must I do free(my_array); at end of function?? >> unless some other part of your program holds on to it > > F. > > Thanks! If I understand you correctly then I never have > to do free(my_array); because all the elements > of my_array are st

Re: Restricted Access

2006-07-10 Thread Tim Chase
> 1. How can i disable some of the modules without deleting. e.g I wish > to disable "os" module. If you're prepared for the massive breakage that will ensue, you can chmod go-rwx /usr/lib/python2.3/os.* (assuming *nix as you later detail). > 2. How can i force user code to access only

Re: Python-2.5beta1 crash

2006-07-10 Thread Robin Becker
Terry Reedy wrote: . > Your choice, of course, but if the import succeeded, I personally would > have runAll verbosely print testfile names before running them and then do > a binary or trinary search to pin down the offending statement. good points and a good idea. I'll try and pin down fir

Re: wxpython: how does EVT_IDLE work?

2006-07-10 Thread Rob Williscroft
John Salerno wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Quick question about the code below: I understand why the progress bar > fills up at a steady pace when the mouse is idle over the frame; but > why, when you move the mouse, does the progress bar speed up? Shouldn't > it stop

Re: cheetah.

2006-07-10 Thread Tavis . Rudd
Hi Chun, you should post this to the cheetah mailing list rather than here. https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss Cheers, Tavis chun ping wang wrote: > I am having trouble using cheetah and getting it to work the way i want > (mvc) > > I have the following file. >

Re: Py_NewInterpreter(), is this a bug in the python core?

2006-07-10 Thread freesteel
Yes, I see that now in the documentation, which to me is quite confusing. So, how do you use python in a multithreaded environment, where for example you want to run some embeded python code from a number of different C threads? This article: http://www.linuxjournal.com/article/3641 is quite good,

Re: free python hosting !

2006-07-10 Thread Luis M. González
John Salerno wrote: > John Salerno wrote: > > Bayazee wrote: > > > >> i want a free hosting for python . > >> so i can make my scripts and upload to server . > >> i want to use mod_python ... > > > > good luck with that... > > p.s. you might look into http://dollar-hosting.org/ > > it's very cheap

Re: unistall python mechanize

2006-07-10 Thread John J. Lee
"bruce" <[EMAIL PROTECTED]> writes: > hi.. > > i'm trying to figure out how to uninstall "mechanize". i don't see an > "unistall" from the "python --help-commands" function... > > i'm looking to rebuild/reinstall mechanize from the svn repos to try to see > if an apparent parsing issue that i me

Re: wxpython: how does EVT_IDLE work?

2006-07-10 Thread John Salerno
John Salerno wrote: > Ok, now I'm really confused. I just ran the code again and this time it > *doesn't* increase the progress bar when the mouse is idle, and it only > increases when I move it. This wasn't the behavior just a few minutes > ago, and I didn't change anything! What's going on?

Re: wxpython: how does EVT_IDLE work?

2006-07-10 Thread John Salerno
John Salerno wrote: > Quick question about the code below: I understand why the progress bar > fills up at a steady pace when the mouse is idle over the frame; but > why, when you move the mouse, does the progress bar speed up? Shouldn't > it stop completely until the mouse is idle again? Ok, n

Re: re question

2006-07-10 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Schüle Daniel <[EMAIL PROTECTED]> wrote: >Hello, > >consider the following code > > >>> re.search("[a-z](?i)[a-z]","AA") ><_sre.SRE_Match object at 0x40177e20> > >this gives a match >if we provide an extra group for the first character it still works > > >>> re.sear

Restricted Access

2006-07-10 Thread iapain
I'm developing a webIDE for python and I've 2 questions regarding it. 1. How can i disable some of the modules without deleting. e.g I wish to disable "os" module. 2. How can i force user code to access only his particular folder, I dont want to create uses in unix, e.g fp = open(PATH, 'w') # If

Re: Web Browser Pygame Plug-in?

2006-07-10 Thread Ravi Teja
Gregory Piñero wrote: > That's interesting, Ben. So we'd be better off making a new library > similiar to Pygame in functionality but designed from the ground up to > work in a browser. In open source community, that would be YOU since you are the one with the need :-). Maybe you can make "Python

Re: threading troubles

2006-07-10 Thread sreekant
Hi there I tried as advised. Now the function gets called only after I hit quit button which calls gtk.main_quit() at which point, the ui stays on but not responsive, while the fluidsynth runs in the fg, then ui disappears as the fluidsynth finishes and presumably the thread dies. xc = thread

Re: Mechanize/Browser question

2006-07-10 Thread John J. Lee
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > bruce schrieb: > > hi... > > i can do the following > > br = Browser > > br.open("www.yahoo.com") > > br.open("file:///foo") > > but can i do > > s = "..." qualified html text > > br.open(s) > > i'm curious, if i have html from some

Re: [wwwsearch-general] ClientForm request re ParseErrors

2006-07-10 Thread John J. Lee
"bruce" <[EMAIL PROTECTED]> writes: > hi john... [...] I'll be answering all these posts of bruce's on [EMAIL PROTECTED] -- I don't think c.l.py is the right place. John -- http://mail.python.org/mailman/listinfo/python-list

wxpython: how does EVT_IDLE work?

2006-07-10 Thread John Salerno
Quick question about the code below: I understand why the progress bar fills up at a steady pace when the mouse is idle over the frame; but why, when you move the mouse, does the progress bar speed up? Shouldn't it stop completely until the mouse is idle again? Also, on a side note, I'm confuse

Re: free python hosting !

2006-07-10 Thread John Salerno
John Salerno wrote: > Bayazee wrote: > >> i want a free hosting for python . >> so i can make my scripts and upload to server . >> i want to use mod_python ... > > good luck with that... p.s. you might look into http://dollar-hosting.org/ it's very cheap and supposedly supports mod_python, alth

Re: Howto or Tutorial for tokenize module for a newbie?

2006-07-10 Thread sreekant
TY wrote: > Hi, > > Can someone point me to a Howto or Tutorial for tokenize module for a > newbie? I read the documentation but it doesn't have a lot of info... > Thanks! > Hi there I don't know if I got your requirement. But I used a own version of tokenizer which can use more than one deli

Re: free python hosting!

2006-07-10 Thread Bayazee
Thanx !! - www.python.ir --> Persian Python Community ! -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric/numpy/numarray

2006-07-10 Thread Robert Kern
Terry Reedy wrote: > "Alex Martelli" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I'll voice a heretic thought: me, I'm sticking with good old Numeric >> until the situation with the newer packages settles down. > > Not much of a heresy, I think. The numpy site recommends tha

PKCS7 padding implementation in Python

2006-07-10 Thread Satchidanand Haridas
Hi,Do any of the cryptographic modules for Python support PKCS7 padding scheme? I would like to use this scheme with block cipher encryption algorithms to pad text whose length is less than a proper block size.  thanks in advance,Satchit -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric/numpy/numarray

2006-07-10 Thread Terry Reedy
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'll voice a heretic thought: me, I'm sticking with good old Numeric > until the situation with the newer packages settles down. Not much of a heresy, I think. The numpy site recommends that *new* users start with nu

Re: free python hosting!

2006-07-10 Thread tac-tics
I provide the link below with the conditions that you don't put spaces between your sentences and the periods which terminate them. http://wiki.python.org/moin/PythonHosting -- http://mail.python.org/mailman/listinfo/python-list

Re: xml aggregator

2006-07-10 Thread Gerard Flanagan
kepioo wrote: > Thank you so much, it works and it rocks ! > Great! Glad I could help. > bad thing i need ot figure out is why mozilla cannot parse my xsl > sheet, but it works in IE ( most of my users are using IE) > you could try transforming the xml on the server and send straight HTML to th

Re: Py_NewInterpreter(), is this a bug in the python core?

2006-07-10 Thread Thomas Heller
freesteel schrieb: > /* > Is this a bug in Py_NewInterpreter? > > The function below "MyThread" is instantiated from a windows worker > thread, but I don't > think that is relevant. > (I can try this on a linux box, but I would have to compile a python > library with debugging > enabled.) > > The

Re: How properly manage memory of this PyObject* array?? (C extension)

2006-07-10 Thread [EMAIL PROTECTED]
> > Q2: Must I do free(my_array); at end of function?? > unless some other part of your program holds on to it F. Thanks! If I understand you correctly then I never have to do free(my_array); because all the elements of my_array are still being used and appended to other structures elsewhere ri

About __files

2006-07-10 Thread venkat pathy
Hi all,  I came across a series of functions starting with "__". For example, __fun() . May I know what are all these functions ? I came across __init__ like functions starting and ending with "__". Whether they are constructors which are overloaded ? -- http://mail.python.org/mailman/list

Re: Running multiple versions of Python on the same host..

2006-07-10 Thread olsongt
Cowmix wrote: > For my day job I am forced to run RHEL3 (and Centos3 on my desktop). I > want to be able to use a few applications that require Python 2.4.X but > RHEL3 ships with Python 2.2.3. I have tried to install and upgrade > Python 2.4.X many ways like using PyVault and doing a source based

Re: simulate enumerate in python 2.1

2006-07-10 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi, > i am using python 2.1. Can i use the code below to simulate the > enumerate() function in 2.3? If not, how to simulate in 2.1? > thanks > > from __future__ import generators > def enumerate(sequence): >index = 0 >for item

Re: Python-2.5beta1 crash

2006-07-10 Thread Terry Reedy
"Robin Becker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm testing ReportLab against Python-2.5beta1 and am getting some kind of > problem as below No kidding;-). Based on incomplete knowledge, I will try to make some helpful comments. > ===

Howto or Tutorial for tokenize module for a newbie?

2006-07-10 Thread TY
Hi, Can someone point me to a Howto or Tutorial for tokenize module for a newbie? I read the documentation but it doesn't have a lot of info... Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: function that modifies a string

2006-07-10 Thread Diez B. Roggisch
>>> Arrays of chars are dangerous. If you insist, use Python lists of >>> Python "chars" (strings of length 1). >> Why are they more dangerous than a self-written mutable string? > > I didn't say that. I meant that arrays in the C++ sense are dangerous. So what? Python's arrays are backed by arra

Python for modem App

2006-07-10 Thread Bayazee
hi i want to write a program with python that can listen to modem and accept a dial in connection then i can play a sound or send voice to caller & can assess user enterd keys how i can send a voice format via modem that caller can hear it .. !? -- http://mail.python.org/mailman/listinfo/pyt

Re: free python hosting !

2006-07-10 Thread John Salerno
Bayazee wrote: > i want a free hosting for python . > so i can make my scripts and upload to server . > i want to use mod_python ... good luck with that... -- http://mail.python.org/mailman/listinfo/python-list

free python hosting !

2006-07-10 Thread Bayazee
hi i want a free hosting for python . so i can make my scripts and upload to server . i want to use mod_python ... - www.python.ir --> Persian Python Community ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Mechanize/Browser question

2006-07-10 Thread Diez B. Roggisch
bruce schrieb: > hi... > > i can do the following > br = Browser > br.open("www.yahoo.com") > br.open("file:///foo") > > but can i do > s = "..." qualified html text > br.open(s) > > i'm curious, if i have html from someother source, is there a way to simply > get it into the "B

Re: prompt auto complete and history

2006-07-10 Thread Matt Good
Deepan Chakravarthy wrote: > Hi, > I am using fedora core 5. I would like to have auto complete in python > prompt and history. How do i get it enabled ? The standard Python commandline does not support auto complete. IPython is a very nice alternative commandline that does suport auto complete

Re: What is a type error?

2006-07-10 Thread Darren New
Chris Smith wrote: > If you wish to say "typestate" to mean this, be my guest. It is also > correct to say "type". Sure. I just wasn't sure everyone here was aware of the term, is all. It makes it easier to google if you have a more specific term. > I'm not aware of a widely used language that

Re: What is a type error?

2006-07-10 Thread Chris Smith
Darren New <[EMAIL PROTECTED]> wrote: > Chris Smith wrote: > > // Inside this block, a has type int{17..21} and b has type > > // int{18..22} > > No what happens if right here you code >b := 16; > > Does that again change the type of "b"? Or is that an illegal > instruction,

prompt auto complete and history

2006-07-10 Thread Deepan Chakravarthy
Hi, I am using fedora core 5. I would like to have auto complete in python prompt and history. How do i get it enabled ? i have .pystart file and .pyhist file setup. thanks Deepan www.sudoku-solver.net/sudokusolver.html www.codeshepherd.com -- http://mail.python.org/mailman/listinfo/python

Re: function that modifies a string

2006-07-10 Thread Fredrik Lundh
tac-tics wrote: > I didn't say that. I meant that arrays in the C++ sense are dangerous. so what do you think Python's string type uses on the inside ? > C++ offers pass by value options. That makes it so you never need to > worry about messing up data that doesn't belong to you unless you > exp

Re: language design question

2006-07-10 Thread Steve Holden
Terry Reedy wrote: > "OKB (not okblacke)" <[EMAIL PROTECTED]> wrote in message [...] > > The underlying answer to the original question is that while Pyt;hon is > object-based, it is not strictly OO but is intentionally multiparadigmatic > and will remain so. For instance, no one will be force

Re: What is a type error?

2006-07-10 Thread Chris Smith
Marshall <[EMAIL PROTECTED]> wrote: > It's never been a strong point. Made worse now that my daughter > is one of those up-at-the-crack-of-dawn types, and not old enough > to understand why it's not nice to jump on mommy and daddy's > bed while they're still asleep. But aren't you actually a time z

mechanize select_form issue..

2006-07-10 Thread bruce
hi... update to an ongoing issue i've been having regarding html/Browser and selecting forms. i've created a basic test app, and created a stripped down page of html. the html has a single form. i get the following error: fname = main the app can find the frame from the XPath... Tracebac

Re: Augument assignment versus regular assignment

2006-07-10 Thread Terry Reedy
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I disagree. The += version only evaluates the index once, but still has > to find the object twice. No it does not *have* to find the object twice and no it does *not* find the object twice. From the viewpoint of the

Re: function that modifies a string

2006-07-10 Thread tac-tics
> >> What's wrong about arrays of chars? > > > > Arrays of chars are dangerous. If you insist, use Python lists of > > Python "chars" (strings of length 1). > > Why are they more dangerous than a self-written mutable string? I didn't say that. I meant that arrays in the C++ sense are dangerous.

simulate enumerate in python 2.1

2006-07-10 Thread eight02645999
hi, i am using python 2.1. Can i use the code below to simulate the enumerate() function in 2.3? If not, how to simulate in 2.1? thanks from __future__ import generators def enumerate(sequence): index = 0 for item in sequence: yield index, item index += 1 -- http://mail.p

Re: language design question

2006-07-10 Thread Steven Bethard
Paul Rubin wrote: > Steven Bethard <[EMAIL PROTECTED]> writes: >> If len() were a method of string objects, you could try using the >> unbound method and writing this as:: >> >> >>> sorted(['aaa', 'bb', 'c'], key=str.len) >> ['c', 'bb', 'aaa'] >> >> But then your code would break on lists

Re: language design question

2006-07-10 Thread Steven Bethard
Bryan wrote: > Steven Bethard wrote: > >> The advantage of a functional form over a method shows up when you >> write a function that works on a variety of different types. Below are >> implementations of "list()", "sorted()" and "join()" that work on any >> iterable and only need to be defined

Re: What is a type error?

2006-07-10 Thread Darren New
Chris Smith wrote: > // Inside this block, a has type int{17..21} and b has type > // int{18..22} No what happens if right here you code b := 16; Does that again change the type of "b"? Or is that an illegal instruction, because "b" has the "local type" of (18..22)? >

Re: multithreading windows and embedding python

2006-07-10 Thread freesteel
freesteel wrote: ... > pThread[ih] = AfxBeginThread(MyThread, mainThreadState, > THREAD_PRIORITY_NORMAL, CREATE_SUSPENDED); ... Here the call to AfxBeginThread is wrong, there is one argument missing, it should be: pThread[ih] = AfxBeginThread(MyThread, mainThreadState, TH

Re: eval to dict problems NEWB going crazy !

2006-07-10 Thread Fredrik Lundh
Ant wrote: > So how do python app's typically embed python? For example things like > Zope and idle are scripted using Python - presumably they restrict the > execution of the scripts to a restricted set of modules/objects - but > how is this done? why? anyone capable of adding code to idle alre

Py_NewInterpreter(), is this a bug in the python core?

2006-07-10 Thread freesteel
/* Is this a bug in Py_NewInterpreter? The function below "MyThread" is instantiated from a windows worker thread, but I don't think that is relevant. (I can try this on a linux box, but I would have to compile a python library with debugging enabled.) The following code fragment throws an except

Re: Running multiple versions of Python on the same host..

2006-07-10 Thread jeff . pitman
Cowmix wrote: > For my day job I am forced to run RHEL3 (and Centos3 on my desktop). I > want to be able to use a few applications that require Python 2.4.X but > RHEL3 ships with Python 2.2.3. I have tried to install and upgrade > Python 2.4.X many ways like using PyVault and doing a source based

Re: language design question

2006-07-10 Thread Fredrik Lundh
Bryan wrote: > could you get the same result by putting these methods in base > class object that everything subclasses? and how do you make sure that everything subclasses this base class ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help in xml

2006-07-10 Thread uche . ogbuji
Kirt wrote: > i have two xml documemts of type > > > test > 2006-12-12 > 12:12:12 > > /home/ > > test2 > 12:12:12 > > > > /home/test > > test3 > 12:12:12 > > > > > i have to compare 2 similar xml document and get the add, changed and > delete

Re: Web Browser Pygame Plug-in?

2006-07-10 Thread Ben Sizer
Gregory Piñero wrote: > That's interesting, Ben. So we'd be better off making a new library > similiar to Pygame in functionality but designed from the ground up to > work in a browser. I think it depends on what is most important to you. Options available include going with Java or Flash instead

  1   2   3   >