Re: repeat tkinter

2010-05-03 Thread Peter Otten
Robin wrote: > How can I make a command within a tkinter application repeat itself > over and over in intervals of a certain time. >>> import Tkinter as tk >>> root = tk.Tk() >>> color = "blue" >>> def switch_color(): ... global color ... if color == "blue": ... color = "red"

Re: Sphinx hosting

2010-05-03 Thread Martin v. Loewis
> Do you know of recent improvements on the PyPI side about docs > hosting? Yes; go to your package's pkg_edit page, i.e. http://pypi.python.org/pypi?%3Aaction=pkg_edit&name=decorator and provide a zip file at Upload Documentation. Regards, Martin -- http://mail.python.org/mailman/listinfo/pyt

Re: Buy Samsung Corby TXT B3210 Mobile

2010-05-03 Thread Rony Mascreen
On Apr 12, 3:05 pm, "mohanti.si...@yahoo.in" wrote: > Samsung Corby TXT is a GSM phone. Samsung Corby TXT, a SmartPhone > mobile comes with a great list of features. > >  Samsung Corby TXT B3210 is a mobile with a user memory of 38 MB and > MicroSD support up to 8 GB of external memory. This simpl

Rockin phone u r rit

2010-05-03 Thread Rony Mascreen
I wasnt intend to buy any of the samsung phones. but i was fascinated of its new corby series and buy this phone. really amazing phone with lots social networking programs. i have written more on http://hubpages.com/hub/Samsung-Corby-TxT-B3210 This phone is worth to buy. -- http://mail.python.org/

Re: Sphinx hosting

2010-05-03 Thread Michele Simionato
On May 4, 8:07 am, "Martin v. Loewis" wrote: > If it's a Python package that this documentation is about, you can host > it on PyPI. It must not be Python, but let's consider this case first. How does it work? When I published my decorator module (http://pypi.python.org/pypi/decorator) the suppor

Re: Sphinx hosting

2010-05-03 Thread Martin v. Loewis
Michele Simionato wrote: > Say you have a project with a lot of documentation in the form of > Sphinx pages (for instance a book project). What is the the easiest > way to publish it on the Web? I see that GitHub Pages allows you to > publish static pages, but I would need to check in both the .rst

Re: HTTP server + SQLite?

2010-05-03 Thread Bryan
John Nagle wrote: > [...] SQLite really > is a "lite" database.  Although there's good read concurrency, multiple > updates from multiple processes tend to result in sizable delays, since > the locking is via file locks and wait/retry logic. True, and I have other gripes about SQLite, but I've fal

Re: Recursive functions not returning lists as expected

2010-05-03 Thread Paul Rudin
rickhg12hs writes: > Would a kind soul explain something basic to a python noob? > > Why doesn't this function always return a list? > > def recur_trace(x,y): > print x,y > if not x: > return y > recur_trace(x[1:], y + [x[0]]) > > Here are a couple sample runs. > print(recur_trace(

"bollywood actress" bollywood actress blue film" "bollywood actress katrina kaif" "bollywood actress wallpapers" "bollywood actress kareena kapoor" "bollywood actress sexiest videos" "mallika sheraw

2010-05-03 Thread Naeem
"bollywood actress" bollywood actress blue film" "bollywood actress katrina kaif" "bollywood actress wallpapers" "bollywood actress kareena kapoor" "bollywood actress sexiest videos" "mallika sherawat" hhttp://e-bollywoodhungama.blogspot.com/ "bollywood actress" bollywood actress blue film" "bo

Sphinx hosting

2010-05-03 Thread Michele Simionato
Say you have a project with a lot of documentation in the form of Sphinx pages (for instance a book project). What is the the easiest way to publish it on the Web? I see that GitHub Pages allows you to publish static pages, but I would need to check in both the .rst sources and the .html output: it

Re: new extension generator for C++

2010-05-03 Thread Stefan Behnel
Rouslan Korneychuk, 03.05.2010 22:44: So I looked for other solutions and noticed that Py++ (which simply generates Boost.Python code for you) was based on a seperate program called GCCXML. I figured I could use GCCXML and generate code however I wanted. So I did. My program generates human-read

Re: Recursive functions not returning lists as expected

2010-05-03 Thread rickhg12hs
On May 4, 1:34 am, Cameron Simpson wrote: > On 03May2010 22:02, rickhg12hs wrote: > | Would a kind soul explain something basic to a python noob? > | > | Why doesn't this function always return a list? > | > | def recur_trace(x,y): > |   print x,y > |   if not x: > |     return y > |   recur_trac

Re: Recursive functions not returning lists as expected

2010-05-03 Thread Charles
"rickhg12hs" wrote in message news:2ff16113-4f79-4dcf-8310-35d2b91e8...@o11g2000yqj.googlegroups.com... > Would a kind soul explain something basic to a python noob? > > Why doesn't this function always return a list? > > def recur_trace(x,y): > print x,y > if not x: >return y > recur_tra

Re: Recursive functions not returning lists as expected

2010-05-03 Thread Cameron Simpson
On 03May2010 22:02, rickhg12hs wrote: | Would a kind soul explain something basic to a python noob? | | Why doesn't this function always return a list? | | def recur_trace(x,y): | print x,y | if not x: | return y | recur_trace(x[1:], y + [x[0]]) You need: return recur_trace(x[1:],

Re: Recursive functions not returning lists as expected

2010-05-03 Thread Abhishek Mishra
Perhaps you forgot a return, thats fundamental to recursion right - funciton returning itself to itself :) Here's a bit modification needed - def recur_trace(x,y): print x,y if not x: return y return recur_trace(x[1:], y + x[:1]) print ( recur_trace([],[1,2,3]) ) print print ( recur_tr

