Re: import from future

2007-01-29 Thread Peter Otten
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Dan Bishop > wrote: > >> Now that nested_scopes and generators are no longer optional, the only >> thing left is "from __future__ import division", which makes the "/" >> operator on integers give the same result as for floats. > > From 2

Re: Resizing widgets in text windows

2007-01-29 Thread Eric Brunel
On Fri, 26 Jan 2007 22:35:20 +0100, <[EMAIL PROTECTED]> wrote: > Hi, I've been searching for a .resize()-like function to overload much > like can be done for the delete window protocol as follows: > > toplevel.protocol("WM_DELETE_WINDOW", callback) > > I realize that the pack manager usually hand

Web File System

2007-01-29 Thread anthony . cutrone
Hi group, I have a development with a file system in Python, accessible from a graphic web application. I mustn't use an NTFS or EXT3 system, because those are not adapted for my use. Indeed, I would like my system to be able to recover files, and get precedent versions. I also want it to inde

SpecTix

2007-01-29 Thread ccardelli
Hi all. I'd like to test the SpecTix package (GUI generation for TK). I have read somewhere that it can generate GUI code for python, but the download location (http://starship.python.net/crew/mike/Spectix/) is inactive. Could someone provide a copy of the package or suggest an alternate downlo

Re: Web File System

2007-01-29 Thread Michele Simionato
On Jan 29, 9:31 am, [EMAIL PROTECTED] wrote: > Hi group, > > I have a development with a file system in Python, accessible from a > graphic web application. > > I mustn't use an NTFS or EXT3 system, because those are not adapted > for my use. Indeed, I would like my system to be able to recover > f

Re: Handling empty form fields in CGI

