Re: class level properties

2008-04-13 Thread Arnaud Delobelle
On Apr 13, 12:33 am, Charles D Hixson [EMAIL PROTECTED] wrote: Arnaud Delobelle wrote: class MetaX(type): ...     @property ...     def spam(self): return 'eggs' ... class X(object): ...      __metaclass__ = MetaX ... X.spam 'eggs' HTH -- Arnau Thanks.  I can make

Re: str(bytes) in Python 3.0

2008-04-13 Thread Terry Reedy
John Roth [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | On Apr 12, 8:52 am, [EMAIL PROTECTED] (John J. Lee) wrote: | Christian Heimes [EMAIL PROTECTED] writes: | Gabriel Genellina schrieb: | On the last line, str(x), I would expect 'abc' - same as str(x, 'ascii') | above.

Re: Where is the function of 'apply' always used?

2008-04-13 Thread Terry Reedy
??? [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | I'am a beginner of Python.In the course of reading the Python book,I | found the function:apply;But | I don't understand its use.Help! Apply has been deprecated. It has been replaced by the use of *args in function calls. It is

Re: Where is the function of 'apply' always used?

2008-04-13 Thread [EMAIL PROTECTED]
楼主,为何不用中英又语呢?这里也有其它中国人的. -- http://mail.python.org/mailman/listinfo/python-list

Recommendation for Web Framework

2008-04-13 Thread James West
Let me explain my situation a bit. I've been contracted to develop an ecommerce site. It's nothing too huge but requires a lot of custom development that's not typical for your run of the mill webstore. I've got about three weeks to get the project delivered and I've written quite a bit of

有中国人乎?

2008-04-13 Thread [EMAIL PROTECTED]
Python这种语言有前途吗?在下想学他一学. -- http://mail.python.org/mailman/listinfo/python-list

Re: class level properties

2008-04-13 Thread Peter Otten
Charles D Hixson wrote: I want a hundred or so read-only variables, and I'm not sure the best way to achieve it. What do you really want to do? I recommend that you forget about bondage and rely upon displine: class Test(object): Never change an attribute with an uppercase name.

Re: str(bytes) in Python 3.0

2008-04-13 Thread Carl Banks
On Apr 12, 11:51 am, Kay Schluehr [EMAIL PROTECTED] wrote: On 12 Apr., 16:29, Carl Banks [EMAIL PROTECTED] wrote: And making an utf-8 encoding default is not possible without writing a new function? I believe the Zen in effect here is, In the face of ambiguity, refuse the temptation

Re: Rounding a number to nearest even

2008-04-13 Thread Lie
On Apr 12, 3:44 am, hdante [EMAIL PROTECTED] wrote: (snip) In this table, we consider that a number is rounded down when the But then, the Round up table gives inconsistent results if, by the same argument, we consider 2.0 - 2 rounding up. (you get 12 round ups and 8 round downs just by

Re: 有中国人乎?

2008-04-13 Thread Jeroen Ruigrok van der Werven
(My Mandarin is not very good.) -On [20080413 09:24], [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: Python这种语言有前途吗?在下想学他一学. Python indeed does have a good future. I am not quite sure with 在下想学他一学 if you are asking for someone to teach to you or if you want to teach others. -- Jeroen Ruigrok van

Re: Recommendation for Web Framework

2008-04-13 Thread Arnaud Delobelle
On Apr 13, 8:18 am, James West [EMAIL PROTECTED] wrote: [...] Ideally, I'd like something like Ruby on Rails that would provide scaffolding support so I can bootstrap the system, so to speak. I've looked at Django, but the client is only running Apache 1.x and Python 2.3. Django only requires

Call a classmethod on a variable class name

2008-04-13 Thread Matthew Keene
I would like to be able to call a specific classmethod on a class name that is going to be passed from another parameter. In other words, I have a call that looks something like: x = Foo.bar() and I would like to generalise this so that I can make this call on any particular class which

Graphical grammar in python

2008-04-13 Thread alefajnie
hi Is exist any graphical library with resize, rotate, shape recognition, ...? suitable for graphical grammar at this moment I have OpenGL (resize rotate) and recognition solved as saved set of shapes (classes) feel free to write down any ideas :) --

Re: Call a classmethod on a variable class name

2008-04-13 Thread Arnaud Delobelle
On Apr 13, 9:51 am, Matthew Keene [EMAIL PROTECTED] wrote: I would like to be able to call a specific classmethod on a class name that is going to be passed from another parameter.  In other words, I have a call that looks something like:    x = Foo.bar() and I would like to generalise this

Re: from __future__ import print

2008-04-13 Thread Lie
On Apr 11, 7:26 pm, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] a écrit : Am I the only one that thinks this would be useful? :) I'd really like to be able to use python 3.0's print statement in 2.x. nitpick mode=pedantic FWIW, the whole point is that in 3.0,

Re: How is GUI programming in Python?

2008-04-13 Thread Michel Bouwmans
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Torsten Bronger wrote: Hallöchen! Und auch ein hallo, aus den Niederlanden! :P Michel Bouwmans writes: Gabriel Genellina wrote: Michel Bouwmans [EMAIL PROTECTED] escribió: Gabriel Genellina wrote: Another annoying thing with the Qt

Re: Call a classmethod on a variable class name

2008-04-13 Thread Matthew Keene
Arnaud Delobelle wrote: If your class lives in the current global namespace, you can get it with cls = globals()[classname] Then you can access its .bar() method directly: cls.bar() Example: class Foo(object): ... @classmethod ... def bar(cls): print 'Oh my

latest command from toplevel?

2008-04-13 Thread skanemupp
windows vista and python 2.5, is there a way to get the latest command entered? would be very useful. if not by default, anything i could download or write myself? -- http://mail.python.org/mailman/listinfo/python-list

Re: 有中国人乎?

2008-04-13 Thread Penny Y.
[EMAIL PROTECTED] 写道: Python这种语言有前途吗?在下想学他一学. hehe, so humorous you are! Yes I think python has good future. But it depends on what you use it to do. If you're a singer, a financier, a historian etc, you don't need python. But if you are playing in computer programming, it's valuable for you to

Re: SQLite OperationalError near ?

2008-04-13 Thread Hexade
On 13 avr, 03:00, John Machin [EMAIL PROTECTED] wrote: On Apr 13, 8:45 am, Hexade [EMAIL PROTECTED] wrote: Hello I would like to use the safe ? placeholder in my SQLite requests but I got the following error: Traceback (most recent call last):   (...)   cursor.execute(SELECT ? FROM

Re: Looking for a way to include Pyhtho scripting INSIDE a python program

2008-04-13 Thread Paddy
On Apr 13, 4:16 am, John Antypas [EMAIL PROTECTED] wrote: Hello all, I'm writing in tool in Python that manipulates various data objects read from various streams. I wanted to give the user a chance to do advanced work that could not easily be done from a GUI. At first, I tried putting in

Re: 有中国人乎?

2008-04-13 Thread Steve Holden
[EMAIL PROTECTED] wrote: Python这种语言有前途吗?在下想学他一学. 是, Python 有未来。但学会从未是立即, 和将需要一点时间。 regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: C to python conversion

2008-04-13 Thread Ivan Illarionov
On Apr 13, 7:58 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 12 Apr 2008 07:58:47 -0300, Michele Petrazzo [EMAIL PROTECTED] escribió: Hi all, I'm trying to translate a simple C code into a python + ctypes (where need), but I have some problems on char conversion. The code have

Re: String Literal to Blob

2008-04-13 Thread Steve Holden
Jason Scheirer wrote: [...] There _is_ a way to embed image data in HTML that is supported by every major browser. It is ugly. Using the RFC 2397 (http:// www.ietf.org/rfc/rfc2397) spec for data URLs you could go 'img src=data:image/jpg;base64,%s' % base64.b64encode(image_data)

How to Choose an Unlimited Web Hosting for free

2008-04-13 Thread Unlimited Free Domain Web Hosting
How to Choose an Unlimited Web Hosting 1) Visit www.axealis.com to get domain and hosting 2) Unlimited Bandwidth ,this mean unlimited data transmission for your client access. 2) Unlimited Space , you can upload file for unlimited . 3) Unlimited Email , many of email account can created . 5) SSL