Re: print executed query

2010-05-03 Thread Fred C
On Apr 29, 2010, at 9:49 AM, Philip Semanchuk wrote: > > On Apr 29, 2010, at 12:01 PM, someone wrote: > >> Hello! >> >> Is there a way to print a query for logging purpose as it was or will >> be sent to database, if I don't escape values of query by myself? >> >> cursor.execute(query, [id, s

Re: print executed query

2010-05-03 Thread Fred C
On Apr 29, 2010, at 9:49 AM, Philip Semanchuk wrote: > > On Apr 29, 2010, at 12:01 PM, someone wrote: > >> Hello! >> >> Is there a way to print a query for logging purpose as it was or will >> be sent to database, if I don't escape values of query by myself? >> >> cursor.execute(query, [id, s

Recursive functions not returning lists as expected

2010-05-03 Thread rickhg12hs
Would a kind soul explain something basic to a python noob? Why doesn't this function always return a list? def recur_trace(x,y): print x,y if not x: return y recur_trace(x[1:], y + [x[0]]) Here are a couple sample runs. >>> print(recur_trace([],[1,2,3])) [] [1,2,3] [1,2,3] So that w

repeat tkinter

2010-05-03 Thread Robin
How can I make a command within a tkinter application repeat itself over and over in intervals of a certain time. Thanks, -Robin -- http://mail.python.org/mailman/listinfo/python-list

Re: Teaching Programming

2010-05-03 Thread CM
> Nobody likes indentation at first, it is different.   For what it's worth, I didn't have a programming background, and I liked Python's indentation right from the start. I was used to thinking in terms of indentation from writing and word processing documents with subordinate sections, so I fo

Re: HTTP server + SQLite?

2010-05-03 Thread John Nagle
Gilles Ganault wrote: Hello I'd like to build a prototype that will combine a web server as front-end (it must support GZIPping data to the remote client when there are a lot of data to return), and SQLite as back-end, call the server from a VB.Net application, and see how well this works. I wan

Re: [OT] strange interaction between open and cwd

2010-05-03 Thread Mel
Grant Edwards wrote: > I guess I've been using Unix for too long (almost 30 years). I don't > think I was consciously aware of a "one file, one name" paradigm. Is > that a characteristic of Dos, Windows or Mac filesystems? Older and simpler filesystems used to combine the naming with the space

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-04, Cameron Simpson wrote: > On 03May2010 15:23, Baz Walter wrote: >| so "here" must always be available somehow, even if getcwd() fails > > Well, yeah. Just like an open file handle on a file you have > subsequently removed still exists. Remember that the directory tree > is a digrap

