Tryton 1.4 is available

2009-10-26 Thread ced
Tryton is a three-tiers high-level general purpose application platform under the license GPL-3 written in Python and using PostgreSQL as database engine. It is the core base of a complete business solution providing modularity, scalability and security. This new series comes up with new modules,

luban, a generic (web/native) user interface builder. version: 0.2a2

2009-10-26 Thread Jiao Lin
The luban package (http://luban.danse.us) is a python-based, cross- platform user interface builder. It provides UI developers a generic language to describe a user interface, and the description can be rendered as web or native interfaces. Gongshuzi, an application built by using luban,

RE: Python GUI

2009-10-26 Thread Dylan Palmboom
PyQt is what we use at work and it is excellent and easy to learn too! I definitely recommend it. -Original Message- From: Philip Semanchuk [mailto:phi...@semanchuk.com] Sent: 26 October 2009 03:42 AM To: Python-list (General) Subject: Re: Python GUI On Oct 25, 2009, at 8:39 PM, Ronn

Re: Python 2.6 Deprecation Warnings with __new__ — Can someone explain why?

2009-10-26 Thread Carl Banks
On Oct 25, 9:04 pm, rh0dium steven.kl...@gmail.com wrote: On Oct 22, 9:05 pm, Carl Banks pavlovevide...@gmail.com wrote: This should suffice for you: class Borg(object):     __shared_state = {}     def __init__(self, noSend=False,reportLevel=30,                  

Re: how can i use lxml with win32com?

2009-10-26 Thread elca
motoom wrote: elca wrote: http://news.search.naver.com/search.naver?sm=tab_htywhere=newsquery=korea+timesx=0y=0 that is korea portal site and i was search keyword using 'korea times' and i want to scrap resulted to text name with 'blogscrap_save.txt' Aha, now we're getting somewhere.

handling PAMIE and lxml

2009-10-26 Thread elca
Hello, i was open anther new thread ,old thread is too long. first of all,i really appreciate other many people's help in this newsgroup. im making webscraper now. but still problem with my script source. http://elca.pastebin.com/m52e7d8e0 i was upload my script in here. so anybody can modify it.

Pause a thread/ execfile()

2009-10-26 Thread Babloo
i have a small python application with GUI (frontend) which has various functions. I have a RUN button which runs python scripts in the background . It basically calls execfile() function internally which runs in a thread , to run the python script . I want to implement a PAUSE feature which

Re: Pause a thread/ execfile()

2009-10-26 Thread Sean DiZazzo
On Oct 25, 11:58 pm, Babloo pruthviraj...@gmail.com wrote: i have a small python application with GUI (frontend) which has various functions. I have a RUN button which runs python scripts in the background . It basically calls execfile() function internally which runs in a thread ,  to run the

Re: Pause a thread/ execfile()

2009-10-26 Thread Saju Pillai
On 26/10/09 12:28 PM, Babloo wrote: i have a small python application with GUI (frontend) which has various functions. I have a RUN button which runs python scripts in the background . It basically calls execfile() function internally which runs in a thread , to run the python script . I want

Re: Pause a thread/ execfile()

2009-10-26 Thread Babloo
On Oct 26, 1:11 pm, Saju Pillai saju.pil...@gmail.com wrote: On 26/10/09 12:28 PM, Babloo wrote: i have a small python application with GUI (frontend) which has various functions. I have a RUN button which runs python scripts in the background . It basically calls execfile() function

Re: Pause a thread/ execfile()

2009-10-26 Thread Babloo
On Oct 26, 1:01 pm, Sean DiZazzo half.ital...@gmail.com wrote: On Oct 25, 11:58 pm, Babloo pruthviraj...@gmail.com wrote: i have a small python application with GUI (frontend) which has various functions. I have a RUN button which runs python scripts in the background . It basically

Best way to configure a logger hierarchy (was Re: A new way to configure Python logging)

2009-10-26 Thread Jean-Michel Pichavant
Vinay Sajip wrote: Wolodja Wentland wentland at cl.uni-heidelberg.de writes: -- I usually register a logger 'foo' within the application and one logger for each module in the package, so the resulting logger hierarchy will look like this: foo |__bar

why python cache the string 256?

2009-10-26 Thread s7v7nislands
hi all: test.py #!/usr/bin/python a = [] for i in xrange(100): a.append('a'*500) $python -i test.py #virt mem 514m in top output del a #virt mem 510m why python cache these string? In source, I see when object size SMALL_REQUEST_THRESHOLD, python would use

Re: Python GUI

2009-10-26 Thread eb303
On Oct 26, 3:53 am, Grant Edwards inva...@invalid.invalid wrote: On 2009-10-26, Philip Semanchuk phi...@semanchuk.com wrote: On Oct 25, 2009, at 8:39 PM, Ronn Ross wrote: I need to create a gui for python. I'm looking for something that is easy to learn and cross platform. Any

how to get os.system () call to cooperate on Windows

2009-10-26 Thread Anthra Norell
I have a Python program that needs to copy files around. I could read and write which would be inefficient and would time-stamp the copy. The module os has lots of operating system functions, but none that copies files I could make out reading the doc twice. The function os.system ('copy

Problem while using xml.dom.minidom

2009-10-26 Thread bhaskar jain
Hello all, I am using xml.dom.minidom for creating a SAML metadata file which is an xml file. Code - import xml.dom.minidom as md doc = md.Document() entity_descr = doc.createElement(EntityDescriptor) doc.appendChild(entity_descr) entity_descr.setAttribute('xmlns',

Re: how to get os.system () call to cooperate on Windows

2009-10-26 Thread Diez B. Roggisch
Anthra Norell wrote: I have a Python program that needs to copy files around. I could read and write which would be inefficient and would time-stamp the copy. The module os has lots of operating system functions, but none that copies files I could make out reading the doc twice. The function

Re: a splitting headache

2009-10-26 Thread jhermann
On 16 Okt., 02:18, Mensanator mensana...@aol.com wrote: All I wanted to do is split a binary number into two lists, a list of blocks of consecutive ones and another list of blocks of consecutive zeroes. Back to the OP's problem, the obvious (if you know the std lib) and easy solution is: c =

Re: Is there a command that returns the number of substrings in a string?

2009-10-26 Thread Gerard Flanagan
Peng Yu wrote: For example, the long string is 'abcabc' and the given string is 'abc', then 'abc' appears 2 times in 'abcabc'. Currently, I am calling 'find()' multiple times to figure out how many times a given string appears in a long string. I'm wondering if there is a function in python

Re: Read any function in runtime

2009-10-26 Thread Rhodri James
On Fri, 23 Oct 2009 17:39:40 +0100, Matt McCredie mccre...@gmail.com wrote: joao abrantes senhor.abrantes at gmail.com writes: Hey. I want to make a program like this:print Complete the function f(x)=then the user would enter x+2 or 1/x or any other function that only uses the variable

Re: Web development with Python 3.1

2009-10-26 Thread Chris Withers
Brendon Wickham wrote: I can vouch for what Paul says. I started in Python 3 years ago, and I did so with a web application (still working on it!). I'm using the cgi approach, and it certainly teaches you the concepts. I fail to see how starting with a framework is a good idea if you don't

Python IDE

2009-10-26 Thread Girish
Hello, Which is the best software to create GUI other then Boa. Thanks, Girish. -- http://mail.python.org/mailman/listinfo/python-list

Re: a splitting headache

2009-10-26 Thread Vlastimil Brom
2009/10/26 jhermann juergen.herm...@1und1.de: On 16 Okt., 02:18, Mensanator mensana...@aol.com wrote: All I wanted to do is split a binary number into two lists, a list of blocks of consecutive ones and another list of blocks of consecutive zeroes. Back to the OP's problem, the obvious (if

Re: python web service or Apache?

2009-10-26 Thread Peng Yu
On Sun, Oct 25, 2009 at 11:09 PM, Simon Forman sajmik...@gmail.com wrote: On Sun, Oct 25, 2009 at 4:47 PM, Peng Yu pengyu...@gmail.com wrote: Although, python can be used to provide web service. The following webpage also mentioned, Apache the best and most widely used web server on the

Re: Web development with Python 3.1

2009-10-26 Thread Echo
bottle (http://bottle.paws.de/) can run on python 3.1 after running the 2to3 tool on it. It is a very lightweight framework. CherryPy 3.2 also runs on python 3.x I don't know if there are any others. On Sun, Oct 25, 2009 at 7:52 PM, Alan Harris-Reid a...@baselinedata.co.uk wrote: I am very

RE: Copying a ZipExtFile

2009-10-26 Thread Moore, Mathew L
En Fri, 23 Oct 2009 14:15:33 -0300, Moore, Mathew L moor...@battelle.org escribió: with io.BytesIO() as memio: shutil.copyfileobj(f, memio) zip = zipfile.ZipFile(file=memio) # Can't use zip.extract(), because I want to ignore paths # within

Re: OT Virtual Server Host

2009-10-26 Thread Victor Subervi
YES, that is what I want! How do I google this service? Or just flat-out recommend one for me (or both). Googling high-end virtual dedicated servers gave me *one* company...in England. I'd prefer the states (or Caribbean, where I reside). Thanks, V On Sun, Oct 25, 2009 at 10:55 PM, geremy condra

Re: OT Virtual Server Host

2009-10-26 Thread Ryan Lynch
On Mon, Oct 26, 2009 at 10:56, Victor Subervi victorsube...@gmail.com wrote: YES, that is what I want! How do I google this service? Or just flat-out recommend one for me (or both). Googling high-end virtual dedicated servers gave me *one* company...in England. I'd prefer the states (or

Re: Why is python so sad?

2009-10-26 Thread Erez
That statistics may seem slightly more optimistic if you also count [: and :] -- http://mail.python.org/mailman/listinfo/python-list

Re: efficient running median

2009-10-26 Thread denis
Based on Perreault + Hebert, here's python code for a rather different algorithm: - for quantized e.g. 8-bit data - runs faster for wider windows / slowly changing medians - no heaps, no trees: the only import is numpy, and even that's not essential

Re: OT Virtual Server Host

2009-10-26 Thread Victor Subervi
You're saving my neck, man. Thanks!!! V On Mon, Oct 26, 2009 at 11:10 AM, Ryan Lynch ryan.b.ly...@gmail.com wrote: On Mon, Oct 26, 2009 at 10:56, Victor Subervi victorsube...@gmail.com wrote: YES, that is what I want! How do I google this service? Or just flat-out recommend one for me (or

Building static Python binary

2009-10-26 Thread mk
Hello, I have trouble building Python static binary (for use with 'freeze.py', as frozen Python programs do not include dynamically linked libs). Anybody? ./configure --disable-shared --with-ldflags=-ldl And yet after compiling the resulting binary is linked with following dynamic

Re: Python 2.6 Deprecation Warnings with __new__ — Can someone expla in why?

2009-10-26 Thread Terry Reedy
Carl Banks wrote: So what is the point of using __new__? .__new__ creates new objects. It also inializes 'immutable' objects. It's mostly for types written in C, or for subclassing types written in C. Specifically, for subclassing immutable classes where one wants initialization behavior

Re: Pause a thread/ execfile()

2009-10-26 Thread Sean DiZazzo
On Oct 26, 1:25 am, Babloo pruthviraj...@gmail.com wrote: On Oct 26, 1:01 pm, Sean DiZazzo half.ital...@gmail.com wrote: On Oct 25, 11:58 pm, Babloo pruthviraj...@gmail.com wrote: i have a small python application with GUI (frontend) which has various functions. I have a RUN button

Re: Pause a thread/ execfile()

2009-10-26 Thread Terry Reedy
Babloo wrote: Any ideas how to pause execfile()? As far as the calling instance of the Python interpreter is concerned, calling execfile (or any C function) is an atomic action. You need to rewrite the code in the file executed to have it monitor a semaphore. --

Re: Building static Python binary

2009-10-26 Thread mk
P.S. If I add -static to LDFLAGS in Makefile, I get this: gcc -pthread -static -Xlinker -export-dynamic -o python \ Modules/python.o \ libpython2.6.a -lpthread -ldl -lutil -L/usr/local/ssl/lib -lssl -lcrypto -lm

Re: Read any function in runtime

2009-10-26 Thread Matt McCredie
Rhodri James rhodri at wildebst.demon.co.uk writes: On Fri, 23 Oct 2009 17:39:40 +0100, Matt McCredie mccredie at gmail.com wrote: joao abrantes senhor.abrantes at gmail.com writes: Hey. I want to make a program like this:print Complete the function f(x)=then the user would

Re: unicode and dbf files

2009-10-26 Thread Ethan Furman
John Machin wrote: On Oct 24, 4:14 am, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: On Oct 23, 3:03 pm, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: On Oct 23, 7:28 am, Ethan Furman et...@stoneleaf.us wrote: Greetings, all! I would like to add unicode

C++: Py_CompileString crash

2009-10-26 Thread KillSwitch
I run this code in VC++: #include Python.h #include string.h #include iostream using namespace std; int main(int argc, char *argv[]) { Py_Initialize(); const char* filename = asdf.py; const char* str = print('lol'); Py_CompileString(str, filename, 0);

Re: How about adding slice notation to iterators/generators?

2009-10-26 Thread Anh Hai Trinh
I've written something that is better than you could've imagine. Get it here: http://github.com/aht/stream.py It works with anything iterable, no need to alter anything. from itertools import count from stream import item c = count() c item[1:10:2] -[1, 3, 5, 7, 9] c item[:5] -[10,

How to know locals of script without running it

2009-10-26 Thread Nadav Chernin
Hi, all Is there a way to know locals of the script without running it? Thanks, Nadav -- http://mail.python.org/mailman/listinfo/python-list

Re: C++: Py_CompileString crash

2009-10-26 Thread Christian Heimes
KillSwitch wrote: int main(int argc, char *argv[]) { Py_Initialize(); const char* filename = asdf.py; const char* str = print('lol'); Py_CompileString(str, filename, 0); Py_Finalize(); system(PAUSE); return 0; } On running, it

(8)Exec format error: exec of a java script file

2009-10-26 Thread Bhanu Mangipudi
Hi all, When I am trying to access a javascript file I am getting an error like this (8)Exec format error: exec of '/var/www/cgi-bin/website/js/layout.js' failed, referer: http://localhost/cgi-bin/website/index.py;. Can any one please help me how to fix this error ?? Thanks Bhanu --

Strangeness: Cannot write to a file from a process created by Windows Task Scheduler ...

2009-10-26 Thread Sandy Walsh
Hi there, Seeing some really weird behavior and perhaps someone has seen something similar: I have a python script that launches as a Windows Scheduled Task. The program simply opens a disk file and writes some text to it: --- f = open(waiting.txt, w) x = 0 while 1: f.write(Sleeping:

Re: C++: Py_CompileString crash

2009-10-26 Thread KillSwitch
On Oct 26, 10:06 am, Christian Heimes li...@cheimes.de wrote: KillSwitch wrote: int main(int argc, char *argv[]) {    Py_Initialize();    const char* filename = asdf.py;    const char* str = print('lol');    Py_CompileString(str, filename, 0);    Py_Finalize();    

Re: python web service or Apache?

2009-10-26 Thread Simon Forman
On Mon, Oct 26, 2009 at 10:00 AM, Peng Yu pengyu...@gmail.com wrote: On Sun, Oct 25, 2009 at 11:09 PM, Simon Forman sajmik...@gmail.com wrote: On Sun, Oct 25, 2009 at 4:47 PM, Peng Yu pengyu...@gmail.com wrote: Although, python can be used to provide web service. The following webpage also

Re: Strangeness: Cannot write to a file from a process created by Windows Task Scheduler ...

2009-10-26 Thread MRAB
Sandy Walsh wrote: Yes it seems to be a flush problem. Strange how it doesn't require the explicit flush() when the console window appears, but does otherwise. Either way, it gives me a good direction to chase after. [snip] It buffers for efficiency reasons, but if it can detect that it's

Re: handling PAMIE and lxml

2009-10-26 Thread Simon Forman
On Mon, Oct 26, 2009 at 3:05 AM, elca high...@gmail.com wrote: Hello, i was open anther new thread ,old thread is too long. Too long for what? first of all,i really appreciate other many people's help in this newsgroup. im making webscraper now. but still problem with my script source.

Re: python web service or Apache?

2009-10-26 Thread rurpy
On 10/26/2009 08:00 AM, Peng Yu wrote: On Sun, Oct 25, 2009 at 11:09 PM, Simon Forman sajmik...@gmail.com wrote: On Sun, Oct 25, 2009 at 4:47 PM, Peng Yu pengyu...@gmail.com wrote: Although, python can be used to provide web service. The following webpage also mentioned, Apache the best and

Re: python web service or Apache?

2009-10-26 Thread Paul Rubin
ru...@yahoo.com writes: Apache requires root access to the server machine, Only to access the privileged ports. A small simple custom web server built with Python will likely... You can run it on a non-privileged port if you do not have root access to your server machine. You can do that

Re: Python IDE

2009-10-26 Thread TerryP
On Oct 26, 11:57 am, Girish girish@gmail.com wrote: Hello, Which is the best software to create GUI other then Boa. Thanks, Girish. Any editor can be used to create a GUI program in Python. Beyond that it depends on what you are using; since you stated Boa, I assume WxPython - so take a

Re: unicode and dbf files

2009-10-26 Thread John Machin
On Oct 27, 3:22 am, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: On Oct 24, 4:14 am, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: On Oct 23, 3:03 pm, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: On Oct 23, 7:28 am, Ethan Furman et...@stoneleaf.us

Re: Why is python so sad?

2009-10-26 Thread Matias Ribecky
On Wed, Oct 14, 2009 at 2:16 PM, Chris Withers ch...@simplistix.co.ukwrote: Zac Burns wrote: There are 10741 occurences of ): or :( in our source code and only 2 occurrences of :) or (:. Not what you would expect from a language named after a comedian. def ...(...): ... class

Re: Python 3.1.1 bytes decode with replace bug

2009-10-26 Thread Joe
Thanks Mark, that is a great suggestion! You can also replace the Unicode replacement character U+FFFD with a valid cp437 character before displaying it: b'\x80abc'.decode('utf8','replace').replace('\ufffd','?') '?abc' -- http://mail.python.org/mailman/listinfo/python-list

Re: why python cache the string 256?

2009-10-26 Thread Diez B. Roggisch
s7v7nislands schrieb: hi all: test.py #!/usr/bin/python a = [] for i in xrange(100): a.append('a'*500) $python -i test.py #virt mem 514m in top output del a #virt mem 510m why python cache these string? In source, I see when object size

Re: unicode and dbf files

2009-10-26 Thread Ethan Furman
John Machin wrote: On Oct 27, 3:22 am, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: Try this: http://webhelp.esri.com/arcpad/8.0/referenceguide/ Wow. Question, though: all those codepages mapping to 437 and 850 -- are they really all the same? 437 and 850 *are* codepages.

Re: virtualenv under Win7: easy_install fails in virtual environments

2009-10-26 Thread Michel Claveau - MVP
Hi! Try to unactive UAC... @+ -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Please help with regular expression finding multiple floats

2009-10-26 Thread Jeremy
On Oct 24, 12:00 am, Edward Dolan byteco...@gmail.com wrote: No, you're not missing a thing. I am ;) Something was happening with the triple-quoted strings when I pasted them. Here is hopefully, the correct code.http://codepad.org/OIazr9lA The output is shown on that page as well. Sorry

Re: how to get os.system () call to cooperate on Windows

2009-10-26 Thread Anthra Norell
Diez B. Roggisch wrote: Anthra Norell wrote: I have a Python program that needs to copy files around. I could read and write which would be inefficient and would time-stamp the copy. The module os has lots of operating system functions, but none that copies files I could make out reading

Re: handling PAMIE and lxml

2009-10-26 Thread elca
Simon Forman-2 wrote: On Mon, Oct 26, 2009 at 3:05 AM, elca high...@gmail.com wrote: Hello, i was open anther new thread ,old thread is too long. Too long for what? first of all,i really appreciate other many people's help in this newsgroup. im making webscraper now. but still

Re: Read any function in runtime

2009-10-26 Thread Jack Norton
Matt McCredie wrote: Rhodri James rhodri at wildebst.demon.co.uk writes: On Fri, 23 Oct 2009 17:39:40 +0100, Matt McCredie mccredie at gmail.com wrote: joao abrantes senhor.abrantes at gmail.com writes: Hey. I want to make a program like this:print Complete the function

RELEASED Python 2.6.4

2009-10-26 Thread Barry Warsaw
On behalf of the Python community, I'm happy to announce the availability of Python 2.6.4. This is the latest production-ready version in the Python 2.6 series. We had a little trouble with the Python 2.6.3 release; a number of unfortunate regressions were introduced. I take

Re: a splitting headache

2009-10-26 Thread Mensanator
On Oct 26, 7:28 am, Vlastimil Brom vlastimil.b...@gmail.com wrote: 2009/10/26 jhermann juergen.herm...@1und1.de: On 16 Okt., 02:18, Mensanator mensana...@aol.com wrote: All I wanted to do is split a binary number into two lists, a list of blocks of consecutive ones and another list of

playing mp3

2009-10-26 Thread Jabba Laci
Hi, What do you suggest for playing mp3 files with Python? I found a simple module (http://code.google.com/p/mp3play/) but it only works with Windows. I'd need Linux support too. Thanks, Laszlo -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket logic problem

2009-10-26 Thread John O'Hagan
On Sun, 25 Oct 2009, Gabriel Genellina wrote: En Sat, 24 Oct 2009 06:40:08 -0300, John O'Hagan resea...@johnohagan.com escribió: I have several instances of the same generator function running simultaneously, some within the same process, others in separate processes. I want them to be

Re: unicode and dbf files

2009-10-26 Thread John Machin
On Oct 27, 7:15 am, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: On Oct 27, 3:22 am, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: Try this: http://webhelp.esri.com/arcpad/8.0/referenceguide/ Wow.  Question, though:  all those codepages mapping to 437 and 850 --

Does someone has a 5-line working example of SOAP server request ?

2009-10-26 Thread Stef Mientki
hello, I want to ask some simple queries to a SOAP server ( through wdsl). The ICT department advised me to use a dot-net environment, because that should be able to handle wdsl automatically. As I have a quite large Python desktop application and I still don't understand what a dot-net

Re: Does someone has a 5-line working example of SOAP server request ?

2009-10-26 Thread Dan Sommers
On Tue, 27 Oct 2009 01:45:09 +0100, Stef Mientki wrote: So could someone tell me what libraries I need to perform a SOAP query ? ... Check out suds (https://fedorahosted.org/suds/). Is there a 5-line (Dive into Python had a 4-line example ;-) that can show the SOAP query is working ? My

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
Exarkun - thanks for the reply don't - start with 2.6 Thought you might say that ;-) Regards, Alan On 25 Oct, 11:52 pm, a...@baselinedata.co.uk wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
Anyway, for simple web programming, frameworks are not worth the hassle. Just use the cgi module. I can vouch for what Paul says. I started in Python 3 years ago, and I did so with a web application (still working on it!). I'm using the cgi approach, and it certainly teaches you

Re: Is there a command that returns the number of substrings in a string?

2009-10-26 Thread alex23
Gerard Flanagan grflana...@gmail.com wrote: def count(text, *args): Other than the ability to handle multiple substrings, you do realise you've effectively duplicated str.count()? -- http://mail.python.org/mailman/listinfo/python-list

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
Hi Paul, thanks for the reply (despite the sarcasm ;-) ), Does it occur to you that the unavailability of those frameworks is part of the REASON they say to use 2.x? Of course, but that doesn't mean that there isn't someone out there who may know of a framework that is already Python3

Adding a menu to Tkinter

2009-10-26 Thread Ronn Ross
I'm attempting to add a menu bar to my Tkinter app. I can't figure out the correct syntax. Can someone help? I get this error when I run the app: Traceback (most recent call last): File tkgrid.py, line 26, in module app = App(root) File tkgrid.py, line 10, in __init__ menubar =

Re: Adding a menu to Tkinter

2009-10-26 Thread MRAB
Ronn Ross wrote: I'm attempting to add a menu bar to my Tkinter app. I can't figure out the correct syntax. Can someone help? I get this error when I run the app: Traceback (most recent call last): File tkgrid.py, line 26, in module app = App(root) File tkgrid.py, line 10, in __init__

Re: why python cache the string 256?

2009-10-26 Thread s7v7nislands
On Oct 27, 4:03 am, Diez B. Roggisch de...@nospam.web.de wrote: s7v7nislands schrieb: hi all: test.py #!/usr/bin/python a = [] for i in xrange(100):     a.append('a'*500) $python -i test.py     #virt mem 514m in top output del a                   #virt mem 510m why

ANN: WHIFF += Mako treeview url rewrites

2009-10-26 Thread Aaron Watters
WHIFF 0.6 RELEASED WHIFF += Mako treeview url rewrites WHIFF is a collection of support services for Python/WSGI Web applications which allows applications to be composed by dropping dynamic pages into container directories. This mode of development will be familiar to developers who have

Re: Web development with Python 3.1

2009-10-26 Thread Aaron Watters
On Oct 25, 7:52 pm, Alan Harris-Reid a...@baselinedata.co.uk wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting don't - start with 2.6), but as far as I can see, none of the popular

Re: Adding a menu to Tkinter

2009-10-26 Thread John Posner
Ronn Ross wrote: I'm attempting to add a menu bar to my Tkinter app. I can't figure out the correct syntax. Can someone help? I get this error when I run the app: Traceback (most recent call last): File tkgrid.py, line 26, in module app = App(root) File tkgrid.py, line 10, in

Re: Problem with urllib2.urlopen() opening a local file

2009-10-26 Thread Gabriel Genellina
En Sat, 24 Oct 2009 20:10:21 -0300, deja user greatcan...@yahoo.com escribió: I want to use urlopen() to open either a http://... file or a local file File:C:/... I don't have problems opening and reading the file either way. But when I run the script on a server (ArcGIS server), the

Re: quit button

2009-10-26 Thread Gabriel Genellina
En Sat, 24 Oct 2009 23:59:06 -0300, linda.s samrobertsm...@gmail.com escribió: When I click quit button, why the following code has problem? [...] if __name__ == '__main__': root = Tk() gridbox(Toplevel()) packbox(Toplevel()) Button(root, text='Quit',

Surprising timeit result

2009-10-26 Thread John O'Hagan
I sometimes use timeit to see if it's better to check if something needs doing, or to just do it anyway. This result was surprising: setup = 'd1 = {a:0, b:0}; d2 = {a:0, b:1}' Timer('d1.update(d2)', setup).timeit() 2.6499271392822266 Timer('if d1 != d2: d1.update(d2)', setup).timeit()

Re: python web service or Apache?

2009-10-26 Thread Gabriel Genellina
En Sun, 25 Oct 2009 17:47:43 -0300, Peng Yu pengyu...@gmail.com escribió: Although, python can be used to provide web service. The following webpage also mentioned, Apache the best and most widely used web server on the Internet today, check it out. If you want to run your own web server this

Re: Surprising timeit result

2009-10-26 Thread Paul Rubin
John O'Hagan resea...@johnohagan.com writes: Timer('d1.update(d2)', setup).timeit() 2.6499271392822266 Timer('if d1 != d2: d1.update(d2)', setup).timeit() 1.0235211849212646 In other words, in this case it's substantially quicker to check for something and then proceed, than it is to

Re: how to get os.system () call to cooperate on Windows

2009-10-26 Thread Kushal Kumaran
On Tue, Oct 27, 2009 at 2:04 AM, Anthra Norell anthra.nor...@bluewin.ch wrote: snip No, I didn't. There's a number of modules I know by name only and shutils was one of them. A quick peek confirmed that it is exactly what I am looking for. Thank you very much for the advice. Then Doug

Re: Surprising timeit result

2009-10-26 Thread John O'Hagan
On Tue, 27 Oct 2009, Paul Rubin wrote: John O'Hagan resea...@johnohagan.com writes: Timer('d1.update(d2)', setup).timeit() 2.6499271392822266 Timer('if d1 != d2: d1.update(d2)', setup).timeit() 1.0235211849212646 In other words, in this case it's substantially quicker to check for

[issue6818] remove/delete method for zipfile/tarfile objects

2009-10-26 Thread victorlee129
victorlee129 victorlee...@gmail.com added the comment: I done it In a very *violent* way. Is it ok for you thought? if so, would anybody please fix it into the lib? -- components: -IO nosy: +victorlee129 versions: +Python 3.1 -Python 3.2 Added file:

[issue7206] 64 bit python fails on Windows 7

2009-10-26 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: No action- the interpreter fails to start. How precisely do you start the interpreter (and what interpreter precisely)? -- ___ Python tracker rep...@bugs.python.org

[issue6818] remove/delete method for zipfile/tarfile objects

2009-10-26 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I done it In a very *violent* way. Is it ok for you thought? In the form in which you have done it, it is clearly unacceptable for inclusion in the library: we don't want to add two modules delete and classtools. In addition, notice that

[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-26 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I agree with Antoine that CGIXML... is right in accessing sys.stdout.buffer; this really needs binary IO. Consequentially, his patch also looks right to me; please apply. -- assignee: - pitrou resolution: - accepted

[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-26 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Patch applied in r75710. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7165 ___ ___

[issue1602] windows console doesn't print utf8 (Py30a2)

2009-10-26 Thread Mark Summerfield
Mark Summerfield m...@qtrac.eu added the comment: Glenn Linderman's fix pretty well works for me on XP Home. I can print every Unicode character up to and including U+D7FF (although most just come out as rectangles, at least I don't get encoding errors). It fails at U+D800 with message:

[issue7207] test_telnetlib fails on OS X 10.6

2009-10-26 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: test_telnetlib fails consistently on OS X 10.6, for a default (64-bit) build of py3k. Test output below. It looks to me as though this is just a race condition in the test (possibly combined with socket-related peculiarities of OS X)

[issue7169] zipfile leaves a file handle open if file is zero size

2009-10-26 Thread Ryan Leslie
Ryan Leslie ryle...@gmail.com added the comment: I expect this should already be fixed by the commit in http://bugs.python.org/issue6511 BadZipFile will now be raised for empty files rather than IOError, and so ZipFile._GetContents() should now also close the file. The fix was committed to

[issue1602] windows console doesn't print utf8 (Py30a2)

2009-10-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Mark Summerfield wrote: Mark Summerfield m...@qtrac.eu added the comment: Glenn Linderman's fix pretty well works for me on XP Home. I can print every Unicode character up to and including U+D7FF (although most just come out as

[issue7207] test_telnetlib fails on OS X 10.6

2009-10-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch that fixes the problem for me. For each of the tests defined in WriteTests (there's only one at the moment), it forces the server to wait until the test is complete before closing the connection. -- keywords: +patch

[issue7207] test_telnetlib fails on OS X 10.6

2009-10-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Assigning to Jack for review. -- assignee: - jackdied keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7207 ___

[issue7169] zipfile leaves a file handle open if file is zero size

2009-10-26 Thread skelker
skelker steve.kel...@dtn.com added the comment: Thanks. I did do a search before opening my ticket. Not sure why I didn't see that in my search. Sorry for the duplicate ticket. Steve Kelker (952)882-4381 (or x4381) -- ___ Python tracker

[issue7169] zipfile leaves a file handle open if file is zero size

2009-10-26 Thread skelker
skelker steve.kel...@dtn.com added the comment: Fixed in http://bugs.python.org/issue6511 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7169 ___

[issue7208] Getpass echo's password to screen on 2.6, but not on 2.5 or 3.1

2009-10-26 Thread Peter Saunders
New submission from Peter Saunders p...@fodder.org.uk: Only sucessfully replicated on solaris. When running getpass() - it goes into non echo mode, however, once enter is pressed, the password is echoed to the screen. E.g. /opt/python/2.6.3/bin/python -c 'import getpass; x=getpass.getpass()'

[issue7208] Getpass echo's password to screen on 2.6, but not on 2.5 or 3.1

2009-10-26 Thread Peter Saunders
Changes by Peter Saunders p...@fodder.org.uk: -- keywords: +patch Added file: http://bugs.python.org/file15201/getpass.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7208 ___

  1   2   >