2007-01-29 Thread Christopher Mocock
Paul Boddie wrote: > Try replacing this with... > > form = cgi.FieldStorage(keep_blank_values=1) > > Paul > That worked a treat. Thanks very much to both who replied. Chris. -- http://mail.python.org/mailman/listinfo/python-list

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Paul McGuire
On Jan 28, 10:58 pm, "NoName" <[EMAIL PROTECTED]> wrote: > Perl: > @char=("A".."Z","a".."z",0..9); > do{print join("",@char[map{rand @char}(1..8)])}while(<>); > > !!generate passwords untill U press ctrl-z > > Python (from CookBook): > > from random import choice > import string > print ''.join([ch

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread James Stroud
NoName wrote: > Perl: > @char=("A".."Z","a".."z",0..9); > do{print join("",@char[map{rand @char}(1..8)])}while(<>); > > !!generate passwords untill U press ctrl-z > > > > Python (from CookBook): > > from random import choice > import string > print ''.join([choice(string.letters+string.digits)

Re: IP address

2007-01-29 Thread Scripter47
Beej skrev: > On Jan 28, 2:26 am, Klaus Alexander Seistrup <[EMAIL PROTECTED]> wrote: >> Scripter47 wrote: >>> How do i get my ip address? >>> in cmd.exe i just type "ipconfig" then it prints: >>> ... >>> IP-address . . . . . . . . . . . . . . . . . : 192.168.1.10 >>> ... >>> how

Re: Yank Bastards KILLED THEIR OWN PEOPLE to stage 911 DRAMA

2007-01-29 Thread Laurent Pointal
bryan rasmussen a écrit : > See, if the python list mail server was written in Lisp Paul Graham > would already have been able to write up a spam filter to ban this > guy. > > Seriously though, shouldn't Thermate be banned by now. I read this from comp.lang.python... and its very hard to ban peo

Re: Data structure and algorithms

2007-01-29 Thread Steve Holden
Terry Reedy wrote: > "azrael" <[EMAIL PROTECTED]> wrote in message [...] > | > | but this was not dinamicly enough for me (or my prof.) so > > dynamic? I have no idea what you mean by 'not dynamic enough'. > > Python is not C or C++. It does not have pointers. Trying to program in C > in Pyt

Re: PythonCard installation

2007-01-29 Thread Steve Holden
dudds wrote: > Anyone had any joy with this using FC6?? When I try to run code editor > I get the error "Traceback (most recent call last): > File > "/usr/lib/python2.4/PythonCard-0.8.2/tools/codeEditor/codeEditor.py", > line 13, in ? > from PythonCard import about, configuration, dialog, log

interactive prompt in IDLE

2007-01-29 Thread Jan Kanis
Hello everyone, I'm trying to change the interactive python prompt. According to the docs this is done by changing sys.ps1 and sys.ps2 . That works fine when running python interactively from a command line, but when running in IDLE the .ps1 and .ps2 don't seem to exist. I suppose this has

Conversion of string to integer

2007-01-29 Thread jupiter
Hi guys, I have a problem. I have a list which contains strings and numeric. What I want is to compare them in loop, ignore string and create another list of numeric values. I tried int() and decimal() but without success. eq of problem is #hs=string.split(hs) hs =["popopopopop","254.25","poj

wxPython StatusBar Help

2007-01-29 Thread herve
Hi, everybody I'm working with wxPython 2.8.1.1. Does anybody know how to change the foreground colors in a wx.StatusBar -- http://mail.python.org/mailman/listinfo/python-list

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Paul Rubin
"Paul McGuire" <[EMAIL PROTECTED]> writes: > from random import choice Security note: if you're trying to generate real passwords this way, you're better off using os.urandom instead of the random module to generate the random numbers. The random module's results are supposed to be statistically

Re: pdf to text

2007-01-29 Thread tubby
Dieter Deyke wrote: >> sout = os.popen('pdftotext "%s" - ' %f) > Your program above should read: > >sout = os.popen('pdftotext "%s" - ' % (f,)) What is the significance of doing it this way? -- http://mail.python.org/mailman/listinfo/python-list

Re: Conversion of string to integer

2007-01-29 Thread Wojciech Muła
jupiter wrote: > I have a problem. I have a list which contains strings and numeric. > What I want is to compare them in loop, ignore string and create > another list of numeric values. > > I tried int() and decimal() but without success. > > eq of problem is > > #hs=string.split(hs) > hs =["popo

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread NoName
Hmmm.. In the Perl example password generates after user hit ENTER not continously like in Python you wrote... :) i want see various ways to generate passwords even if they some indirect like using BASE64 thanks all p.s. sorry for my eng ;) -- http://mail.python.org/mailman/listinfo/python-

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Szabolcs Nagy
> If you don't mind possibly getting a few nonalphanumeric characters: > > import os,binascii > print binascii.b2a_base64(os.urandom(6)) what about file('/dev/urandom').read(6).encode('base64') (oneliner and without import sa op requested) -- http://mail.python.org/mailman/listinfo/python-list

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Szabolcs Nagy
> If you don't mind possibly getting a few nonalphanumeric characters: > > import os,binascii > print binascii.b2a_base64(os.urandom(6)) what about file('/dev/urandom').read(6).encode('base64') (oneliner and without import as op requested) -- http://mail.python.org/mailman/listinfo/python-list

Excellent Interview with Dennis D'Souza, full of laughs

2007-01-29 Thread thermate
http://a1135.g.akamai.net/f/1135/18227/1h/cchannel.download.akamai.com/ 18227/podcast/PORTLAND-OR/KPOJ-AM/1-23-07%20POJ-cast.mp3? CPROG=PCAST&MARKET=PORTLAND- OR&NG_FORMAT=newstalk&SITE_ID=674&STATION_ID=KPOJ- AM&PCAST_AUTHOR=AM620_KPOJ&PCAST_CAT=Talk_Radio&PCAST_TITLE=Thom_Hartma nn_Podcast Below

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Paul Rubin
"Szabolcs Nagy" <[EMAIL PROTECTED]> writes: > file('/dev/urandom').read(6).encode('base64') > (oneliner and without import sa op requested) Nice, though Un*x dependent (os.urandom is supposed to be portable). -- http://mail.python.org/mailman/listinfo/python-list

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread sturlamolden
On Jan 29, 4:08 pm, Paul Rubin wrote: > "Szabolcs Nagy" <[EMAIL PROTECTED]> writes: > > file('/dev/urandom').read(6).encode('base64') > > (oneliner and without import sa op requested)Nice, though Un*x dependent > > (os.urandom is supposed to be portable). Is os.urando

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Laszlo Nagy
NoName írta: > Hmmm.. > In the Perl example password generates after user hit ENTER not > continously like in Python you wrote... :) > > i want see various ways to generate passwords even if they some > indirect like using BASE64 > I copied this from a recipe, I do not remember which one. I li

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Szabolcs Nagy
> Is os.urandom cryptographically strong on all platforms? http://docs.python.org/lib/os-miscfunc.html "The returned data should be unpredictable enough for cryptographic applications, though its exact quality depends on the OS implementation." -- http://mail.python.org/mailman/listinfo/pyth

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Stargaming
NoName schrieb: > Perl: > @char=("A".."Z","a".."z",0..9); > do{print join("",@char[map{rand @char}(1..8)])}while(<>); > > !!generate passwords untill U press ctrl-z > > > > Python (from CookBook): > > from random import choice > import string > print ''.join([choice(string.letters+string.digit

Re: Off-Topic Posts

2007-01-29 Thread thermate
On Jan 27, 1:31 pm, Jim Klein <[EMAIL PROTECTED]> wrote: > I'm not one of the conquered races, I'm Swiss. We are the bankers to > the conquerers. :-) Exactly, Honorable J Klein, (although my reference was a general one, you have entered the thread, so I will pick the swiss case) more like tribut

HTMLParser's start_tag method never called ?

2007-01-29 Thread ychaouche
Hi, python experts. [EMAIL PROTECTED]:~/TEST$ python nettoyageHTML.py [EMAIL PROTECTED]:~/TEST$ This is the nettoyageHTML.py python script from HTMLParser import HTMLParser class ParseurHTML(HTMLParser): def __init__(self): HTMLParser.__init__(self) def start_body(self,attrs

Re: HTMLParser's start_tag method never called ?

2007-01-29 Thread Diez B. Roggisch
ychaouche wrote: > Hi, python experts. > > > [EMAIL PROTECTED]:~/TEST$ python nettoyageHTML.py > [EMAIL PROTECTED]:~/TEST$ > > > This is the nettoyageHTML.py python script > > > from HTMLParser import HTMLParser > > class ParseurHTML(HTMLParser): > def __init__(self): > HTMLPars

Re: Excellent Interview with Dennis D'Souza, full of laughs

2007-01-29 Thread Hampton Din
stupid troll -- http://mail.python.org/mailman/listinfo/python-list

Re: Excellent Interview with Dennis D'Souza, full of laughs

2007-01-29 Thread thermate
FBI spook bastard that speaks french also On Jan 29, 8:13 am, "Hampton Din" <[EMAIL PROTECTED]> wrote: > stupid troll -- http://mail.python.org/mailman/listinfo/python-list

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Szabolcs Nagy
> If you really want a hack, here it is: > > while 1:print > ''.join(__import__('random').choice(__import__('string').letters+'1234567890') > for x in xrange(8)),;n=raw_input() > > This is a one-liner (though mail transmission may split it up), no > import statements. If someone can come up with an

Re: stop script w/o exiting interpreter

2007-01-29 Thread Garrick . Peterson
> I want, and the script will stop executing at that line and will > return to the interactive interpreter, as I wish. May I recommend wrapping your main program in a function definition? Such as: main(): # Bulk of your code (use a macro to indent it faster) if __name__ == "__main__":

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread Szabolcs Nagy
> while > 1:i=__import__;print''.join(i('random').choice(i('string').letters > +'1234567890')for x in range(8)),;raw_input() > while 1:i=__import__;r='random';print''.join(i(r).choice(i('string').letters +'1234567890')for x in`r`),;raw_input() even shorter: range -> `'random'` :) -- http://m

Possible security hole in SSL - was Random Passwords Generation

2007-01-29 Thread John Nagle
Paul Rubin wrote: > "Szabolcs Nagy" <[EMAIL PROTECTED]> writes: > >>file('/dev/urandom').read(6).encode('base64') >>(oneliner and without import sa op requested) > > > Nice, though Un*x dependent (os.urandom is supposed to be portable). Uh oh. I was looking at the Python "SSL" code recentl

Can I undecorate a function?

2007-01-29 Thread Matthew Wilson
The decorator as_string returns the decorated function's value as string. In some instances I want to access just the function f, though, and catch the values before they've been decorated. Is this possible? def as_string(f): def anon(*args, **kwargs): y = f(*args, **kwargs)

Re: Can I undecorate a function?

2007-01-29 Thread skip
Matt> In some instances I want to access just the function f, though, Matt> and catch the values before they've been decorated. def f(x): return x * x @as_string def fs(x): return f(x) Call the one you want. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I undecorate a function?

2007-01-29 Thread Diez B. Roggisch
Matthew Wilson wrote: > The decorator as_string returns the decorated function's value as > string. In some instances I want to access just the function f, > though, and catch the values before they've been decorated. > > Is this possible? > > def as_string(f): > def anon(*args, **kwargs):

next berlin python-group meeting fr., 2.2.

2007-01-29 Thread Stephan Diehl
after a long (veeeyy) long time, I'm pleased to announce our next python meeting in berlin. time: friday 2.2. 7pm place:Cafe & Restaurant UNENDLICH Boetzowstrasse 14 10407 Berlin (Prenzlauer Berg "Boetzowviertel") This is a fun meeting without offical talks. If you haven't done so already, su

Re: next berlin python-group meeting fr., 2.2.

2007-01-29 Thread Stephan Diehl
Stephan Diehl wrote: > http://starship.python.net/cgi-bin/mailman/listinfo/python-berlin argghhh, wrong link. please try http://starship.python.net/mailman/listinfo/python-berlin -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I undecorate a function?

2007-01-29 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Matt> In some instances I want to access just the function f, though, > Matt> and catch the values before they've been decorated. > > def f(x): > return x * x > > @as_string > def fs(x): > return f(x) or just fs = as_string(f) Kent > > Call the one y

Re: Excellent Interview with Dennis D'Souza, full of laughs

2007-01-29 Thread Frank Arthur
Real funny? Holocaust Deniers Convention in Iran? Sick, sick Islamists! <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://a1135.g.akamai.net/f/1135/18227/1h/cchannel.download.akamai.com/ > 18227/podcast/PORTLAND-OR/KPOJ-AM/1-23-07%20POJ-cast.mp3? -- http://mail.python.org/m

Re: Excellent Interview with Dennis D'Souza, full of laughs

2007-01-29 Thread Frank Arthur
Islamist bastard <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > FBI spook bastard that speaks french also > > On Jan 29, 8:13 am, "Hampton Din" <[EMAIL PROTECTED]> wrote: >> stupid troll > > -- http://mail.pytho

Re: Python does not play well with others

2007-01-29 Thread Skip Montanaro
> Andy Dustman, the author of the package is quite responsive to requests > raised in the mysql-python forums on SourceForge > (http://sourceforge.net/forum/?group_id=22307). If you have problems with > MySQLdb, bring them up there. I'm sure Andy will respond. I apologize in advance for beating

Re: Can I undecorate a function?

2007-01-29 Thread Steve Holden
Matthew Wilson wrote: > The decorator as_string returns the decorated function's value as > string. In some instances I want to access just the function f, > though, and catch the values before they've been decorated. > > Is this possible? > > def as_string(f): > def anon(*args, **kwargs): >

Re: Data structure and algorithms

2007-01-29 Thread Beej
On Jan 28, 2:56 pm, "azrael" <[EMAIL PROTECTED]> wrote: > class Node: > def __init__(self, cargo=None, next=None): > self.cargo = cargo > self.next = next This is OK for the node itself, but maybe you should try writing a LinkedList class that you use: class LinkedList(object): de

[Boost.Graph] graph.vertices property creates new objects

2007-01-29 Thread George Sakkis
I've just started toying with the python bindings of BGL and I'm puzzled from the following: >>> from boost.graph import Graph >>> g = Graph() >>> v = g.add_vertex() >>> g.vertices.next() == v True >>> g.vertices.next() is v False It seems that the vertices iterator creates new vertex objects ev

Sourcing Python Developers

2007-01-29 Thread Kartic
Hello, My company has quite a few opening involving python expertise. We are always looking for python resources (and find it difficult filling these positions, might I add). Is there any place to find developers' resumes (like finding jobs from http://python.org/community/jobs/)? If any one k

List Behavior when inserting new items

2007-01-29 Thread Drew
I'm looking to add an element to list of items, however I'd like to add it at a specific index greater than the current size: list = [1,2,3] list.insert(10,4) What I'd like to see is something like: [1,2,3,,4] However I see: [1,2,3,4] Is there any way to produce this kind of behavior eas

Re: Sourcing Python Developers

2007-01-29 Thread Kartic
Current requirements in US only. Kartic sayeth, on 01/29/2007 01:56 PM: > Hello, > > My company has quite a few opening involving python expertise. We are > always looking for python resources (and find it difficult filling these > positions, might I add). Is there any place to find developers

Re: List Behavior when inserting new items

2007-01-29 Thread Diez B. Roggisch
Drew schrieb: > I'm looking to add an element to list of items, however I'd like to > add it at a specific index greater than the current size: > > list = [1,2,3] > list.insert(10,4) > > What I'd like to see is something like: > > [1,2,3,,4] > > However I see: > > [1,2,3,4] > > Is there

Re: wxPython StatusBar Help

2007-01-29 Thread Frank Niessink
2007/1/29, herve <[EMAIL PROTECTED]>: Does anybody know how to change the foreground colors in a wx.StatusBar wx.StatusBar is a subclass of wx.Window so SetForegroundColour should work... Cheers, Frank PS: In general, wxPython related questions are best asked on the wxPython-users mailing

Re: List Behavior when inserting new items

2007-01-29 Thread Drew
> What is your actual usecase? > > diez The issue is that I don't know how long the list will eventually be. Essentially I'm trying to use a 2D list to hold lines that I will eventually print to the screen. Blank elements in the list will be printed as spaces. I suppose every time I add an elem

SQL connecting

2007-01-29 Thread Scripter47
Hey It got a problem with python to connect to my SQL DBs, that's installed on my apache server. how do i connect to sql? Gettting data? Insert into it? it is a localserver with php if that means something here is a *REALLY* dirty solution that a have used: [CODE] from urllib import * # sql quer

Re: Bush, yank bastards kicked by india in their arse Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-01-29 Thread Vance P. Frickey
Hawk wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > you are such a dork. > > India has been a Russian satellite for years and years. > Who has been > running their schools? Not the British. According to Oleg Kalugin, former head of the KGB's First Directorate (overse

Re: Conversion of string to integer

2007-01-29 Thread Adam
On Jan 29, 1:55 pm, "jupiter" <[EMAIL PROTECTED]> wrote: > Hi guys, > > I have a problem. I have a list which contains strings and numeric. > What I want is to compare them in loop, ignore string and create > another list of numeric values. You can iterate over the list and use the type() funct

Re: List Behavior when inserting new items

2007-01-29 Thread [EMAIL PROTECTED]
On Jan 29, 7:57 pm, "Drew" <[EMAIL PROTECTED]> wrote: > I'm looking to add an element to list of items, however I'd like to > add it at a specific index greater than the current size: > > list = [1,2,3] > list.insert(10,4) > > What I'd like to see is something like: > > [1,2,3,,4] > > However I

Re: SQL connecting

2007-01-29 Thread John Nagle
Scripter47 wrote: > Hey > > It got a problem with python to connect to my SQL DBs, that's installed > on my apache server. how do i connect to sql? Gettting data? Insert into > it? You need a third-party open source package called "MySQLdb". John Nagl

Re: Conversion of string to integer

2007-01-29 Thread [EMAIL PROTECTED]
On Jan 29, 2:55 pm, "jupiter" <[EMAIL PROTECTED]> wrote: > Hi guys, > > I have a problem. I have a list which contains strings and numeric. > What I want is to compare them in loop, ignore string and create > another list of numeric values. > > I tried int() and decimal() but without success. > >

Re: SQL connecting

2007-01-29 Thread Scripter47
John Nagle skrev: > Scripter47 wrote: >> Hey >> >> It got a problem with python to connect to my SQL DBs, that's installed >> on my apache server. how do i connect to sql? Gettting data? Insert into >> it? > > You need a third-party open source package called "MySQLdb". > >

Re: List Behavior when inserting new items

2007-01-29 Thread Paul McGuire
> py>def __init__(self, arg = []): > py>self.__list = arg Please don't perpetuate this bad habit!!! "arg=[]" is evaluated at compile time, not runtime, and will give all default-inited llists the same underlying list. The correct idiom is: def __init__(self, arg = None):

Re: Python does not play well with others

2007-01-29 Thread Bruno Desthuilliers
John Nagle a écrit : (snip) >My main concern is with glue code to major packages. The connections > to OpenSSL, MySQL, and Apache (i.e. mod_python) all exist, but have major > weaknesses. Neither MySQLdb nor mod_python are part of the Python's standard lib AFAIK. > If you're doing web app

Executing Javascript, then reading value

2007-01-29 Thread Melih Onvural
I need to execute some javascript and then read the value as part of a program that I am writing. I am currently doing something like this: import htmllib, urllib, formatter class myparser(htmllib.HTMLParser): insave = 0 def start_div(self, attrs): for i in attrs:

Re: Sourcing Python Developers

2007-01-29 Thread Paul Rubin
Kartic <[EMAIL PROTECTED]> writes: > In any case, we have immediate requirements for a Pythonista with C++, > MySQL, XML, Debian expertise. Please email resume to: Generally it's ok to post here to the newsgroup with Python jobs. But you should describe the specific openings you're trying to fill

Compiling extension with Visual C++ Toolkit Compiler - MSVCR80.dll

2007-01-29 Thread alexandre_irrthum
Hi there, I am trying to install a Python library with a C extension (the Polygon library) and I am having a bad time. My Python version is Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug 2 2006, 12:09:59) [MSC v.1310 32 bit (Intel)] on Windows XP Pro. I have dutifully followed the instructi

Re: List Behavior when inserting new items

2007-01-29 Thread [EMAIL PROTECTED]
On Jan 29, 1:10 pm, "Drew" <[EMAIL PROTECTED]> wrote: > > What is your actual usecase? > > > diezThe issue is that I don't know how long the list will eventually be. > Essentially I'm trying to use a 2D list to hold lines that I will > eventually print to the screen. Blank elements in the list wi

Re: List Behavior when inserting new items

2007-01-29 Thread Bruno Desthuilliers
Drew a écrit : > I'm looking to add an element to list of items, however I'd like to > add it at a specific index greater than the current size: > > list = [1,2,3] NB: better to avoid using builtins types and functions names as identifiers. > list.insert(10,4) > > What I'd like to see is somet

python 2.3 module ref

2007-01-29 Thread David Bear
Since redhat packages python2.3 with their distro (RHEL 4..) I was looking for a module reference for that version. Looking at python.org I only see current documentation. any pointers to a 2.3 module ref? -- David Bear -- let me buy your intellectual property, I want to own your thoughts -- --

Re: Executing Javascript, then reading value

2007-01-29 Thread Jean-Paul Calderone
On 29 Jan 2007 12:44:07 -0800, Melih Onvural <[EMAIL PROTECTED]> wrote: >I need to execute some javascript and then read the value as part of a >program that I am writing. I am currently doing something like this: Python doesn't include a JavaScript runtime. You might look into the stand-alone Sp

Re: python 2.3 module ref

2007-01-29 Thread Robert Kern
David Bear wrote: > Since redhat packages python2.3 with their distro (RHEL 4..) I was looking > for a module reference for that version. Looking at python.org I only see > current documentation. > > any pointers to a 2.3 module ref? http://docs.python.org/ Click on "Locate previous versions."

Re: Convert from unicode chars to HTML entities

2007-01-29 Thread Martin v. Löwis
Steven D'Aprano schrieb: > A few issues: > > (1) It doesn't seem to be reversible: > '© and many more...'.decode('latin-1') > u'© and many more...' > > What should I do instead? For reverse processing, you need to parse it with an SGML/XML parser. > (2) Are XML entities guaranteed to be t

Re: List Behavior when inserting new items

2007-01-29 Thread Drew
> > Is there any way to produce this kind of behavior easily?Hints: > >>> [None] * 5 > [None, None, None, None, None] > >>> [1, 2, 3, None] + [10] > [1, 2, 3, None, 10] > > HTH That is exactly what I was looking for. I'm actually working on some problems at http://codgolf.com. I find it helps

Re: python 2.3 module ref

2007-01-29 Thread Martin v. Löwis
David Bear schrieb: > Since redhat packages python2.3 with their distro (RHEL 4..) I was looking > for a module reference for that version. Looking at python.org I only see > current documentation. > > any pointers to a 2.3 module ref? http://www.python.org/doc/2.3/ http://www.python.org/doc/2.3/

Re: Executing Javascript, then reading value

2007-01-29 Thread Melih Onvural
Thanks, let me check out this route, and then I'll post the results. Melih Onvural On Jan 29, 4:04 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On 29 Jan 2007 12:44:07 -0800, Melih Onvural <[EMAIL PROTECTED]> wrote: > > >I need to execute some javascript and then read the value as part of

Re: List Behavior when inserting new items

2007-01-29 Thread Bruno Desthuilliers
Drew a écrit : >>What is your actual usecase? >> >>diez > > > The issue is that I don't know how long the list will eventually be. How is this an issue ? Python's lists are not fixed-sized arrays. > Essentially I'm trying to use a 2D list to hold lines that I will > eventually print to the sc

Re: Sourcing Python Developers

2007-01-29 Thread Kartic
Paul Rubin sayeth, on 01/29/2007 03:44 PM: > Kartic <[EMAIL PROTECTED]> writes: >> In any case, we have immediate requirements for a Pythonista with C++, >> MySQL, XML, Debian expertise. Please email resume to: > > Generally it's ok to post here to the newsgroup with Python jobs. But > you shoul

Re: Compiling extension with Visual C++ Toolkit Compiler - MSVCR80.dll

2007-01-29 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > The library seems to build correctly (producing Polygon.py and > cPolygon.pyd), but when I import it I get the following message from > python.exe: "This application has failed to start because MSVCR80.dll > was not found". I thought that this might be due to Python

Re: strip question

2007-01-29 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > hi > can someone explain strip() for these : > [code] > x='www.example.com' x.strip('cmowz.') > > 'example' > [/code] > > when i did this: > [code] > x = 'abcd,words.words' x.strip(',.') > > 'abcd,words.words' > [/code] > > it does not strip off "

We sell to everyone!!! Government, Wholesalers, Distributers, Entreprenuers.....www.martin-global.com

2007-01-29 Thread Martin Global
Martin Global is one of North America's leading importers of goods manufactured and produced throughout Asia. We are distinctively unique from other importers, as we have one of North America's largest networks linking our organization directly to thousands of manufacturers and suppliers in

We sell to everyone!!! Government, Wholesalers, Distributers, Entreprenuers.....www.martin-global.com

2007-01-29 Thread Martin Global
Martin Global is one of North America's leading importers of goods manufactured and produced throughout Asia. We are distinctively unique from other importers, as we have one of North America's largest networks linking our organization directly to thousands of manufacturers and suppliers in

Re: Compiling extension with Visual C++ Toolkit Compiler - MSVCR80.dll

2007-01-29 Thread Peter Wang
On Jan 29, 2:47 pm, [EMAIL PROTECTED] wrote: > The library seems to build correctly (producing Polygon.py and > cPolygon.pyd), but when I import it I get the following message from > python.exe: "This application has failed to start because MSVCR80.dll > was not found". I thought that this might be

Re: Data structure and algorithms

2007-01-29 Thread azrael
thanks guys. i see that there is no way then to go back to C to satisfy my prof and get a grade -- http://mail.python.org/mailman/listinfo/python-list

Re: Random passwords generation (Python vs Perl) =)

2007-01-29 Thread NoName
WOW! :shock: in this case: while 1:i=__import__;print i('binascii').b2a_base64(i('os').urandom(6)),;raw_input() On 30 Янв., 04:06, "Szabolcs Nagy" <[EMAIL PROTECTED]> wrote: > > while > > 1:i=__import__;print''.join(i('random').choice(i('string').letters > > +'1234567890')for x in range(8)),;r

Re: The reliability of python threads

2007-01-29 Thread Carl J. Van Arsdall
Hendrik van Rooyen wrote: > [snip] >> could definitely do more of them. The thing will be >> > > When I read this - I thought - probably your stuff is working > perfectly - on your test cases - you could try to send it some > random data and to see what happens - seeing as you have a test

Re: Bush, yank bastards kicked by india in their arse Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-01-29 Thread thermate
On Jan 29, 11:15 am, "Vance P. Frickey" <[EMAIL PROTECTED]> wrote: > Directorate (overseas espionage), his old employers owned > someone in just about every important government agency in > India, from the 1970s until they stopped being able to > afford paying all those bribes. But in this anglo-

Re: Overloading assignment operator

2007-01-29 Thread J. Clifford Dyer
Steven D'Aprano wrote: > On Tue, 23 Jan 2007 18:07:55 -0800, Russ wrote: > >> Achim Domma wrote: >>> Hi, >>> >>> I want to use Python to script some formulas in my application. The user >>> should be able to write something like >>> >>> A = B * C >>> >>> where A,B,C are instances of some wrapper c

Re: ctypes: Setting callback functions in C libraries

2007-01-29 Thread [EMAIL PROTECTED]
I realized my wrapping was broken, fixing that below... On Jan 25, 12:47 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm trying to wrap GNU readline withctypes(the Python readline > library doesn't support the callback interface), but I can't figure out > how to set values to a variable

Re: [Boost.Graph] graph.vertices property creates new objects

2007-01-29 Thread Szabolcs Nagy
> It seems that the vertices iterator creates new vertex objects every > time instead of iterating over the existing ones. This essentially i don't know much about bgl, but this is possible since vertices are most likely not stored as python objects inside boost > prevents, among other things, s

python-list@python.org

2007-01-29 Thread Pappy
SHORT VERSION: Python File B changes sys.stdout to a file so all 'prints' are written to the file. Python file A launches python file B with os.popen("./B 2>&^1 >dev/null &"). Python B's output disappears into never-never land. LONG VERSION: I am working on a site that can kick off large-scal

deepcopy alternative?

2007-01-29 Thread none
I have a very complex data structure which is basically a class object containing (sometimes many) other class objects, function references, ints, floats, etc. The man for the copy module states pretty clearly that it will not copy methods or functions. I've looked around for a while (prob ju

select windows

2007-01-29 Thread Siqing Du
Hi, Is there is a way to write a program to select and switch between windows? For instance, if I have three windows: Firefox, Thunderbird, and emacs, can I run a program to bring up the desired windows, instead of click on the windows use mouse. Thanks, Du -- http://mail.python.org/mailman/li

Re: python 2.3 module ref

2007-01-29 Thread Szabolcs Nagy
> any pointers to a 2.3 module ref? also look at: http://rgruet.free.fr/PQR2.3.html#OtherModules when coding for different python versions i can reccommend this quick ref: http://rgruet.free.fr/ (every language feature is colorcoded according to the version when it was included) -- http://m

Re: Overloading assignment operator

2007-01-29 Thread Michael Spencer
J. Clifford Dyer wrote: > I think that's the first time I've actually seen someone use a Monty > Python theme for a python example, and I must say, I like it. However, > "We are all out of Wensleydale." > > Cheers, > Cliff Oh, then you clearly don't waste nearly enough time on this newsgroup ;

Re: Conversion of string to integer

2007-01-29 Thread John Machin
On Jan 30, 6:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jan 29, 2:55 pm, "jupiter" <[EMAIL PROTECTED]> wrote: > > > > > Hi guys, > > > I have a problem. I have a list which contains strings and numeric. > > What I want is to compare them in loop, ignore string and create > > anot

Re: Excellent Interview with Dennis D'Souza, full of laughs

2007-01-29 Thread thermate
Listen you mother fucker VULTURE, the past cold war was with soviet block, NOW the whole world hates you ... bastard you need friends, but now with your 911 in which YOU KILLED YOUR OWN CITIZENS, you are THE MOST ODIOUS NATION ON EARTH. YOU NEED FRIENDS, your biggest perceived rival CHINA is the m

Another link to the audio of radio interview by Dinesh D'Souza - HILLARIOUS

2007-01-29 Thread thermate
"http://a1135.g.akamai.net/f/1135/18227/1h/ cchannel.download.akamai.com/18227/podcast/PORTLAND-OR/KPOJ-AM/ 1-23-07%20POJ-cast.mp3?CPROG=PCAST&MARKET=PORTLAND- OR&NG_FORMAT=newstalk&SITE_ID=674&STATION_ID=KPOJ- AM&PCAST_AUTHOR=AM620_KPOJ&PCAST_CAT=Talk_Radio&PCAST_TITLE=Thom_Hartma nn_Podcast" htt

Bush, clean up your shit and farts before you leave - Hillary Clinton

2007-01-29 Thread thermate
But Bush was merely an ego front for the neocons ... He spoke their speeches, signed their recommendations, and ordered their wars, go and listen to Benjamin Friedman's excellent video in his very passionate voice ... http://video.google.com/videoplay?docid=3552214685532803163&q =

Re: deepcopy alternative?

2007-01-29 Thread Szabolcs Nagy
> I believe the only thing stopping me from doing a deepcopy is the > function references, but I'm not sure. If so is there any way to > transform a string into a function reference(w/o eval or exec)? what's your python version? for me deepcopy(lambda:1) does not work in py2.4 but it works in py2

Re: Excellent Interview with Dennis D'Souza, full of laughs

2007-01-29 Thread Michael L Torrie
On Mon, 2007-01-29 at 15:47 -0800, [EMAIL PROTECTED] wrote: > I know this is a useless gesture, but my normal tolerance for such behavior has reached an end. Please stop spamming this list with off-topic profanities. Your ramblings have nothing to do with programming in Python (this is a compute

  1   2   >