Re: [OT] strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-04, Charles wrote: >> I don't see how it's inelegant at all. Perhaps it's >> counter-intuitive if you don't understand how a Unix filesystem >> works, but the underlying filesystem model is very simple, regular, >> and elegant. >> >>> but probably makes some bit of the OS's job slight

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Baz Walter wrote: > On 03/05/10 19:12, Grant Edwards wrote: >>> i think they should always either both succeed, or both fail. >> >> That's not how Unix filesystems work. >> >> Are you saying that Python should add code to it's open() builtin >> which calls realpath() and then refus

Re: strange interaction between open and cwd

2010-05-03 Thread Cameron Simpson
On 03May2010 15:23, Baz Walter wrote: | On 03/05/10 14:46, Peter Otten wrote: | >Baz Walter wrote: | > | >>attempting to remove the cwd would produce an error). but how can python | >>determine the parent directory of a directory that no longer exists? | > | >My tentative explanation would be that

Re: msg_footer

2010-05-03 Thread kalin m
nevermind...i found it... kalin m wrote: is there a variable for the member's email address in the msg_footer? the one the message is being sent to? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: strange interaction between open and cwd

2010-05-03 Thread Ben Finney
Baz Walter writes: > On 03/05/10 18:41, Grant Edwards wrote: > > Firstly, a file may have any number of paths (including 0). > > yes, of course. i forgot about hard links Rather, you forgot that *every* entry that references a file is a hard link. To ask for a filesystem entry referencing the f

Re: design question

2010-05-03 Thread Alf P. Steinbach
* Tim Arnold: This is a question about system design I guess. I have a django website that allows users to change/view configuration details for documentation builds. The database is very small. The reason I'm using a database in the first place is to make it easy for users to change the configur

Re: [OT] strange interaction between open and cwd

2010-05-03 Thread Charles
"Grant Edwards" wrote in message news:hrn3qn$nh...@reader1.panix.com... > On 2010-05-03, Chris Rebert wrote: > >>> open(path) -> "IOError: [Errno 2] No such file or directory" >>> >>> i think that if the first of these seemingly "impossible" requests >>> fails, it >>> is reasonable to expect t

msg_footer

2010-05-03 Thread kalin m
is there a variable for the member's email address in the msg_footer? the one the message is being sent to? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Teaching Programming

2010-05-03 Thread cjw
On 03-May-10 09:38 AM, Samuel Williams wrote: Dear Chris, Thanks for reading further into the site. Yes, it is complicated to provide a good comparison. It isn't always accurate and I welcome feedback. Please be aware that orange does not mean problem - it simply means take note that there m

Re: strange interaction between open and cwd

2010-05-03 Thread Lie Ryan
On 05/04/10 07:57, Baz Walter wrote: > On 03/05/10 19:12, Grant Edwards wrote: >> On 2010-05-03, Baz Walter wrote: >> You requested something that wasn't possible. It failed. What do you think should have happened? >>> >>> path = '../abc.txt' >>> >>> os.path.realpath(path) -> "OSError

Re: design question

2010-05-03 Thread Kev
Tim Arnold wrote: > This is a question about system design I guess. I have a django > website that allows users to change/view configuration details for > documentation builds. The database is very small. The reason I'm using > a database in the first place is to make it easy for users to change >

Re: win32 - catch events(wmi?)

2010-05-03 Thread Giampaolo Rodolà
Just out of curiosity, is WMI able to list the TCP and UDP connections opened by a process or by the OS? We'll have to do this for psutil (http://code.google.com/p/psutil) and we guess it's not gonna be easy. --- Giampaolo http://code.google.com/p/psutil http://code.google.com/p/pyftpdlib 2010/5/

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 19:12, Grant Edwards wrote: On 2010-05-03, Baz Walter wrote: You requested something that wasn't possible. It failed. What do you think should have happened? path = '../abc.txt' os.path.realpath(path) -> "OSError: [Errno 2] No such file or directory" therefore: open(path) -

Re: PyQt Ram Usage