Re: Rounding a number to nearest even

2008-04-13 Thread Steve Holden
Lie wrote: On Apr 12, 3:44 am, hdante [EMAIL PROTECTED] wrote: [snip] In short, choosing that x.0 is rounded down and x.5 is rounded up is arbitrary but not without a reason. Don't arbitrary and not without a reason directly contradict one another? regards Steve -- Steve Holden

Re: from __future__ import print

2008-04-13 Thread Roy Smith
In article [EMAIL PROTECTED], Lie [EMAIL PROTECTED] wrote: I wish py3k would make it an option whether to treat print as statement or function though. Arrrggh! No, don't even go there. If you want optional parens, use Perl :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a way to include Pyhtho scripting INSIDE a python program

2008-04-13 Thread Ivan Illarionov
On Apr 13, 7:16 am, John Antypas [EMAIL PROTECTED] wrote: Hello all, I'm writing in tool in Python that manipulates various data objects read from various streams. I wanted to give the user a chance to do advanced work that could not easily be done from a GUI. At first, I tried putting in

Re: tkinter, annoying grid-problem

2008-04-13 Thread Bryan Oakley
[EMAIL PROTECTED] wrote: so my little calculator works perfectly now. just having some trouble with the layout. this whole tkinter-thing seems to be more tricky than it should be. how can i make the 4 column of buttons have the same distance and size between them as the other 3 columns? and

