Re: Python platform.

2008-09-11 Thread [EMAIL PROTECTED]
On Sep 11, 4:19 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >  > I wonder if there is a platform written in python. The equivalent of >  > the Netbeans platformhttp://platform.netbeans.org/in the Python >  > world. Do you know such a thi

Re: Python platform.

2008-09-11 Thread [EMAIL PROTECTED]
On Sep 11, 11:13 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Sep 11, 4:19 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] wrote: > > >  > I wonder if there is a platform written in python

Insider information, fackbook labs open today, we the first to register!

2008-09-12 Thread [EMAIL PROTECTED]
Insider information, fackbook labs open today, we the first to register! www.fackbooklabs.com -- http://mail.python.org/mailman/listinfo/python-list

backup with python

2008-09-16 Thread [EMAIL PROTECTED]
Hi ! I need some help to create backup with python. I want to backup some bases on DVD - RW . How i make this with python ? I want to use python because the program is write on python . Thank you ! -- http://mail.python.org/mailman/listinfo/python-list

Enjoy seeing Enjoy seeingEnjoy seeingEnjoy seeing Enjoy seeing

2008-09-19 Thread [EMAIL PROTECTED]
Enjoy seeing with new video pictures http://nagaaraja.blogspots.com\ -- http://mail.python.org/mailman/listinfo/python-list

Quick & Secured Pharmacy Online. bhsrf

2008-09-20 Thread [EMAIL PROTECTED]
Start saving, best online pharmacy here http://gjlabeh.cuchezfarg.com/?cdfikmabehxwvrsygzchcmjl -- http://mail.python.org/mailman/listinfo/python-list

Quick & Secured Pharmacy Online. hr3tn

2008-09-20 Thread [EMAIL PROTECTED]
Start saving, best online pharmacy here http://gjlabeh.cuchezfarg.com/?cdfikmabehxwvrsygzchcmjl -- http://mail.python.org/mailman/listinfo/python-list

Top Techniques of Money Making INTERNET CASH MAKING SOLUTIONS

2008-09-22 Thread [EMAIL PROTECTED]
Ultimate Destination For All Online Job Seekers. Online cash online money without investments online paid surveys earn money online. Earn with FUN!!! For More Details Check the Links Below: http://www.tips2internetmarketing.blogspot.com/ http://www.80kpermonth.blogspot.com -- http://mail.python.or

Top Techniques of Money Making INTERNET CASH MAKING SOLUTIONS

2008-09-22 Thread [EMAIL PROTECTED]
Ultimate Destination For All Online Job Seekers. Online cash online money without investments online paid surveys earn money online. Earn with FUN!!! For More Details Check the Links Below: http://www.tips2internetmarketing.blogspot.com/ http://www.80kpermonth.blogspot.com -- http://mail.python.or

Top Techniques of Money Making INTERNET CASH MAKING SOLUTIONS

2008-09-22 Thread [EMAIL PROTECTED]
Ultimate Destination For All Online Job Seekers. Online cash online money without investments online paid surveys earn money online. Earn with FUN!!! For More Details Check the Links Below: http://www.tips2internetmarketing.blogspot.com/ http://www.80kpermonth.blogspot.com -- http://mail.python.or

Job queue using xmlrpc and threading