2010-05-03 Thread David Boddie
On Monday 03 May 2010 22:49, Country Boy wrote: > I am new to Python (and programming so pardon my ignorance) > I have a small PyQt program that lives in windows system tray. I am > using Suds & ElemetTree to do webservices call and parse XML. > I have a QTimer that runs every 30 seconds and fetch

Re: long int computations

2010-05-03 Thread Victor Eijkhout
Jerry Hill wrote: > >>> from __future__ import division > >>> long1/long2 > 0.5 Beautiful. Thanks so much guys. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

PyQt Ram Usage

2010-05-03 Thread Country Boy
Hi, I am new to Python (and programming so pardon my ignorance) I have a small PyQt program that lives in windows system tray. I am using Suds & ElemetTree to do webservices call and parse XML. I have a QTimer that runs every 30 seconds and fetches the updated data from the server. Finally, the pyt

new extension generator for C++

2010-05-03 Thread Rouslan Korneychuk
Hi, I'm new here. I'm working on a program that exposes C++ declarations to Python and I was wondering if there is any interest in it. It's a hobby project. I was originally using Boost.Python on another project but found a couple of things I didn't like. Eg: you can't really have private cons

Re: Django as exemplary design

2010-05-03 Thread Carl Banks
On May 3, 12:24 pm, TomF wrote: > I'm interested in improving my python design by studying a large, > well-designed codebase.  Someone (not a python programmer) suggested > Django.  I realize that Django is popular, but can someone comment on > whether its code is well-designed and worth studying?

Re: win32 - catch events(wmi?)

2010-05-03 Thread Tim Golden
On 03/05/2010 12:02 PM, Richard Lamboj wrote: i want catch the following events: - registry has chanced - file has chanced - outgoing network connection - programm start and i want to be able to allow, or deny this "requests". Wow. That's quite a list. To do what you want in general te

Re: duplicate temporary file?

2010-05-03 Thread Christian Heimes
Laszlo Nagy wrote: However, it won't work for temporary files. Temporary files are just file-like objects, and their name is ''. I guess I could open a temporary file with os.open, and then use os.dup, but that is low level stuff. Then I have to use os.* methods, and the file object won't be iter

duplicate temporary file?

2010-05-03 Thread Laszlo Nagy
I try to write an iterator class: class FileIterator(object): def __init__(self,file_object): self.fin = file_object # other initialization code here ... def __iter__(self): return self def next(self): # special code that reads from the file and convert

Django as exemplary design

2010-05-03 Thread TomF
I'm interested in improving my python design by studying a large, well-designed codebase. Someone (not a python programmer) suggested Django. I realize that Django is popular, but can someone comment on whether its code is well-designed and worth studying? Thanks, -Tom -- http://mail.python

design question

2010-05-03 Thread Tim Arnold
This is a question about system design I guess. I have a django website that allows users to change/view configuration details for documentation builds. The database is very small. The reason I'm using a database in the first place is to make it easy for users to change the configuration of their b

Re: Teaching Programming

2010-05-03 Thread André
To Samuel Williams:(and other interested ;-) If you want to consider Python in education, I would encourage you have a look at http://www.python.org/community/sigs/current/edu-sig/ I think you will find that there are quite a few resources available - perhaps more than you are aware of. And,

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Chris Rebert wrote: >> open(path) -> "IOError: [Errno 2] No such file or directory" >> >> i think that if the first of these seemingly "impossible" requests fails, it >> is reasonable to expect that the second one also fails. but the second one >> (sometimes) doesn't. >> >> i think

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Baz Walter wrote: >> You requested something that wasn't possible. It failed. What do >> you think should have happened? > > path = '../abc.txt' > > os.path.realpath(path) -> "OSError: [Errno 2] No such file or directory" > > therefore: > > open(path) -> "IOError: [Errno 2] No su

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 19:05, Chris Rebert wrote: On Mon, May 3, 2010 at 10:45 AM, Baz Walter wrote: On 03/05/10 18:12, Grant Edwards wrote: On 2010-05-03, Baz Walterwrote: Sort of. The file in question _has_ a full path, you just can't tell what it is based on the path you used to open it. yes,

Re: strange interaction between open and cwd