py2exe, program has stoped working!?

2008-04-13 Thread skanemupp
so i used py2exe and i have the build and the dist-folders. in the distfolder there is a Calculator.exe file. when i run it it just says Calculator.exe has stopped working in a popup but the program itself never shows up. wtf!? and when im distributing my program i have to include both

PIL and true type fonts

2008-04-13 Thread Laszlo Nagy
Attached a screenshot from a text rendered by GIMP (left side) and PIL (right side). Same truetype font. Is this a bug in PIL? Thanks, Laszlo inline: 1.JPG-- http://mail.python.org/mailman/listinfo/python-list

Re: Rounding a number to nearest even

2008-04-13 Thread Mark Dickinson
On Apr 13, 4:18 am, Lie [EMAIL PROTECTED] wrote: [...] it and there is nothing else in it, but in the second number range (barely above 1 to 2) the number 1.0 is not included while the number 2.0 is contained in it, clearly not a clean separation of numbers in the form of y.x where y is

Module to read input from commandline

2008-04-13 Thread james
Hi all, I did some quick searching but I haven't found anything like I want. It probably has to do with the terms I am searching for so if I describe what I want then I hope someone can point me to a good module. I want to take input from the user at the command line. e.g.) Would you like to

Re: Call a classmethod on a variable class name

2008-04-13 Thread Gary Herron
Matthew Keene wrote: I would like to be able to call a specific classmethod on a class name that is going to be passed from another parameter. In other words, I have a call that looks something like: x = Foo.bar() and I would like to generalise this so that I can make this call on any

Re: How to Choose an Unlimited Web Hosting for free

2008-04-13 Thread John Nagle
Unlimited Free Domain Web Hosting wrote: How to Choose an Unlimited Web Hosting 1) Visit www.axealis.com to get domain and hosting 2) Unlimited Bandwidth ,this mean unlimited data transmission for your client access. 2) Unlimited Space , you can upload file for unlimited . 3) Unlimited

Re: How to Choose an Unlimited Web Hosting for free

2008-04-13 Thread Marc 'BlackJack' Rintsch
On Sun, 13 Apr 2008 08:42:52 -0700, John Nagle wrote: Unlimited Free Domain Web Hosting wrote: How to Choose an Unlimited Web Hosting 1) Visit www.xxx.com to get domain and hosting 2) Unlimited Bandwidth ,this mean unlimited data transmission for your client access. 2) Unlimited Space

Re: str(bytes) in Python 3.0