2008-09-22 Thread [EMAIL PROTECTED]
return === queuemanager.py from testqueue import JobQueue from SimpleXMLRPCServer import * class QM: def __init__(self, filename): self.jq = JobQueue("queue.txt") def addJob(self, jobname): self.jq.addJob(jobname, "[EMAI

Call for Papers, Volume 3 Issue 3

2008-09-23 Thread [EMAIL PROTECTED]
. Contact us at [EMAIL PROTECTED] Thanks, -Maurice Ling Co-Editor In Chief, The Python Papers -- http://mail.python.org/mailman/listinfo/python-list

FREE INTERNATIONAL TRADE LEADS

2008-09-23 Thread [EMAIL PROTECTED]
http://groups.google.com/group/comp.lang.python/browse_thread/thread/33f3659cc4d30b22# http://groups.google.com/group/comp.lang.python/browse_thread/thread/33f3659cc4d30b22# http://groups.google.com/group/comp.lang.python/browse_thread/thread/33f3659cc4d30b22# http://groups.google.com/group/comp.la

Folder Actions on Mac OSX Leopard?

2008-09-24 Thread [EMAIL PROTECTED]
Greetings, I've been trying to figure out if it's possible to attach a Python script to an action via Mac OSX Leopard's File Actions system. I'm wanting to call a Python script every time a file is added to the monitored folder. Just adding a .py file doesn't seem to do anything at all, and I can'

Re: is decorator the right thing to use?

2008-09-24 Thread [EMAIL PROTECTED]
On Sep 24, 3:21 pm, "Dmitry S. Makovey" <[EMAIL PROTECTED]> wrote: > Hi, > > after hearing a lot about decorators and never actually using one I have > decided to give it a try. My particular usecase is that I have class that > acts as a proxy to other classes (i.e.

text processing

2008-09-25 Thread [EMAIL PROTECTED]
I have string like follow 12560/ABC,12567/BC,123,567,890/JK I want above string to group like as follow (12560,ABC) (12567,BC) (123,567,890,JK) i try regular expression i am able to get first two not the third one. can regular expression given data in different groups -- http://mail.python.org

Small Accidents Mean Big Trouble for Supercollider

2008-09-25 Thread [EMAIL PROTECTED]
news from http://www.mrchat.net/myblog/myblog/small-accidents-mean-big-trouble-for-supercollider.html Small Accidents Mean Big Trouble for Supercollider Image Scientists expect startup glitches in the massive, complex machines they use to smash atoms. But the unique qualities of the world's l

Re: text processing SOLVED

2008-09-27 Thread [EMAIL PROTECTED]
Thanks Black Jack Working -- http://mail.python.org/mailman/listinfo/python-list

Re: What is not objects in Python?

2008-09-28 Thread [EMAIL PROTECTED]
On Sep 28, 2:29 pm, process <[EMAIL PROTECTED]> wrote: > I have heard some criticism about Python, that it is not fully object- > oriented. > > What is not an object in Python? > Parts of the syntax aren't objects. e.g. "=" or ":" aren't ob

Re: Socket Question

2008-10-01 Thread [EMAIL PROTECTED]
Maybe you need to close the socket somewhere else, rather than to close it when you receive the your response. On 9月30日, 上午7时01分, Ali Hamad <[EMAIL PROTECTED]> wrote: > Hello All : > > A socket question from a networking newbie. I need to create > a server that: > > 1

Re: Python 2.6, GUI not working on vista?

2008-10-02 Thread [EMAIL PROTECTED]
On Oct 2, 2:27 pm, process <[EMAIL PROTECTED]> wrote: > i just downloaded 2.6 and when running the gui nothing happens. > > anyone else with the same problem? I have no idea what "gui" you're referring to. However, when I try to run Python on vista, I get: The a

[BaseHTTPServer/SimpleHTTPServer] Remove "Server:" header

2008-10-03 Thread [EMAIL PROTECTED]
Hello. I'm using SimpleHTTPServer (work well) but it always sends "Server" header in response: "Server: SimpleHTTP/0.6 Python/2.5.1" How can I remove that ? I tried: self.server_version = "" self.sys_version = "" but the header is still sent, empty. I there a way to remove the "Server:" head

tkinter question

2008-10-03 Thread [EMAIL PROTECTED]
I saw this (close to this anyway) lieing around on the internet and was wanting to use it to define a start point exc but I need the graphics to stay within a set y coords and I am not realy sure how to do that. I have no idea on how to bind a min/max y to it. (the concept is inspired by the java

Re: Remove "Server:" header

2008-10-03 Thread [EMAIL PROTECTED]
On 3 oct, 20:17, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > >> I'm using SimpleHTTPServer (work well) but it always sends "Server" > >> header in response: > >> How can I remove that ? > >

CALL FOR PAPERS: International Journal of Imaging

2008-10-05 Thread [EMAIL PROTECTED]
- (Apologies for cross-posting) International Journal of Imaging (IJI) http://www.ceser.res.in/iji.html ISSN 0974-0627 We would appreciate if you could distrib

Re: Difference between a library and a module...

2006-03-07 Thread [EMAIL PROTECTED]
I'm not 100% sure what is a library in python. Your example above is importing a module. Someone else can correct me, but I use libraries to refer to underlying c/c++ code that is required for the python modules to function. So in pure python you are really only dealing with modules. string.rep

os.execve(pth,args,env) and os.chroot(pth) = problems

2006-03-07 Thread [EMAIL PROTECTED]
Hello fellow python users, I've been working on a basic implementation of a privilege separated web server, and I've goto the point of running a basic cgi script. Basically when the execCGI function in my Unpriv.py program is called a few things should happen, it should fork (which it does), the s

Any advantage in LISPs having simpler grammars than Python?

2006-03-07 Thread [EMAIL PROTECTED]
Is there any advantage to a language having a nice mathematically compact grammar like LISP does? (or at least used to?) Many have admired the mathematically simple grammar of LISP in which much of the language is built up from conses IIRC. Python's grammar seems complicated by comparison. Is th

Re: Learning different languages

2006-03-07 Thread [EMAIL PROTECTED]
Rich wrote: > Anyway, my question is: what experience you people have with working > with different languages at the same time? At any given time, I'm doing a fair amount of Python and C work. I also do a lot of bash scripting for supporting frameworks. Beyond that I use a fair number of domain-

Python universal binary for OSX

2006-03-07 Thread [EMAIL PROTECTED]
Hello everyone, I recently made the plunge to an mactel platform because, well, it was new laptop time. I have a few python projects I need to get going and, for the most part, things are a-ok. I have been using a source compiled copy of 2.4.2. I feel slightly uncomfortable doing this, mainly b

Re: os.execve(pth,args,env) and os.chroot(pth) = problems

2006-03-08 Thread [EMAIL PROTECTED]
Thanks for the reply Donn, It seems logical enough to me that finding #!/usr/bin/env python in the script file with the chroot I have used, is the problem. Once again thank you for the help. Regards, Gavin -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the standard output thread-safe?

2006-03-09 Thread [EMAIL PROTECTED]
>Is the standard output thread-safe? No. You'll need to synchronize access. -- http://mail.python.org/mailman/listinfo/python-list

Re: creating an executable?

2006-03-09 Thread [EMAIL PROTECTED]
>Can I make an executable with just the standard distribution, or do I >need a separate module? Check out py2exe: http://www.py2exe.org/ -- http://mail.python.org/mailman/listinfo/python-list

ANN: pyregex 0.5 - command line tools for Python's regular expression

2006-03-09 Thread [EMAIL PROTECTED]
pyregex is a command line tools for constructing and testing Python's regular expression. Features includes text highlighting, detail break down of match groups, substitution and a syntax quick reference. It is released in the public domain. Screenshot and download from http://tungwaiyip.info/soft

Outlook Addin and py2exe: 2 problems

2006-03-10 Thread [EMAIL PROTECTED]
Hello, I'm trying to create an addin for Outlook 2002 using the one provided in the demo of win32com as a starting point. I've been able to do my addin and test it if I go the "standard" way (using the python interpreter). But now, I want other poeple to use it to I want to freeze it for windows u

Re: Use python to process XML file

2006-03-10 Thread [EMAIL PROTECTED]
I have a little py module that implements the Composite pattern to represent xml file contents. My class is called ExtensionRegistry because that's what I use it for, you could rename it to whatever you wanted. After parsing, this allows me to access my xml file contents like this: xmlFile = Exten

epydoc help (putting XML in docstrings)

2006-03-10 Thread [EMAIL PROTECTED]
Here is a simple function that epydoc does not like: def test(): """ Return an XML string that looks like this:: 123 D ... @return: XML string. """ pass [EMAIL PROTECTED]:daplib]$ epydoc test.py Importing 1 modules

Setting permissions/ownership/destination in distutils?

2006-03-10 Thread [EMAIL PROTECTED]
Is there a recommended way to specify the permissions and ownership of scripts installed from distutils? Also, I'm currently just using this config in setup.cfg to control where the scripts go: [install] install-scripts = /opt/mcad/bin But it would be very helpful if I could install some of the

Re: epydoc help (putting XML in docstrings)

2006-03-10 Thread [EMAIL PROTECTED]
Doh. That was too easy. Thanks! jw -- http://mail.python.org/mailman/listinfo/python-list

capturing stdout from lynx..

2006-03-10 Thread [EMAIL PROTECTED]
i have a huge database that contains large amounts of html that i need to translate to ascii.. i have tried using html2text.py: http://www.aaronsw.com/2002/html2text/ but i could not figure out how to import it and use it as a library without getting errors everywhere.. so i decided to try usin

Re: IOS-style command line interface module?

2006-03-12 Thread [EMAIL PROTECTED]
Are you by any chance referring to the "cmd" module? -- http://mail.python.org/mailman/listinfo/python-list

Tkinter / Mac OS X Question (Aqua vs. X11)

2006-03-12 Thread [EMAIL PROTECTED]
I am running Mac OS X. I have Tcl/Tk installed. I can run the Aqua version (TkAqua) of wish by typing 'wish' at a terminal prompt. I can run the X11 version (TkX11) of wish by typing 'wish8.4-X11' in an x-term. If I run python and import Tkinter it always grabs the TkAqua version. How can I ge

Re: Class attributes newbie question (before I join a cargocult)

2006-03-12 Thread [EMAIL PROTECTED]
Should't the changeSex method be: def changeSex(self, newsex=""): self.sex = newsex return self.sex You're creating a new instance variable at the moment i.e 'self.mysex' doesn't exist until you call changeSex. -- http://mail.python.org/mailman/listinfo/python-list

key recognition

2006-03-12 Thread [EMAIL PROTECTED]
When capturing a keystroke using pyhook or other methods, any key pressed after is not recognized. Is there a way around this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter / Mac OS X Question (Aqua vs. X11)

2006-03-12 Thread [EMAIL PROTECTED]
> Install python using fink, and invoke that. Should work against X11 for > all GUI-Toolkits. I prefer not to do this. Darwin is already a Unix, and Apple provides a version of X11 that works well with it. Fink seems like an unecessary layer that I would rather not mess with. Tcl/Tk has a very

Re: New python.org site

2006-03-12 Thread [EMAIL PROTECTED]
>Bertrand Mansion said >Now, there are also new features we might want: > > - documentation with user comments (like in PHP, Postgres, MySQL...) > - RSS feeds > - Efficient search engine (hyperestraier ?) > - Database backend and CMS Add examples in the documentation to your list also!! Yes the p

Re: How to best update remote compressed, encrypted archives incrementally?

2006-03-12 Thread [EMAIL PROTECTED]
Would rsync into a remote encrypted filesystem work for you? -- http://mail.python.org/mailman/listinfo/python-list

Re: capturing stdout from lynx..

2006-03-13 Thread [EMAIL PROTECTED]
perfect! that worked great! thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Debugger / IDE ??

2006-03-14 Thread [EMAIL PROTECTED]
>Is there any editor or IDE in Python (either Windows or Linux) which >has very good debugging facilites like MS VisualStudio has or something >like that. I've been using Eclipse with PyDev and am very happy with it. -- http://mail.python.org/mailman/listinfo/python-list

Re: sizeof(struct timeval)

2006-03-15 Thread [EMAIL PROTECTED]
Nick Kew wrote: > Tony Houghton wrote: >... > But regardless of whether it's 'safe' amongst current devices, > you're setting yourself up for a Y2K-family bug. Except it'll > be a real one, not a storm-inna-teacup. > Hey, hey, don't go spouting off like one of those ignorant journalists! I and a

Re: OCR question

2006-03-15 Thread [EMAIL PROTECTED]
try gocr? command line ocr for linux Not very pythonic, but I am unaware of any ocr implementations in python. It is gpl, so it should be to hard to write python wrappers if you really want to do it right. -- http://mail.python.org/mailman/listinfo/python-list

Re: Button and Key Event

2006-03-15 Thread [EMAIL PROTECTED]
assuming you have a button instantiated and named myButton in 2.6 (namespace is relevant I think prior to 2.4 you had a diff namespace for wx) for this example i am guessing you are creating the button as part of a panel or some other object you are extending (ie self) self.myButton.Bind(wx.E

State of SSL in Python

2006-03-15 Thread [EMAIL PROTECTED]
I was searching the net about SSL support in Python, and it seems that a few years ago that the native SSL functions were broken or badly wanting in comparison to third party libraries such as m2crypto, POW and pyOpenSSL. What is the state of native support now? I'd like to use Python's native SS

Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-15 Thread [EMAIL PROTECTED]
Background: The problem I'm trying to solve is. There is a 5x5 grid. You need to fit 5 queens on the board such that when placed there are three spots left that are not threatened by the queen. My thinking: I created a list, named brd, that represents the board. I made it such that brd[1] would be

Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
The python code below generates a cartesian product subject to any logical combination of wildcard exclusions. For example, suppose I want to generate a cartesian product S^n, n>=3, of [a,b,c,d] that excludes '*a*b*' and '*c*d*a*'. See below for details. CHALLENGE: generate an equivalent in ruby,

Re: can't send large messages over SSL socket

2006-03-16 Thread [EMAIL PROTECTED]
Well the first thing to note is that the maximum record length in SSL is exactly 16384. SSL/TLS does not preserve message boundaries - it is up to the application to determine if there are multiple messages in a single record, or a single message spanning multiple records. Sounds like the particu

Re: Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-16 Thread [EMAIL PROTECTED]
Thank you very much guys! Just for clarification it wasn't homework, just extra credit :) I can't beleive I didn't realize that I didn't clear the GLOBAL variable :D -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
Flame war? Absolutely not. My reason is to learn. There are many sites dedicated to reasonably objective comparisons between languages. Here are two examples: http://www.smallscript.org/Language%20Comparison%20Chart.asp http://www.jvoegele.com/software/langcomp.html The wildcard exclusion problem

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
The point is to submit elegant code that showcases the features of each language. And the problem is, just to clarify, given a set WC of wildcards in any logical combination, and if WC(S^n) is the set all s in S^n that matches the wildcards, then efficiently generate the complement S^n\WC(S^n). You

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
What I have in mind is the efficient, generation of the complement S^n/WC(S^n). A good program should initialize, generate, and terminate. T=cartprodex(S,n,WC); //initialize for all i in T do what you want with i test to see if any more terminate if not and it should do this without explic

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
The asterisk '*' matches any sequence of elements, not just one element. The wildcard '*1*2*' would then correspond to a tuple with a 1 preceding a 2 in any positions. The wc '1*2' would correspond to a starting 1 and an ending 2 with anything in between. The wc *12* would correspond to a 1 adjacen

Re: My Generator Paradox!

2006-03-16 Thread [EMAIL PROTECTED]
vbgunz wrote: > I am afraid that this is the first time in which I would probably need > something explained to me as if I were a little child. I am having a > hard time getting this through my thick skull. What in the world is > wrong with this!? > > ''' ##

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
-- The states are lists of regular expressions -- where [a,b,..] means match a or b or... I haven't run or studied your program yet myself but what I had in mind was that the list of wc's are *all* to be excluded, so the list [wc1..wcn] is to correspond generating all tuples matching not(wc1 and .

Re: Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-16 Thread [EMAIL PROTECTED]
Sorry to bring this up again, but I decided to try to re-create the program, using the 2d array. However, I ran into a slight problem. How will the permutation function have to be modified? I'm having issues trying to figure out how it works, and how it would need to be modified to use it correct

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-17 Thread [EMAIL PROTECTED]
You may be interested in, or already know about http://www.lambdassociates.org/ http://www.lambdassociates.org/aboutqi.htm http://www.lambdassociates.org/webbook/contents.htm http://www.lambdassociates.org/prolog.htm Let me know what you think. -- http://mail.python.org/mailman/listinfo/python-

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-17 Thread [EMAIL PROTECTED]
It would seem that your program is just filtering the full cartesian product, right? The solution I'm looking for generates the elements one-by-one so that it could be used in a loop. -- http://mail.python.org/mailman/listinfo/python-list

python cgi permision error

2006-03-17 Thread [EMAIL PROTECTED]
Hi I have python cgi script, but when I call it I got server internal error. The log in my apache is [Sat Mar 18 04:17:14 2006] [error] [client 127.0.0.1] (13)Permission denied: exec of '/srv/www/cgi-bin/helo.cgi' failed [Sat Mar 18 04:17:14 2006] [error] [client 127.0.0.1] Premature end of scrip

Python installation problem

2006-03-17 Thread [EMAIL PROTECTED]
I'm using OS X 10.4.5. I have an easy problem that I can't solve: I have two versions of python installed. 2.3 came with the OS and 2.4 I installed via fink. When I call python from the command-line it calls 2.4. When I just call a *.py file like test.py, it calls 2.3. 1. How do I make both thes

Re: Python installation problem

2006-03-17 Thread [EMAIL PROTECTED]
Thanks for the fast responses.>mp -- http://mail.python.org/mailman/listinfo/python-list

Python execution problem

2006-03-17 Thread [EMAIL PROTECTED]
Using OSX 10.4.5 This is more of a unix/tcsh question than a python question. Somehow I got to the point where I have two files 'a.py' and 'b.py' which have identical contents and permissions, but one refuses to execute: [blah:/Library/WebServer/CGI-Executables] me% a.py tcsh: a.py: Command not f

Python 2.5 Schedule

2006-03-17 Thread [EMAIL PROTECTED]
For more details about the plan for Python 2.5, see: http://www.python.org/doc/peps/pep-0356/ The highlights are that we are hoping to put out the first alpha Real Soon Now, hopefully in a week or two. If there's something you really think just must be in 2.5 and can't wait until 2.6, now is

Writing web bots in python

2006-03-18 Thread [EMAIL PROTECTED]
Hello, I hav a question..How do I write a webbot that logs onto some website, fills text into a textbox and submit that form, Sorry I am a novice in python, apparently I have to use urllib, but I hav a few queries on this, What happens when there are more input interfaces..does urllib make somekind

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-18 Thread [EMAIL PROTECTED]
Yes, the program is quite a jumble: but it works. And I didn't post to python newsgroup since I was limited to just 5 newsgroups and didn't feel like doing multiple postings to multiple newsgroups. -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing web bots in python

2006-03-18 Thread [EMAIL PROTECTED]
Thanx for the info..i'll let you know when it works -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-18 Thread [EMAIL PROTECTED]
Here is an nice intro to K: http://www.kuro5hin.org/?op=displaystory;sid=2002/11/14/22741/791 "This is where K starts to set itself from apart from most of the common programming languages in use today. You rarely write loops in K (KDB is 100% loop-free), instead you use adverbs. An adverb modi

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-18 Thread [EMAIL PROTECTED]
The cardinality of excluding '*a*b*' from S^n should be (m-1)^(n-1)*(m+n-1), where m=|S|. For m=5 this becomes 4^(n-1)*(n+4), and your table fits this formula. As far as generating and testing, an 'ideal' solution would be to 'start from the ground up', as in excluding length 2 wc, and then length

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-18 Thread [EMAIL PROTECTED]
Nice! How to put it in a loop? I'm totally a newbie to Lisp myself, just gettng into Graham and Touretzky. Let's create a problem. Suppose after excluding I want to know if the digits sum to 12, say, like maybe they're part of a partition. S={0,..6}, S^5, excluding "*1*5*" and "1*2*3*", say. How w

Adding instance attributes to types

2006-03-18 Thread [EMAIL PROTECTED]
I have written a C module which implements a new Python type, and implemented data attributes for the type using PyGetSetDef/tp_getset. However, I want to allow instances of this type to have additional data attributes which also have get() and set() functions. (This might be better suited to use

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-18 Thread [EMAIL PROTECTED]
OK, a bad case of RTFM. I saved your file as WildCartesian.hs and then 1) command line: ghci WildCartesian.hs 2) Get some loading messages 3) command line: test and it works! But how do I compile it to get a program with command line arguments? I'm looking through Daume's tutorial right now. --

Rate of Flow in a Black Box

2006-03-19 Thread [EMAIL PROTECTED]
Hi all. Here's the problem: I've got a black box and a bunch of particles in an environment. The particles go into the black box, follow a path, and pop out the end after some processing. They are processed first-in-first-out, like a queue. Inside the black box is a physical layout that can be

Re: python cgi permision error

2006-03-19 Thread [EMAIL PROTECTED]
Sorry accidently replying using my other google account [EMAIL PROTECTED] wrote: > > > > assuming you are running this python script the standard cgi way and not > > through modpython or fastcgi. > yes I'm running it in standard cgi way coz my provider only allow me &

Re: Pycrypto - active ??

2006-03-19 Thread [EMAIL PROTECTED]
Well, the homepage of Pycrypto (http://www.amk.ca/python/code/crypto) was modified las in December 2005 - quite recent imo. It is used e.g. in the paramiko package (http://www.lag.net/paramiko/) for the most(?) used ssh implementation in Python, so my guess it is active. -- http://mail.python.org

Re: cmp() on integers - is there guarantee of returning only +-1 or 0?

2006-03-19 Thread [EMAIL PROTECTED]
It is depending on the classes you try to compare, and on how the comparison functions (see http://docs.python.org/ref/customization.html) are implemented in these, see example below: py> class wrong(object): ... def __init__(self, x): ... self.x = x ... def __cmp__(self, other): .

Re: System Information

2006-03-19 Thread [EMAIL PROTECTED]
I'm not sure about osx, but I know linux uses a proc virtual filesystem. ( freebsd is probably closer, and it doesn't either but you can mount it via mount_linprocfs none /proc) But if you know if you have a proc file system, you can check it to see if you are under power... IE if I remember righ

Re: System Information

2006-03-19 Thread [EMAIL PROTECTED]
Oops -- just asked a buddy, osx doesn't have /proc But you could look into sysctl I'll boot up my laptop and check out if there is anything regarding the battery, but I suspect you should investigate sysctl -a | grep acpi -- http://mail.python.org/mailman/listinfo/python-list

Multifile EOF error

2006-03-20 Thread [EMAIL PROTECTED]
Hi, I had error in my script like "sudden EOF in MultiFile readline()" Why such error occur -- http://mail.python.org/mailman/listinfo/python-list

Re: System Information

2006-03-20 Thread [EMAIL PROTECTED]
Good news! I asked a buddy that runs osx, and he whipped up a script for you :) I understand it's not python, but it gets you close, you should be able to use popen or subprocess.call to complete this. function is_charger_plugged_in() { sleep 3; BATTINFO=`ioreg -l -w 0 | grep IO

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-20 Thread [EMAIL PROTECTED]
After the basic fact of generating the exclusion - a considerable achievement - the program should be interactive. What if the target set has thousands or millions of elements? There should be a loop-like way ('do' in Haskell, for example) to peel off the elements one-by-one and then terminate. -

python on blackberry?

2006-03-21 Thread [EMAIL PROTECTED]
i use a blackberry as my pda, and was wondering fi there was anything going on in the python world for blackberry.. i googled a bit, but it seems like most of the area is untapped.. anyone else have anything they know about? thanks! -- http://mail.python.org/mailman/listinfo/python-list

Handling yes/no questions from the User

2006-03-21 Thread [EMAIL PROTECTED]
I'm writing a scipt that need to interact with the user. Lets say I have the: "Do you want to continue [Y|n]" Where just pressing return means Yes (since its uppercase). Its easy to write a function for this, but perhaps something like this already exists. Could someone point me to a class that

Re: Command line arguments question (Windows XP)

2006-03-21 Thread [EMAIL PROTECTED]
lies to XP, mine is Win2k). In HKEY_CLASSES_ROOT\Python.File\shell\open\command the (Default) key does indeed contain the string "C:\Python24\python.exe" "%1" "%~2" but there was another key named command that contained the following binary data: 62 00 33 00 36

Re: Command line arguments question (Windows XP)

2006-03-21 Thread [EMAIL PROTECTED]
Ross Ridge wrote: > Tim Golden wrote: > > python.file="C:\Python24\python.exe" "%1" %* > > [EMAIL PROTECTED] wrote: > > So now I got to decide whether the file association should be > > set to "%2" "%3" "%4" "%5&q

Re: From Python to c++

2006-03-21 Thread [EMAIL PROTECTED]
Marco Aschwanden wrote: > This is actually a c++ problem. Got no satisfying answer on comp.lang.c++. > Maybe you can help better because I know, there are many c++-converts ;). > > Suppose you've got the following list (first line has field names, second > line has types and any row after is data):

Re: Multifile EOF error

2006-03-22 Thread [EMAIL PROTECTED]
> Try to trim down your script to the minimal code that produces the error > and post both. Copy'n'paste code and traceback, don't retype it. The code is kinda bit long so you can see the whole idea. I use some libgmail and twisted web #code start def displayComment(request): gmc = libgmail.G

string.upto() and string.from()

2006-03-22 Thread [EMAIL PROTECTED]
I often need to re-code for myself a small code snippet to define string.upto() and string.from(), which are used like : # canonical examples > "1234456789".upto("45") '1234' > "123456dd987".from('d') 'd987' # if not found, return whole string > "hello, world !".upto("#") "hello, world !" > u"hel

Re: string.upto() and string.from()

2006-03-22 Thread [EMAIL PROTECTED]
Sure, you're right I forgot about rsplit ! I guess the negative indexes & al could be done with sep.join(xyz.split(sep)[:index]) Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-22 Thread [EMAIL PROTECTED]
"And it doesn't really matter what language you use to implement this algorithm, it's the idea that counts. Notation aside, all implementations will be quite similar." I'll guess I'll get out my Turing tape. ;) What are some good references for finite state machines? Minimization? -- http://mai

Re: a problem to solve

2006-03-22 Thread [EMAIL PROTECTED]
John Salerno wrote: > Ok, here's a problem I've sort of assigned to myself for fun, but it's > turning out to be quite a pain to wrap my mind around. It's from a > puzzle game. It will help if you look at this image: > > http://www.johnjsal.devisland.net/switches.jpg > > Here's the situation: Each

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-23 Thread [EMAIL PROTECTED]
Hello, The solution that would have the most utility would be one where the elements are generated one-by-one, loop-like, so that they can be used in the body of a loop, and to avoid the fact that even with exclusion the cardinality of the target set EX^n could be in the millions even with a full

Re: path to modules per import statement

2006-03-23 Thread [EMAIL PROTECTED]
>For instance: "import my.path.module" would load module from >./my/path/module.py? Yeah, just do that. I don't understand the question, it works just like this today. -- http://mail.python.org/mailman/listinfo/python-list

<    43   44   45   46   47   48   49   50   >