2010-05-03 Thread Chris Rebert
On Mon, May 3, 2010 at 10:45 AM, Baz Walter wrote: > On 03/05/10 18:12, Grant Edwards wrote: >> On 2010-05-03, Baz Walter  wrote: Sort of.  The file in question _has_ a full path, you just can't tell what it is based on the path you used to open it. >>> >>> yes, that's exactly what i was

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 18:41, Grant Edwards wrote: On 2010-05-03, Baz Walter wrote: i think what i'm asking for is a python function that, given, say, a valid file descriptor, can return the file's full path. Firstly, a file may have any number of paths (including 0). yes, of course. i forgot about h

Re: How to check when OCRing is finished

2010-05-03 Thread Chris Rebert
On Mon, May 3, 2010 at 8:44 AM, varnikat t wrote: > Hi, > How to check if OCR engine  like cuneiform,ocropus,ocrad OCRing an image has > completed the job if running it from a  python program? > > I am using a progress bar on the front end to show the OCRing progress > happening in background but

Re: recommended way to insert data into a one to many relationship using python

2010-05-03 Thread Wolfgang Meiners
Wolfgang Meiners schrieb: [... example of a simple sql-database and relating questions ...] so after reading the hints of Peter Otten and Bryan i played around a bit and got the following solution. Of course it would be much simpler following Bryans idea of natural keys but i think, i will go ste

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 18:12, Grant Edwards wrote: On 2010-05-03, Baz Walter wrote: Sort of. The file in question _has_ a full path, you just can't tell what it is based on the path you used to open it. yes, that's exactly what i was trying to demonstrate in my OP. i can use python to open a file; but

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Baz Walter wrote: > i think what i'm asking for is a python function that, given, say, a > valid file descriptor, can return the file's full path. Firstly, a file may have any number of paths (including 0). > would such a thing even be possible? Yes. You have to search the file

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 15:24, Grant Edwards wrote: On 2010-05-03, Baz Walter wrote: On 03/05/10 14:18, Chris Rebert wrote: Whether or not /home/baz/tmp/xxx/ exists, we know from the very structure and properties of directory paths that its parent directory is, *by definition*, /home/baz/tmp/ (just chop o

Re: Teaching Programming

2010-05-03 Thread Terry Reedy
On 5/3/2010 9:38 AM, Samuel Williams wrote: Dear Chris, Thanks for reading further into the site. Yes, it is complicated to provide a good comparison. It isn't always accurate and I welcome feedback. Please be aware that orange does not mean problem - it simply means take note that there may b

Re: Python dot-equals (syntax proposal)

2010-05-03 Thread Terry Reedy
On 5/3/2010 12:37 AM, Alf P. Steinbach wrote: * Terry Reedy: * Alf P. Steinbach: * Aahz: and sometimes they rebind the original target to the same object. At the Python level that seems to be an undetectable null-operation. If you try t=(1,2,3); t[1]+=3, if very much matters that a rebin

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Baz Walter wrote: > it's a fact that realpath/abspath/normpath etc can fail for paths > that don't when used with os.stat or the builtin open function. True. > i think it's reasonable to expect that a path that can be used to > successfully open a file wont then produce "No such

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 15:55, Grant Edwards wrote: On 2010-05-03, Baz Walter wrote: On 03/05/10 14:56, Chris Rebert wrote: but how does '..' get resolved in the relative path '../abc.txt'? i'm assuming python must initially use getcwd() internally to do this, and then if that fails it falls back on somet

Re: HTTP server + SQLite?

2010-05-03 Thread lbolla
On May 3, 8:46 am, Gilles Ganault wrote: > Hello > > I'd like to build a prototype that will combine a web server as > front-end (it must support GZIPping data to the remote client when > there are a lot of data to return), and SQLite as back-end, call the > server from a VB.Net application, and s

Re: long int computations

2010-05-03 Thread Peter Otten
Peter Pearson wrote: > On Mon, 03 May 2010 17:30:03 +0200, Peter Otten <__pete...@web.de> wrote: >> Victor Eijkhout wrote: >> >>> I have two long ints, both too long to convert to float, but their ratio >>> is something reasonable. How can I compute that? The obvious "(1.*x)/y" >>> does not work.

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Baz Walter wrote: >>> (something like the environment variable $PWD). shame that >>> os.getenv('PWD') isn't reliable, as it would solve my issue :( >> >> I don't understand what you mean by that. > > i'm trying to understand how the path of the cwd can be known if there > is no en

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 15:56, Grant Edwards wrote: On 2010-05-03, Baz Walter wrote: On 03/05/10 14:46, Peter Otten wrote: Baz Walter wrote: attempting to remove the cwd would produce an error). but how can python determine the parent directory of a directory that no longer exists? My tentative explan