2008-04-13 Thread Kay Schluehr
On 13 Apr., 09:24, Carl Banks [EMAIL PROTECTED] wrote: On Apr 12, 11:51 am, Kay Schluehr [EMAIL PROTECTED] wrote: On 12 Apr., 16:29, Carl Banks [EMAIL PROTECTED] wrote: And making an utf-8 encoding default is not possible without writing a new function? I believe the Zen in effect

Tkinter, image not appearing in function but without function

2008-04-13 Thread skanemupp
why is the first program not working? when i click the screen the map is not appearing. the second program works. from Tkinter import * master = Tk() w = Canvas(master, width=700, height=600) w.pack(expand = YES, fill = BOTH) def mapper(): mapq = PhotoImage(file =

email module windows and suse

2008-04-13 Thread Lev Elbert
Hi, all! I have to make a custom email module, based on the standard one. The custom module has to be able to work with extremely large mails (1GB +), having memory footprint much smaller. The modified program has to work in SUSE environment, while the development is done under Windows. I'm not

Re: PythonWin Print Problem.. Build 210

2008-04-13 Thread Hutch
Roger Upole [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hutch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PythonWin has been a very good ide from early version thru 2.4. All work ok on THREE of my computers with THREE different HP printers. Now comes 2.5.

Re: Tremendous slowdown due to garbage collection

2008-04-13 Thread Rhamphoryncus
On Apr 12, 6:58 pm, Steve Holden [EMAIL PROTECTED] wrote: Paul Rubin wrote: Steve Holden [EMAIL PROTECTED] writes: I believe you are making surmises outside your range of competence there. While your faith in the developers is touching, the garbage collection scheme is something that has

Re: C API design flaw (was: Re: Multiple independent Python interpreters in a C/C++ program?)

2008-04-13 Thread Rhamphoryncus
On Apr 12, 2:02 pm, sturlamolden [EMAIL PROTECTED] wrote: On Apr 12, 7:05 pm, sturlamolden [EMAIL PROTECTED] wrote: In theory, a GIL private to each (sub)interpreter would make Python more scalable. The current GIL behaves like the BKL in earlier Linux kernels. However, some third-party

Re: Looking for a way to include Pyhtho scripting INSIDE a python program

2008-04-13 Thread Bryan Oakley
Ivan Illarionov wrote: You don't need to envoke another interpreter. Python can interpret arbitrary python code with exec statement. Wrap user's string inside function definition, and exec it. You might want to disable words like `import`, `exec` and `eval` in user's code because it's a

Re: Interesting math problem

2008-04-13 Thread Ivan Illarionov
On Mar 19, 2:17 pm, BJörn Lindqvist [EMAIL PROTECTED] wrote: On Mon, Mar 17, 2008 at 11:57 PM, Arnaud Delobelle [EMAIL PROTECTED] wrote: def make_slope(distance, parts): step = distance / float(parts) intstep = int(step) floatstep = step - intstep steps =

Compiling Python 2.5.2 on AIX 5.2

2008-04-13 Thread Randy . Galbraith
I'm investigating the possible use of Mecurial SCM as a replacement for CVS. Mecurial is written in Python. I have a background in GNU/ Linux, Solaris, sparc and Perl. However AIX, powerpc and Python are new to me. --uname output-- $ uname -rvp 2 5 powerpc --end uname output-- I used this

tkinter, canvas, get color of image?

2008-04-13 Thread skanemupp
mapq = PhotoImage(file = 'C:\Users\saftarn\Desktop\elmapovic.gif') w.create_image(10, 10, image = mapq, anchor = NW) after doing this is there any possibility of getting the characteristics of the GIF-picture(or bitmap if i use that)? it would be very helpfull if i for example could do something

Re: Module to read input from commandline

2008-04-13 Thread Ben Kaplan
Unless I misunderstand your needs, you could just use raw_input(prompt) to get your answers. - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: python-list@python.org Sent: Sunday, April 13, 2008 11:12:06 AM Subject: Module to read input from commandline Hi all, I did

Re: Tkinter, image not appearing in function but without function

2008-04-13 Thread Marc 'BlackJack' Rintsch
On Sun, 13 Apr 2008 08:57:29 -0700, skanemupp wrote: why is the first program not working? when i click the screen the map is not appearing. the second program works. from Tkinter import * master = Tk() w = Canvas(master, width=700, height=600) w.pack(expand = YES, fill = BOTH)

Re: tkinter, canvas, get color of image?

2008-04-13 Thread Bryan Oakley
[EMAIL PROTECTED] wrote: mapq = PhotoImage(file = 'C:\Users\saftarn\Desktop\elmapovic.gif') w.create_image(10, 10, image = mapq, anchor = NW) after doing this is there any possibility of getting the characteristics of the GIF-picture(or bitmap if i use that)? it would be very helpfull if

Re: Looking for a way to include Pyhtho scripting INSIDE a python program

2008-04-13 Thread Ivan Illarionov
On Apr 13, 8:20 pm, Bryan Oakley [EMAIL PROTECTED] wrote: Ivan Illarionov wrote: You don't need to envoke another interpreter. Python can interpret arbitrary python code with exec statement. Wrap user's string inside function definition, and exec it. You might want to disable words like

urllib2 Basic authentication, what am I doing wrong?

2008-04-13 Thread Michel Bouwmans
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey everybody, I'm having a little problem with urllib2 and Basic HTTP authentication. I have the following code: auth = urllib2.HTTPPasswordMgrWithDefaultRealm() auth.add_password(None, 'https://webmail.osg-erasmus.nl/oneNet/NetStorage/', user,

Re: class level properties

2008-04-13 Thread Charles D Hixson
Peter Otten wrote: Charles D Hixson wrote: I want a hundred or so read-only variables, and I'm not sure the best way to achieve it. What do you really want to do? I recommend that you forget about bondage and rely upon displine: class Test(object): Never change an attribute

Re: Module to read input from commandline

2008-04-13 Thread thashooski
What you're looking for is no module, it is included in the standard python namespace. raw_input Use it like this: value_a = raw_input(Please give a value for a: ) # do your thing to value_a But this belongs to the real basics, I suggest you get some reading done on python. GL --

Re: toplevel, get latest entry?

2008-04-13 Thread Gabriel Genellina
En Sat, 12 Apr 2008 17:50:36 -0300, [EMAIL PROTECTED] escribió: windows vista and python 2.5, is there a way to get the latest command entered? would be very useful. if not by default, anything i could download or write myself? Do you mean inside the interpreter? Use up arrow/down arrow.

Re: Controlling copying and pickling of objects written in C

2008-04-13 Thread Gabriel Genellina
En Sun, 13 Apr 2008 01:57:42 -0300, Adam Bregenzer [EMAIL PROTECTED] escribió: I am writing an extension and have hidden data included in the object's C structure that is not visible to python. I am unsure what would happen to that data if the python object were copied or pickled and would

Re: py2exe, program has stoped working!?

2008-04-13 Thread Gabriel Genellina
En Sun, 13 Apr 2008 10:52:06 -0300, [EMAIL PROTECTED] escribió: so i used py2exe and i have the build and the dist-folders. and when im distributing my program i have to include both catalogues right? You only have to distribute the contents of the dist directory. (I have no idea what the

Re: urllib2 Basic authentication, what am I doing wrong?

2008-04-13 Thread Max Erickson
On Apr 13, 2:11 pm, Michel Bouwmans [EMAIL PROTECTED] wrote: Using this nice class (adapted to urllib2) as a basehandler I see that no Authentication-header is being send out:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440574 What am I doing wrong here? I spend almost my entire

Re: Module to read input from commandline

2008-04-13 Thread james
On Apr 13, 7:44 pm, [EMAIL PROTECTED] wrote: What you're looking for is no module, it is included in the standard python namespace. raw_input Use it like this: value_a = raw_input(Please give a value for a: ) # do your thing to value_a But this belongs to the real basics, I suggest you

Re: Interesting math problem

2008-04-13 Thread Arnaud Delobelle
On Apr 13, 5:35 pm, Ivan Illarionov [EMAIL PROTECTED] wrote: On Mar 19, 2:17 pm, BJörn Lindqvist [EMAIL PROTECTED] wrote: On Mon, Mar 17, 2008 at 11:57 PM, Arnaud Delobelle [EMAIL PROTECTED] wrote:   def make_slope(distance, parts):       step = distance / float(parts)      

Re: PythonWin Print Problem.. Build 210

2008-04-13 Thread Jaguillo
On Apr 13, 9:07 am, Hutch [EMAIL PROTECTED] wrote: Roger Upole [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hutch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PythonWin has been a very good ide from early version thru 2.4. All work ok on THREE of my

Re: class level properties

2008-04-13 Thread Peter Otten
Charles D Hixson wrote: Peter Otten wrote: Charles D Hixson wrote: I want a hundred or so read-only variables, and I'm not sure the best way to achieve it. What do you really want to do? I recommend that you forget about bondage and rely upon displine: class Test(object):

Re: subprocess.popen function with quotes

2008-04-13 Thread skunkwerk
On Mar 26, 10:33 pm, skunkwerk [EMAIL PROTECTED] wrote: On Mar 26, 8:05 am, Jeffrey Froman [EMAIL PROTECTED] wrote: skunkwerkwrote: p = subprocess.Popen(['rename','-vn','s/(.*)\.htm$/ model.html/','*.htm'],stdout=subprocess.PIPE,stderr=subprocess.PIPE) print p.communicate()[0] i

Re: urllib2 Basic authentication, what am I doing wrong?

2008-04-13 Thread 7stud
Michel Bouwmans wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey everybody, I'm having a little problem with urllib2 and Basic HTTP authentication. I have the following code: auth = urllib2.HTTPPasswordMgrWithDefaultRealm() auth.add_password(None,

A Fixed Tk Text widget

2008-04-13 Thread Ron Provost
I have just completed and uploaded to the Tkinter wiki a Fixed version of the Tk Text widget called EnhancedText. This new widget (subclassed from Text) is intended to fix some of the quirks of the Text widget involving cursor movement. Namely, in Text, the cursor moves by paragraph rather

Re: urllib2 Basic authentication, what am I doing wrong?

2008-04-13 Thread Michel Bouwmans
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Max Erickson wrote: On Apr 13, 2:11 pm, Michel Bouwmans [EMAIL PROTECTED] wrote: Using this nice class (adapted to urllib2) as a basehandler I see that no Authentication-header is being send

Re: email module windows and suse

2008-04-13 Thread Tim Roberts
Lev Elbert [EMAIL PROTECTED] wrote: I have to make a custom email module, based on the standard one. The custom module has to be able to work with extremely large mails (1GB +), having memory footprint much smaller. Then you have a design problem right from the start. It is extremely rare to

Re: Controlling copying and pickling of objects written in C

2008-04-13 Thread Adam Bregenzer
On Sun, 13 Apr 2008 16:49:51 -0300, Gabriel Genellina wrote: En Sun, 13 Apr 2008 01:57:42 -0300, Adam Bregenzer [EMAIL PROTECTED] escribió: I am writing an extension and have hidden data included in the object's C structure that is not visible to python. I am unsure what would happen to

Re: py2exe, program has stoped working!?

2008-04-13 Thread John Machin
On Apr 13, 11:52 pm, [EMAIL PROTECTED] wrote: so i used py2exe and i have the build and the dist-folders. in the distfolder there is a Calculator.exe file. when i run it it just says Calculator.exe has stopped working in a popup but the program itself never shows up. Is it a console

Re: email module windows and suse

2008-04-13 Thread Lev Elbert
On Apr 13, 3:55 pm, Tim Roberts [EMAIL PROTECTED] wrote: Lev Elbert [EMAIL PROTECTED] wrote: I have to make a custom email module, based on the standard one. The custom module has to be able to work with extremely large mails (1GB +), having memory footprint much smaller. Then you have a

Remove my mail, please !

2008-04-13 Thread Alderos Martins
Please, remove my mail in to python list. I don´t receive mails. Thank´s. Alderos. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter, image not appearing in function but without function

2008-04-13 Thread 7stud
On Apr 13, 11:12 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Sun, 13 Apr 2008 08:57:29 -0700, skanemupp wrote: why is the first program not working? when i click the screen the map is not appearing. the second program works. from Tkinter import * master = Tk() w =

Best way to update a settings file?

2008-04-13 Thread John Salerno
I'm thinking about writing a small script that will update an xml file with whatever game settings the user enters. I imagine that the user will have a single-screen GUI application with several different settings, like this: CROSSHAIRS ON LOCATION ON HEALTHBAROFF etc. These

about the ';'

2008-04-13 Thread Penny Y.
I saw many python programmers add a ';' at the end of each line. As good style, should or should not we do coding with that? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to update a settings file?

2008-04-13 Thread John Nagle
John Salerno wrote: I'm thinking about writing a small script that will update an xml file with whatever game settings the user enters. I imagine that the user will have a single-screen GUI application with several different settings, like this: CROSSHAIRS ON LOCATION ON

Re: about the ';'

2008-04-13 Thread Dan Bishop
On Apr 13, 10:33 pm, Penny Y. [EMAIL PROTECTED] wrote: I saw many python programmers add a ';' at the end of each line. As good style, should or should not we do coding with that? That's just because their fingers are stuck in C mode. The recommended style is NOT to use unnecessary semicolons.

urllib working differently when run from crontab

2008-04-13 Thread VictorMiller
I've written a python script which, using urllib, and urllib2 will fetch a number of files that that I'm interested in from various websites (they're updated everyday). When I run the script from my command line everything works as intended. However, when the script is run from crontab every

Re: about the ';'

2008-04-13 Thread Terry Reedy
Penny Y. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] |I saw many python programmers add a ';' at the end of each line. | As good style, should or should not we do coding with that? NOO... Read PEP8 for one style guide (for new stdlib code). --

Host: header

2008-04-13 Thread Penny Y.
Hello, I have a problem with a request url,for example, I have the code below, import httplib try: conn = httplib.HTTPConnection(192.168.1.1) conn.request(GET, /) r1 = conn.getresponse() if r1.status == 200: result = 0 except Exception: result = -1 but the server

Re: How is GUI programming in Python?

2008-04-13 Thread Gabriel Genellina
En Sat, 12 Apr 2008 15:38:22 -0300, Michel Bouwmans [EMAIL PROTECTED] escribió: Gabriel Genellina wrote: En Fri, 11 Apr 2008 11:31:42 -0300, Michel Bouwmans [EMAIL PROTECTED] escribió: Gabriel Genellina wrote: Another annoying thing with the Qt license is that you have to choose it at

ANN: Tobu-0.5.0

2008-04-13 Thread AK
Tobu 0.5.0 is now available. Tobu is something between a freeform information organizer and a database. Changes since last version were: Added multiple undo/redo, toolbar icon for list recent; Fixed loading a previously selected item from listing, disabled closing of last remaining tab, fixed

Re: Recommendation for Web Framework

2008-04-13 Thread Daniel Fetchinson
On Sun, Apr 13, 2008 at 12:18 AM, James West [EMAIL PROTECTED] wrote: Let me explain my situation a bit. I've been contracted to develop an ecommerce site. It's nothing too huge but requires a lot of custom development that's not typical for your run of the mill webstore. I've got about

how to remove \n in the list

2008-04-13 Thread reetesh nigam
hi, l=['5\n', '2\n', '7\n', '3\n', '6\n'] how to remove \n from the given list -- http://mail.python.org/mailman/listinfo/python-list

Re: Host: header

2008-04-13 Thread Gabriel Genellina
En Mon, 14 Apr 2008 01:04:40 -0300, Penny Y. [EMAIL PROTECTED] escribió: I have a problem with a request url,for example, I have the code below, import httplib try: conn = httplib.HTTPConnection(192.168.1.1) conn.request(GET, /) r1 = conn.getresponse() if r1.status ==

Re: how to remove \n in the list

2008-04-13 Thread Gabriel Genellina
En Mon, 14 Apr 2008 01:41:55 -0300, reetesh nigam [EMAIL PROTECTED] escribió: hi, l=['5\n', '2\n', '7\n', '3\n', '6\n'] how to remove \n from the given list l is is very poor name... I'll use lines instead: lines[:] = [line.rstrip('\n') for line in lines] -- Gabriel Genellina --

Re: urllib working differently when run from crontab

2008-04-13 Thread Jonathan Gardner
On Apr 13, 8:50 pm, VictorMiller [EMAIL PROTECTED] wrote: I've written a python script which, using urllib, and urllib2 will fetch a number of files that that I'm interested in from various websites (they're updated everyday).  When I run the script from my command line everything works as

[issue1481036] IOBaseError

2008-04-13 Thread Armin Rigo
Armin Rigo [EMAIL PROTECTED] added the comment: This will break many existing applications, no? I can easily think of examples of reasonable code that would no longer work as intended. What's even worse, breakage might only show up in exceptional cases and give obscure results (e.g. reporting

[issue2530] Document IO module

2008-04-13 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Should be fixed now with the latest Sphinx revision. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2530 __ ___

[issue992389] attribute error after non-from import

2008-04-13 Thread Torsten Bronger
Torsten Bronger [EMAIL PROTECTED] added the comment: I dare to make a follow-up although I have no idea at all about the internal processes in the Python interpreter. But I've experimented with circular imports a lot recently. Just two points: First, I think that circular imports don't

[issue2624] swig support in distutils should use the build and temp dirs

2008-04-13 Thread Kjell Braden
Kjell Braden [EMAIL PROTECTED] added the comment: Note that the language specific files can't be handled via py_modules because this is processed before their generation. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2624

[issue2620] Multiple buffer overflows in unicode processing

2008-04-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg [EMAIL PROTECTED] added the comment: On 32-bit platforms, it's probably best to add a size check. I don't it's worth doing that on 64-bit platforms - overflows are rather unlikely there. __ Tracker [EMAIL PROTECTED]

[issue1481036] IOBaseError

2008-04-13 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Py3k then? -- versions: +Python 3.0 -Python 2.6 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1481036 _

[issue2530] Document IO module

2008-04-13 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: And I have fleshed out the doc strings and backported it to 2.6. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2530 __

[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Christian Heimes
Christian Heimes [EMAIL PROTECTED] added the comment: I'm going to review the patch later. How are we going to back port the stuff to 2.6? -- nosy: +tiran __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __

[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Christian Heimes
Christian Heimes [EMAIL PROTECTED] added the comment: Hey Alexandre! The latest patch doesn't apply cleanly. Please provide a new patch. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __

[issue902061] pydoc insists upon producing file: URLs

2008-04-13 Thread Ron Adam
Ron Adam [EMAIL PROTECTED] added the comment: The following patch also fixes this along with other improvements. Maybe someone can review it. http://bugs.python.org/issue2001 -- nosy: +ron_adam Tracker [EMAIL PROTECTED]

[issue2627] mark pgen generated files

2008-04-13 Thread Benjamin Peterson
New submission from Benjamin Peterson [EMAIL PROTECTED]: This patch makes pgen note that it generated the file at the top. -- assignee: georg.brandl components: Interpreter Core files: pgen_generated.patch keywords: easy, patch messages: 65447 nosy: benjamin.peterson, georg.brandl

[issue2627] mark pgen generated files

2008-04-13 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Fine with me if you convert the spaces to a tab first. -- assignee: georg.brandl - benjamin.peterson __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2627 __

[issue2624] swig support in distutils should use the build and temp dirs

2008-04-13 Thread Kjell Braden
Changes by Kjell Braden [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10017/python_distutils+swig.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2624 __ ___

[issue2624] swig support in distutils should use the build and temp dirs

2008-04-13 Thread Kjell Braden
Changes by Kjell Braden [EMAIL PROTECTED]: -- components: +Distutils -Demos and Tools __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2624 __ ___ Python-bugs-list

[issue2627] mark pgen generated files

2008-04-13 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Committed in r62329. -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2627 __

  1   2   >