Re: long int computations

2010-05-03 Thread Jussi Piitulainen
Peter Otten writes: > Victor Eijkhout wrote: > > > I have two long ints, both too long to convert to float, but their > > ratio is something reasonable. How can I compute that? The obvious > > "(1.*x)/y" does not work. > > >>> import fractions > >>> x = 12345 * 10**1000 > >>> y = 765 * 10**1000 >

Re: long int computations

2010-05-03 Thread Peter Pearson
On Mon, 03 May 2010 17:30:03 +0200, Peter Otten <__pete...@web.de> wrote: > Victor Eijkhout wrote: > >> I have two long ints, both too long to convert to float, but their ratio >> is something reasonable. How can I compute that? The obvious "(1.*x)/y" >> does not work. > import fractions

Re: long int computations

2010-05-03 Thread Dave Angel
Victor Eijkhout wrote: I have two long ints, both too long to convert to float, but their ratio is something reasonable. How can I compute that? The obvious "(1.*x)/y" does not work. Victor. You don't make clear what you mean by "too long to convert to float." Do you mean can't convert exa

Re: matching strings in a large set of strings

2010-05-03 Thread Bryan
Karin Lagesen wrote: > I have approx 83 million strings, all 14 characters long. I need to be > able to take another string and find out whether this one is present > within the 83 million strings. [...] > I run out of memory building both the set and the dictionary, so > what I seem to be left wit

How to check when OCRing is finished

2010-05-03 Thread varnikat t
Hi, How to check if OCR engine like cuneiform,ocropus,ocrad OCRing an image has completed the job if running it from a python program? I am using a progress bar on the front end to show the OCRing progress happening in background but how to stop progress bar automatically when OCRing is done. A

Re: long int computations

2010-05-03 Thread Jerry Hill
On Mon, May 3, 2010 at 11:17 AM, Victor Eijkhout wrote: > I have two long ints, both too long to convert to float, but their ratio > is something reasonable. How can I compute that? The obvious "(1.*x)/y" > does not work. You didn't say what version of python you were using, but this seems to wor

Re: long int computations

2010-05-03 Thread Peter Otten
Victor Eijkhout wrote: > I have two long ints, both too long to convert to float, but their ratio > is something reasonable. How can I compute that? The obvious "(1.*x)/y" > does not work. >>> import fractions >>> x = 12345 * 10**1000 >>> y = 765 * 10**1000 >>> float(x) Traceback (most recent cal

Re: Teaching Programming

2010-05-03 Thread Helmut Jarausch
On 05/03/10 14:29, Chris Rebert wrote: > On Mon, May 3, 2010 at 5:05 AM, Samuel Williams > wrote: >> Dear Friends, >> >> I'm looking for some help from the Python community. I hope this is the >> right place to ask for information. >> >> I'm putting together a website aimed at high school students

Re: using python2.6 on windows without installation

2010-05-03 Thread Mirko Vogt
Thanks a lot for all your solutions! Tried installing it "just for the current user" as suggested by Christian and it works like a charme, so there seems to be no need for another python distribution in this case. Thanks a lot once again! mirko On Fri, 2010-04-30 at 01:34 +0200, Christian Heime

long int computations

2010-05-03 Thread Victor Eijkhout
I have two long ints, both too long to convert to float, but their ratio is something reasonable. How can I compute that? The obvious "(1.*x)/y" does not work. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Baz Walter wrote: > On 03/05/10 14:46, Peter Otten wrote: >> Baz Walter wrote: >> >>> attempting to remove the cwd would produce an error). but how can python >>> determine the parent directory of a directory that no longer exists? >> >> My tentative explanation would be that the di

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Baz Walter wrote: > On 03/05/10 14:56, Chris Rebert wrote: >>> but how does '..' get resolved in the relative path '../abc.txt'? i'm >>> assuming python must initially use getcwd() internally to do this, and then >>> if that fails it falls back on something else. but what is that so

Re: strange interaction between open and cwd

2010-05-03 Thread Dave Angel
Baz Walter wrote: On 03/05/10 14:18, Chris Rebert wrote: Whether or not /home/baz/tmp/xxx/ exists, we know from the very structure and properties of directory paths that its parent directory is, *by definition*, /home/baz/tmp/ (just chop off everything after the second-to-last slash). I would as

Re: Ann: Validating Emails and HTTP URLs in Python

2010-05-03 Thread Philip Semanchuk
On May 3, 2010, at 10:13 AM, andrew cooke wrote: FYI, Fourthought's PyXML has a module called uri.py that contains regexes for URL validation. I've over a million URLs (harvested from the Internet) through their code. I can't say I checked each and every result, but I never saw anything that

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 14:56, Chris Rebert wrote: but how does '..' get resolved in the relative path '../abc.txt'? i'm assuming python must initially use getcwd() internally to do this, and then if that fails it falls back on something else. but what is that something else? is it something that is reproduc

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Baz Walter wrote: > On 03/05/10 14:18, Chris Rebert wrote: >> Whether or not /home/baz/tmp/xxx/ exists, we know from the very >> structure and properties of directory paths that its parent directory >> is, *by definition*, /home/baz/tmp/ (just chop off everything after >> the second

Re: strange interaction between open and cwd

2010-05-03 Thread Grant Edwards
On 2010-05-03, Peter Otten <__pete...@web.de> wrote: > Baz Walter wrote: > >> attempting to remove the cwd would produce an error). but how can >> python determine the parent directory of a directory that no longer >> exists? Python doesn't determine the parent directory. The Unix system call and

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 14:46, Peter Otten wrote: Baz Walter wrote: attempting to remove the cwd would produce an error). but how can python determine the parent directory of a directory that no longer exists? My tentative explanation would be that the directory, namely the inode, still exists -- only th

Re: Ann: Validating Emails and HTTP URLs in Python

2010-05-03 Thread andrew cooke
> FYI, Fourthought's PyXML has a module called uri.py that contains   > regexes for URL validation. I've over a million URLs (harvested from   > the Internet) through their code. I can't say I checked each and every   > result, but I never saw anything that would lead me to believe it was   > misbe

Re: Teaching Programming

2010-05-03 Thread Samuel Williams
Dear Chris, I will take your feedback into consideration and let you know the outcome when I have time to think about it. Again, I appreciate your thoughts. Thanks for taking the time to think about the comparison chart. Kind regards, Samuel On 4/05/2010, at 1:58 AM, Chris Rebert wrote: >> I

Re: Teaching Programming

2010-05-03 Thread Chris Rebert
> On 4/05/2010, at 1:06 AM, Chris Rebert wrote: >> On Mon, May 3, 2010 at 5:29 AM, Chris Rebert wrote: >>> On Mon, May 3, 2010 at 5:05 AM, Samuel Williams >>> wrote: In particular, "Why would I learn this language?" section needs to have a few paragraphs. I don't use Python predominant

Re: strange interaction between open and cwd

2010-05-03 Thread Chris Rebert
On Mon, May 3, 2010 at 6:49 AM, Baz Walter wrote: > On 03/05/10 14:18, Chris Rebert wrote: >> Whether or not /home/baz/tmp/xxx/ exists, we know from the very >> structure and properties of directory paths that its parent directory >> is, *by definition*, /home/baz/tmp/ (just chop off everything af

Re: strange interaction between open and cwd

2010-05-03 Thread Peter Otten
Baz Walter wrote: > attempting to remove the cwd would produce an error). but how can python > determine the parent directory of a directory that no longer exists? My tentative explanation would be that the directory, namely the inode, still exists -- only the entry for it in its parent director

Re: strange interaction between open and cwd

2010-05-03 Thread Baz Walter
On 03/05/10 14:18, Chris Rebert wrote: Whether or not /home/baz/tmp/xxx/ exists, we know from the very structure and properties of directory paths that its parent directory is, *by definition*, /home/baz/tmp/ (just chop off everything after the second-to-last slash). I would assume this is what h

Re: Teaching Programming

2010-05-03 Thread Samuel Williams
Dear Chris, Thanks for reading further into the site. Yes, it is complicated to provide a good comparison. It isn't always accurate and I welcome feedback. Please be aware that orange does not mean problem - it simply means take note that there may be potential issues that you need to consider

Python code for outlook automation.

2010-05-03 Thread vithya subramani
hi, i need python source code for - Adding Contacts into Outlook. - Adding Blocked list,Safe sender list to junk Email folder in outlook - Counting total no of contacts in Blocked list,Safe sender list please provide help on these... Thanks, Vidu.. -- http:/

Re: Ann: Validating Emails and HTTP URLs in Python

2010-05-03 Thread Philip Semanchuk
On May 3, 2010, at 9:06 AM, andrew cooke wrote: Hi, The latest Lepl release includes an implementation of RFC 3696 - the RFC that describes how best to validate email addresses and HTTP URLs. For more information please see http://www.acooke.org/lepl/rfc3696.html Lepl's main page is http://

Re: strange interaction between open and cwd

2010-05-03 Thread Chris Rebert
On Mon, May 3, 2010 at 5:42 AM, Baz Walter wrote: > Python 2.6.4 (r264:75706, Mar  7 2010, 02:18:40) > [GCC 4.4.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. import os os.mkdir('/home/baz/tmp/xxx') f = open('/home/baz/tmp/abc.txt', 'w') f

Ann: Validating Emails and HTTP URLs in Python

2010-05-03 Thread andrew cooke
Hi, The latest Lepl release includes an implementation of RFC 3696 - the RFC that describes how best to validate email addresses and HTTP URLs. For more information please see http://www.acooke.org/lepl/rfc3696.html Lepl's main page is http://www.acooke.org/lepl Because Lepl compiles to regula

Re: Teaching Programming

2010-05-03 Thread Chris Rebert
On Mon, May 3, 2010 at 5:29 AM, Chris Rebert wrote: > On Mon, May 3, 2010 at 5:05 AM, Samuel Williams > wrote: >> Dear Friends, >> >> I'm looking for some help from the Python community. I hope this is the >> right place to ask for information. >> >> I'm putting together a website aimed at high s

strange interaction between open and cwd

2010-05-03 Thread Baz Walter
Python 2.6.4 (r264:75706, Mar 7 2010, 02:18:40) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.mkdir('/home/baz/tmp/xxx') >>> f = open('/home/baz/tmp/abc.txt', 'w') >>> f.write('abc') >>> f.close() >>> os.chdir('/home/baz/tmp/xxx'

ANN: expy 0.6.7 released!

2010-05-03 Thread Yingjie Lan
EXPY is an express way to extend Python! EXPY provides a way to extend python in an elegant way. For more information and a tutorial, see: http://expy.sourceforge.net/ I'm glad to announce a new release again today. ^_^ What's new: Version 0.6.7 1. Now functions can have 'value on failure'

Re: Teaching Programming

2010-05-03 Thread Chris Rebert
On Mon, May 3, 2010 at 5:05 AM, Samuel Williams wrote: > Dear Friends, > > I'm looking for some help from the Python community. I hope this is the > right place to ask for information. > > I'm putting together a website aimed at high school students and teachers, > and would like to make sure the

Re: Parser

2010-05-03 Thread andrew cooke
On May 2, 3:54 pm, Andreas Löscher wrote: > Hi, > I am looking for an easy to use parser. I am want to get an overview > over parsing and want to try to get some information out of a C-Header > file. Which parser would you recommend? > > Best, > Andreas I develop Lepl - http://www.acooke.org/lepl

Teaching Programming

2010-05-03 Thread Samuel Williams
Dear Friends, I'm looking for some help from the Python community. I hope this is the right place to ask for information. I'm putting together a website aimed at high school students and teachers, and would like to make sure the following page is as good as possible: http://programming

  1   2   >