Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-25 Thread News123
News123 wrote: Hi, I'm trying to scan a document from a python 2.6 script without user interaction. I found a code snippet, that allows me to scan under Vista, but that doesn't allow me to select the dpi / color mode / etc. I'm still stuck. I'll try to look at any solution (visual

Re: CentOS 5.3 vs. Python 2.5

2009-11-25 Thread Steven D'Aprano
On Tue, 24 Nov 2009 22:42:28 -0800, John Nagle wrote: My dedicated hosting provider wants to switch me to a new server with CentOS 5.3, so I have to look at how much work is required. CentOS 5.3 apparently still ships with Python 2.4. Worse, it requires Python 2.4 for its own internal

Re: Beginning Question about Python functions, parameters...

2009-11-25 Thread Bruno Desthuilliers
astral orange a écrit : On Nov 23, 10:37 pm, r rt8...@gmail.com wrote: (snip) This is a horrible example to show noobs. I think the OP could better understand this as a class EVEN though the OP may or may not know what a class *is* yet. class Name(): def __init__(self, first,

How to import a file by its full path using C api?

2009-11-25 Thread lallous
Hello PyObject* PyImport_ImportModule( const char *name) How to specify a full file path instead and a module name? Like PyImport_SomeFunction(const char *path_to_script, const char *name) Thanks, Elias -- http://mail.python.org/mailman/listinfo/python-list

Re: CentOS 5.3 vs. Python 2.5

2009-11-25 Thread Jon Clements
On Nov 25, 8:13 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Tue, 24 Nov 2009 22:42:28 -0800, John Nagle wrote: My dedicated hosting provider wants to switch me to a new server with CentOS 5.3, so I have to look at how much work is required.     CentOS 5.3 apparently

Re: Can self crush itself?

2009-11-25 Thread n00m
Then how can we destroy the 3rd instance, right after its creation and from inside class Moo code? class Moo: cnt = 0 def __init__(self, x): self.x = x self.__class__.cnt += 1 if self.__class__.cnt 2: print id(self) ## 13406816

Re: Can self crush itself?

2009-11-25 Thread Chris Rebert
On Wed, Nov 25, 2009 at 1:46 AM, n00m n...@narod.ru wrote: Then how can we destroy the 3rd instance, right after its creation and from inside class Moo code? Why would you want to do that in the first place? It's strange to say the least. If you want to prevent an instance being created in the

Re: attributes, properties, and accessors -- philosophy

2009-11-25 Thread Bruno Desthuilliers
Ethan Furman a écrit : Let's head towards murkier waters (at least murkier to me -- hopefully they can be easily clarified): some of the attributes are read-only, such as record count; others are not directly exposed, but still settable, such as table version; and still others require a

Re: attributes, properties, and accessors -- philosophy

2009-11-25 Thread Bruno Desthuilliers
Ethan Furman a écrit : (snip) Okay, I'll go back and switch all my attributes *back* to attributes -- and properties will be much nicer than my original implementation (using __getattr__ and __setattr__). It will also be faster FWIW. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can self crush itself?

2009-11-25 Thread Ben Finney
n00m n...@narod.ru writes: Then how can we destroy the 3rd instance, right after its creation and from inside class Moo code? Normally, one binds whatever references one needs, and lets the garbage collector clean them up once they fall out of scope. If the references are living beyond their

Re: How to log messages _only once_ from all modules ?

2009-11-25 Thread Jean-Michel Pichavant
Barak, Ron wrote: Hi, I'm trying to add the logging module to my application, but I seem to be missing something. My application (a wxPython one) has a main script that calls various helper classes. I want the log messages from all modules to go to one central log file. When I implement

Re: pointless musings on performance

2009-11-25 Thread Antoine Pitrou
Le Tue, 24 Nov 2009 22:08:19 +, Benjamin Peterson a écrit : Would it be worth in-lining the remaining part of PyObject_IsTrue in ceval? Inlining by hand is prone to error and maintainability problems. Which is why we like to do it :-)) --

Re: pointless musings on performance

2009-11-25 Thread Antoine Pitrou
Le Tue, 24 Nov 2009 16:09:10 -0800, Paul Boddie a écrit : I'm referring to what you're talking about at the end. The enhancements in Python 3 presumably came about after discussion of threaded interpreters, confirming that the evaluation loop in Python 2 was not exactly optimal. An optimal

Help with pprint

2009-11-25 Thread Nadav Chernin
Hello, I want to print list of lists in matrix format. So I use pprint with parameter 'width' for this target. For example : data=[[1, 1, 1], [1, 1, 1], [1, 1, 1]] pprint(data,width=20) [[1, 1, 1], [1, 1, 1], [1, 1, 1]] The problem that I don't know how to select width value,

(pywin related) pywintypes.com_error: -2147417846 Application busy

2009-11-25 Thread Alexander Eisenhuth
Hello list, I'm having a problem with a python COM Excel client that rarely gets the exception pywintypes.com_error with the error code -2147417846. (means Excel is busy) Here the python code of the exception handling: [...] try: # write a excel cell [...] except pywintypes.com_error,

Re: (pywin related) pywintypes.com_error: -2147417846 Application busy

2009-11-25 Thread Michel Claveau - MVP
Hi! Your computer is too slow, for launch Excel. Configure the machine for more speed... @+ -- MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw strings as input from File?

2009-11-25 Thread Jon Clements
On Nov 25, 3:31 am, Grant Edwards inva...@invalid.invalid wrote: On 2009-11-25, Rhodri James rho...@wildebst.demon.co.uk wrote: On Tue, 24 Nov 2009 21:20:25 -, utabintarbo utabinta...@gmail.com   wrote: On Nov 24, 3:27 pm, MRAB pyt...@mrabarnett.plus.com wrote: .readlines()

Re: (pywin related) pywintypes.com_error: -2147417846 Application busy

2009-11-25 Thread Alexander Eisenhuth
I don't think so, because it happens very rarely Michel Claveau - MVP schrieb: Hi! Your computer is too slow, for launch Excel. Configure the machine for more speed... @+ -- http://mail.python.org/mailman/listinfo/python-list

'classmethod' object has only read-only attributes

2009-11-25 Thread Thomas Guettler
Hi, why have classmethods only readonly attributes? It works for other methods. exmpale code: {{{ class Foo(object): @classmethod def bar(cls): pass bar.myattr='test' }}} u...@host:~ python ~/tmp/t.py Traceback (most recent call last): File /home/user/tmp/t.py, line 1, in

Re: How to import a file by its full path using C api?

2009-11-25 Thread lallous
Looks like one way to do that is to use something like: s.sprintf( import imp\n imp.load_source('%s', r'%s'), modname, script_path); PyRun_SimpleString(s.c_str()); Unless someone has a better suggestion. Regards, Elias lallous lall...@lgwm.org wrote in message

Re: 'classmethod' object has only read-only attributes

2009-11-25 Thread Peter Otten
Thomas Guettler wrote: Hi, why have classmethods only readonly attributes? It works for other methods. exmpale code: {{{ class Foo(object): @classmethod def bar(cls): pass bar.myattr='test' }}} u...@host:~ python ~/tmp/t.py Traceback (most recent call last):

Re: Beginning Question about Python functions, parameters...

2009-11-25 Thread Lie Ryan
astral orange wrote: As for the class Name(): example above? Even though I haven't seen exactly what purpose 'self' serves In many other programming language, self (or this, or Me) refers the the current class instance. In some languages, you can refer to an instance attribute without an

Workaround To Add Value To TextArea

2009-11-25 Thread Victor Subervi
Hi; I've noticed that html doesn't support a value attribute for textarea. I have a form in which I enable users to edit data they've entered into my database, and one of the data is a textarea. How do I fill the textarea with the value, or what kind of workaround can I create? TIA, Victor --

Re: Workaround To Add Value To TextArea

2009-11-25 Thread Rami Chowdhury
Rami Chowdhury Never assume malice when stupidity will suffice. -- Hanlon's Razor 408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD) On Wed, Nov 25, 2009 at 07:19, Victor Subervi victorsube...@gmail.com wrote: Hi; I've noticed that html doesn't support a value attribute for

Re: Workaround To Add Value To TextArea

2009-11-25 Thread Victor Subervi
On Wed, Nov 25, 2009 at 10:27 AM, Rami Chowdhury rami.chowdh...@gmail.comwrote: You'll find the textarea and input tags differ significantly, even though they're both typically used in HTML forms. The W3C page has a fair overview of how various parts of HTML forms work in HTML 4.01, and it's

Re: attributes, properties, and accessors -- philosophy

2009-11-25 Thread Ethan Furman
Bruno Desthuilliers wrote: Ethan Furman a écrit : Let's head towards murkier waters (at least murkier to me -- hopefully they can be easily clarified): some of the attributes are read-only, such as record count; others are not directly exposed, but still settable, such as table version;

Re: Workaround To Add Value To TextArea

2009-11-25 Thread Jitish
On Nov 25, 8:27 pm, Rami Chowdhury rami.chowdh...@gmail.com wrote: Rami Chowdhury Never assume malice when stupidity will suffice. -- Hanlon's Razor 408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD) On Wed, Nov 25, 2009 at 07:19, Victor Subervi victorsube...@gmail.com wrote:

Re: IDE+hg

2009-11-25 Thread NiklasRTZ
On Nov 23, 11:37 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Mon, 23 Nov 2009 19:20:27 -, NiklasRTZ nikla...@gmail.com wrote: Dear experts, Since no py IDE I found has easy hg access. IDEs PIDA and Eric claim Mercurial support not found i.e. buttons to clone, commit and push

Re: IDE+hg

2009-11-25 Thread NiklasRTZ
On Nov 24, 2:35 pm, Gerhard Häring g...@ghaering.de wrote: Rhodri James wrote: On Mon, 23 Nov 2009 19:20:27 -, NiklasRTZ nikla...@gmail.com wrote: Dear experts, Since no py IDE I found has easy hg access. IDEs PIDA and Eric claim Mercurial support not found i.e. buttons to clone,

Re: IDE+hg

2009-11-25 Thread NiklasRTZ
On Nov 24, 3:13 pm, Richard Riley rileyrg...@gmail.com wrote: Gerhard Häring g...@ghaering.de writes: Rhodri James wrote: On Mon, 23 Nov 2009 19:20:27 -, NiklasRTZ nikla...@gmail.com wrote: Dear experts, Since no py IDE I found has easy hg access. IDEs PIDA and Eric claim Mercurial

Re: creating pipelines in python

2009-11-25 Thread per
Thanks to all for your replies. i want to clarify what i mean by a pipeline. a major feature i am looking for is the ability to chain functions or scripts together, where the output of one script -- which is usually a file -- is required for another script to run. so one script has to wait for

Re: attributes, properties, and accessors -- philosophy

2009-11-25 Thread Bruno Desthuilliers
Ethan Furman a écrit : Very helpful, thank you. Hopefully my brain will be up to the descriptor protocol this time... the last couple times were, um, less than successful. :) Well, it's quite simple in fact. Most of the magic happens in object.__getattribute__ and object.__setattr__.

Re: csv and mixed lists of unicode and numbers

2009-11-25 Thread M.-A. Lemburg
Sibylle Koczian wrote: Hello, I want to put data from a database into a tab separated text file. This looks like a typical application for the csv module, but there is a snag: the rows I get from the database module (kinterbasdb in this case) contain unicode objects and numbers. And of

Re: Help with pprint

2009-11-25 Thread Emile van Sebille
On 11/25/2009 4:47 AM Nadav Chernin said... Hello, I want to print list of lists in matrix format. So I use pprint with parameter ‘width’ for this target. snip The problem that I don’t know how to select width value, because if: data=[['one', 'one', 'one'], ['one', 'one', 'one'], ['one',

Re: How to run python script in emacs

2009-11-25 Thread doug
When I type C-c C-c my emacs window just hangs. If I use Task Manager to kill cmdproxy I can get emacs back but of course interactivity with Python is not accomplished. By the way, if I do C-c ! then I get a functional python shell. Does anybody know a solution to this? On Oct 13, 7:12 am,

Re: CentOS 5.3 vs. Python 2.5

2009-11-25 Thread Jeff McNeil
On Nov 25, 4:45 am, Jon Clements jon...@googlemail.com wrote: On Nov 25, 8:13 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Tue, 24 Nov 2009 22:42:28 -0800, John Nagle wrote: My dedicated hosting provider wants to switch me to a new server with CentOS 5.3, so I

Python Statements/Keyword Localization

2009-11-25 Thread Emanuele D'Arrigo
Greetings everybody, some time ago I saw a paper that used an XSL transformation sheet to transform (if I remember correctly) a Chinese xml file (inclusive of Chinese-script XML tags) into an XHTML file. More recently you might have all heard how the ICANN has opened up the way for non-latin

A language for S40 mobiles

2009-11-25 Thread Saket Bharambe
Hey, I have recently created an application for S60 mobiles. But I want to create a similar application for S40 mobiles too. I did the application of S60 in pyS60 as java had problems with accessing inbox and contacts. I tried searching for pyS40 , but i couldnt find it. Ques : Is there python

Re: python gui builders

2009-11-25 Thread Stef Mientki
Shawn Wheatley wrote: It's not quite all encompassing, but I found this link last year when looking for a similar comparison of Python GUIs: http://ginstrom.com/scribbles/2008/02/26/python-gui-programming-platforms-for-windows/ Tkinter, Qt, GTK, IronPython... I think the only thing missing is

Re: How to log messages _only once_ from all modules ?

2009-11-25 Thread Terry Reedy
Jean-Michel Pichavant wrote: Basically, never configure or add handlers to any logger except for the root logger in your __main__ section. There are very few reasons why you would break this rule. And when you'll be familiar with the logging module you'll when to break it. I have never

Re: Help with pprint

2009-11-25 Thread Terry Reedy
Nadav Chernin wrote: Hello, I want to print list of lists in matrix format. So I use pprint with parameter ‘width’ for this target. For example : data=[[1, 1, 1], [1, 1, 1], [1, 1, 1]] pprint(data,width=20) [[1, 1, 1], [1, 1, 1], [1, 1, 1]] The problem that I don’t know how to

Re: Python Statements/Keyword Localization

2009-11-25 Thread MRAB
Emanuele D'Arrigo wrote: Greetings everybody, some time ago I saw a paper that used an XSL transformation sheet to transform (if I remember correctly) a Chinese xml file (inclusive of Chinese-script XML tags) into an XHTML file. More recently you might have all heard how the ICANN has opened

reading windows event logs

2009-11-25 Thread EW
Hi All, I'm looking for some guidance on a better way to read eventlogs from windows servers. I've written a handy little app that relies on WMI to pull the logs an in all my testing it worked great. When I deployed it, however, WMI choked on servers with a lot of logs. I've tried pulling

Re: Python Statements/Keyword Localization

2009-11-25 Thread garabik-news-2005-05
Emanuele D'Arrigo man...@gmail.com wrote: Greetings everybody, some time ago I saw a paper that used an XSL transformation sheet to transform (if I remember correctly) a Chinese xml file (inclusive of Chinese-script XML tags) into an XHTML file. More recently you might have all heard how

Re: csv and mixed lists of unicode and numbers

2009-11-25 Thread Sibylle Koczian
Terry Reedy schrieb: In Python 3, a file opened in 'b' mode is for reading and writing bytes with no encoding/decoding. I believe cvs works with files in text mode as it returns and expects strings/text for reading and writing. Perhaps the cvs doc should say must not be opened in 'b' mode.

Re: reading windows event logs

2009-11-25 Thread MRAB
EW wrote: Hi All, I'm looking for some guidance on a better way to read eventlogs from windows servers. I've written a handy little app that relies on WMI to pull the logs an in all my testing it worked great. When I deployed it, however, WMI choked on servers with a lot of logs. I've

Re: Python Statements/Keyword Localization

2009-11-25 Thread Terry Reedy
Emanuele D'Arrigo wrote: Greetings everybody, some time ago I saw a paper that used an XSL transformation sheet to transform (if I remember correctly) a Chinese xml file (inclusive of Chinese-script XML tags) into an XHTML file. More recently you might have all heard how the ICANN has opened

Re: Can self crush itself?

2009-11-25 Thread Aahz
In article mailman.965.1259143133.2873.python-l...@python.org, Chris Rebert c...@rebertia.com wrote: If you want to prevent an instance being created in the first place, you can override __new__(). Or just raise an exception in __init__(), which I think is more common practice. -- Aahz

reposition a column

2009-11-25 Thread Francesco Pietra
Hi: In a pdb file made of lines ATOM .. (see attachment as I was unable to obtain plain text with gmail) I would like to reposition the second W from column 19 to 17 ( (Python numbering; in pdb numbering it would be 20 18). I started with bold slices, then I was unable to complete the script.

Re: creating pipelines in python

2009-11-25 Thread Stefan Behnel
per, 25.11.2009 17:42: Thanks to all for your replies. i want to clarify what i mean by a pipeline. a major feature i am looking for is the ability to chain functions or scripts together, where the output of one script -- which is usually a file -- is required for another script to run. so

confused with os.fork()

2009-11-25 Thread Sandy
Hi all, I am a little bit confused about os.fork(). Say I have the following code. import os a = ['a','b','c','d','e'] for i in xrange(len(a)): pid = os.fork() if not pid: print a[i] os._exit(0) From most of the tuts and examples I saw online, I expect it to print

Re: confused with os.fork()

2009-11-25 Thread Diez B. Roggisch
Sandy schrieb: Hi all, I am a little bit confused about os.fork(). Say I have the following code. import os a = ['a','b','c','d','e'] for i in xrange(len(a)): pid = os.fork() if not pid: print a[i] os._exit(0) From most of the tuts and examples I saw online, I expect

Re: Python OpenOffice Spreadsheets

2009-11-25 Thread bobicanprogram
On Nov 23, 5:49 am, Gerhard Häring g...@ghaering.de wrote: Is there a *simple* way to read OpenOffice spreadsheets? Bonus: write them, too? I mean something like: doc.cells[0][0] = foo doc.save(xyz.ods) From a quick look, pyodf offers little more than just using a XML parser directly.

Re: reposition a column

2009-11-25 Thread MRAB
Francesco Pietra wrote: Hi: In a pdb file made of lines ATOM .. (see attachment as I was unable to obtain plain text with gmail) I would like to reposition the second W from column 19 to 17 ( (Python numbering; in pdb numbering it would be 20 18). I started with bold slices, then I was unable

Re: reposition a column

2009-11-25 Thread Vlastimil Brom
2009/11/25 Francesco Pietra francesco.pie...@accademialucchese.it: Hi: In a pdb file made of lines ATOM .. (see attachment as I was unable to obtain plain text with gmail) I would like to reposition the second W from column 19 to 17 ( (Python numbering; in pdb numbering it would be 20 18). I

Re: confused with os.fork()

2009-11-25 Thread MRAB
Sandy wrote: Hi all, I am a little bit confused about os.fork(). Say I have the following code. import os a = ['a','b','c','d','e'] for i in xrange(len(a)): pid = os.fork() if not pid: print a[i] os._exit(0) From most of the tuts and examples I saw online, I expect it

Re: reading windows event logs

2009-11-25 Thread Mark Hammond
On 26/11/2009 7:22 AM, EW wrote: Hi All, I'm looking for some guidance on a better way to read eventlogs from windows servers. I've written a handy little app that relies on WMI to pull the logs an in all my testing it worked great. When I deployed it, however, WMI choked on servers with

embed python dynamically

2009-11-25 Thread naveen
How do you embed the python dll file distributed with the automatic installable python distribution on windows? Is it possible to dynamically load the python dll from running c program and start up a python interpreter ? Do you have to compile python from source to be able to embed python? --

High-performance Python websites

2009-11-25 Thread Nick Mellor
Hi all, I'm contemplating setting up a Python-powered website for the tourist industry, which will involve a web service, a good deal of XML processing, and a Django-powered front-end. If the project works, it could get a lot of traffic. I'm sure it can be done, but I'm looking to find out more

Re: Python 3.1 cx_Oracle 5.0.2 ImportError: DLL load failed: The specified module could not be found.

2009-11-25 Thread André
On Nov 19, 6:57 pm, Neil Hodgson nyamatongwe+thun...@gmail.com wrote: André: Apparently the error is caused by cx_Oracle not being able to find the Oracle client DLLs (oci.dll and others). The client home path and the client home path bin directory are in the PATH System Variable and

Re: High-performance Python websites

2009-11-25 Thread ShoqulKutlu
Hi, Managing load of high volume of visitors is a common issue for all kind of web technologies. I mean this is not the python issue. This issue is mostly about server level designs. You need to supply load balancing for both web servers and databases to make your web site able to respond to

Re: Can self crush itself?

2009-11-25 Thread n00m
Or just raise an exception in __init__(),.. Then we are forced to handle this exception outside of class code. It's Ok. Never mind. Next thing. I can't understand why we can get __name__, but not __dict__, on the module level? print __name__ print __dict__

Re: embed installed python dynamically

2009-11-25 Thread naveen
ok, it was almost intuitive. just made a simple visual c express dll project included python26\include and python26\libs in the project settings the debug version has issues, but the release compiles without a problem. here is the source: http://github.com/tinku99/embedpython --

Re: Can self crush itself?

2009-11-25 Thread Terry Reedy
n00m wrote: Or just raise an exception in __init__(),.. Then we are forced to handle this exception outside of class code. It's Ok. Never mind. Next thing. I can't understand why we can get __name__, but not __dict__, on the module level? print __name__ print __dict__

jython and java application

2009-11-25 Thread KB
Hi there, Apologies if this is on the wrong group, this is a jython question. Please redirect me to the correct group if this is in error. I have a java application that takes no arguements. When I run it, it spits out output, and finishes. I am trying to run this java application from jython

Re: jython and java application

2009-11-25 Thread MRAB
KB wrote: Hi there, Apologies if this is on the wrong group, this is a jython question. Please redirect me to the correct group if this is in error. I have a java application that takes no arguements. When I run it, it spits out output, and finishes. I am trying to run this java application

Re: jython and java application

2009-11-25 Thread ShoqulKutlu
I don't know if it's right place but normally main method requires an args even it is not needed to supply from commandline. Maybe this is a jython runtime error and requires at least an empty argument. You could try to pass and empty string array like ['']. I'm not using jython please use your

Re: embed installed python dynamically

2009-11-25 Thread naveen
ok, its even easier than that. With autohotkey: pythondll := DllCall(LoadLibrary, str, c:\windows \system32\python26.dll) init := DllCall(c:\windows\system32\python26.dll\Py_Initialize , Cdecl) msgbox python initalized call := DllCall(c:\windows\system32\python26.dll\PyRun_SimpleString , str,

Re: Can self crush itself?

2009-11-25 Thread Steven D'Aprano
On Wed, 25 Nov 2009 20:09:25 -0500, Terry Reedy wrote: n00m wrote: Or just raise an exception in __init__(),.. Then we are forced to handle this exception outside of class code. It's Ok. Never mind. Next thing. I can't understand why we can get __name__, but not

Feature request: String-inferred names

2009-11-25 Thread The Music Guy
Hello all, I just posted to my blog about a feature that I'd like to see added to Python. Before I go through the trouble of learning how to write a PEP or how to extend the Python interpreter, I want to know what people in the community have to say about it.

Help with error on self.show

2009-11-25 Thread Christian Grise
Hi, I am getting an error when I try to run some code my friend gave me. Here is the error: Warning (from warnings module): File C:\Documents and Settings\GriseC\Desktop\Widget Base\applet.py, line 145 self.show() GtkWarning: ../../../../gtk+/gdk/win32/gdkwindow-win32.c:1089: SetWindowLong

Re: Can self crush itself?

2009-11-25 Thread n00m
aaah... globals()... Then why self not in globals()? class Moo: cnt = 0 def __init__(self, x): self.__class__.cnt += 1 if self.__class__.cnt 3: self.x = x else: print id(self) for item in globals().items():

Re: Feature request: String-inferred names

2009-11-25 Thread The Music Guy
I just posted to my blog about a feature that I'd like to see added to Python. Before I go through the trouble of learning how to write a PEP or how to extend the Python interpreter, I want to know what people in the community have to say about it.

Re: jython and java application

2009-11-25 Thread KB
Hmmm, for some reason my follow up post didn't make it. Modified jython script to: # Eclipse package name for java application import krbtest import java.lang as lang from java.lang import String from jarray import array myargs=array([],String) krbtest.SimpleHistoricTutorial().main(myargs)

Re: jython and java application

2009-11-25 Thread ShoqulKutlu
Hi, I don't know how do you call the java library from within your jython application it gives java.lang.NoClassDefFoundError This looks like you referenced jar or whatever else from your jython application which also needs a class com/bloomberglp/blpapi/Session in another library file. It might

Re: Can self crush itself?

2009-11-25 Thread Steven D'Aprano
On Wed, 25 Nov 2009 18:39:09 -0800, n00m wrote: aaah... globals()... Then why self not in globals()? class Moo: cnt = 0 def __init__(self, x): self.__class__.cnt += 1 Because it isn't a global, it's a local -- it is defined inside a class. Inside functions and classes,

Re: Can self crush itself?

2009-11-25 Thread Mel
n00m wrote: aaah... globals()... Then why self not in globals()? class Moo: cnt = 0 def __init__(self, x): self.__class__.cnt += 1 if self.__class__.cnt 3: self.x = x else: print id(self) for item in

How do I correctly download Wikipedia pages?

2009-11-25 Thread Steven D'Aprano
I'm trying to scrape a Wikipedia page from Python. Following instructions here: http://en.wikipedia.org/wiki/Wikipedia:Database_download http://en.wikipedia.org/wiki/Special:Export I use the URL http://en.wikipedia.org/wiki/Special:Export/Train; instead of just

Re: How do I correctly download Wikipedia pages?

2009-11-25 Thread ShoqulKutlu
Hi, Try not to be caught if you send multiple requests :) Have a look at here: http://wolfprojects.altervista.org/changeua.php Regards Kutlu On Nov 26, 5:45 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: I'm trying to scrape a Wikipedia page from Python. Following

Re: How do I correctly download Wikipedia pages?

2009-11-25 Thread Stephen Hansen
2009/11/25 Steven D'Aprano ste...@remove.this.cybersource.com.au I'm trying to scrape a Wikipedia page from Python. Following instructions here: Have you checked out http://meta.wikimedia.org/wiki/Pywikipediabot? Its not just via urllib, but I've scraped several MediaWiki-based sites with

Re: How do I correctly download Wikipedia pages?

2009-11-25 Thread Taskinoor Hasan
I fetched a different problem. Whenever I tried to fetch any page from wikipedia, I received 403. Then I found that wikipedia don't accept the default user-agent (might be python-urllib2.x or something like this). After setting my own user-agent, it worked fine. You can try this if you receive

Re: Feature request: String-inferred names

2009-11-25 Thread Chris Rebert
On Wed, Nov 25, 2009 at 6:35 PM, The Music Guy fearsomedragon...@gmail.com wrote: Hello all, I just posted to my blog about a feature that I'd like to see added to Python. Before I go through the trouble of learning how to write a PEP or how to extend the Python interpreter, I want to know

Re: High-performance Python websites

2009-11-25 Thread Nick Mellor
Thanks Kutlu, I wasn't aware that Google used Python for running their Google groups servers. Can you confirm that? The only place I've seen Google explicitly use Python on their web front end is in the Google Ads tests. I am impressed by the responsiveness of lawrence.com, ljworld.com and

Re: Feature request: String-inferred names

2009-11-25 Thread Brad
On Nov 25, 10:49 pm, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 25, 2009 at 6:35 PM, The Music Guy fearsomedragon...@gmail.com wrote: Hello all, I just posted to my blog about a feature that I'd like to see added to Python. Before I go through the trouble of learning how to write

Re: Feature request: String-inferred names

2009-11-25 Thread The Music Guy
P.S., my apologies for sending replies with different email addresses. This is an unintentional technical issue and I am currently trying to get it fixed. On Wed, Nov 25, 2009 at 11:45 PM, Brad themusicguy...@gmail.com wrote: On Nov 25, 10:49 pm, Chris Rebert c...@rebertia.com wrote: On Wed,

Re: High-performance Python websites

2009-11-25 Thread ShoqulKutlu
Hi Nick, Sorry about my concern on Google. It caused a confusion about Google groups. I didn't mean explicitly where Google uses python, I mentioned just Google uses Python. A Google officer told that they run Python on thousands of their servers at an interview. Due to this claim I wanted to say

Re: High-performance Python websites

2009-11-25 Thread ShoqulKutlu
Hi again, I also want to say something about creating a better web application. If I were you I wouldn't use any web framework like django or other. If you want to create a commercial project and want to manage all modules of the application yourself I suggest you to create your own framework. I

Re: Feature request: String-inferred names

2009-11-25 Thread Gabriel Genellina
En Wed, 25 Nov 2009 23:35:06 -0300, The Music Guy fearsomedragon...@gmail.com escribió: I just posted to my blog about a feature that I'd like to see added to Python. Before I go through the trouble of learning how to write a PEP or how to extend the Python interpreter, I want to know what

Re: Feature request: String-inferred names

2009-11-25 Thread Lie Ryan
Brad wrote: On Nov 25, 10:49 pm, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 25, 2009 at 6:35 PM, The Music Guy fearsomedragon...@gmail.com wrote: Hello all, I just posted to my blog about a feature that I'd like to see added to Python. Before I go through the trouble of learning how to

Re: Can self crush itself?

2009-11-25 Thread Gregory Ewing
n00m wrote: I can't understand why we can get __name__, but not __dict__, on the module level? For much the same reason that you can see your own feet but (unless you look in a mirror) you can't see your own eyes. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature request: String-inferred names

2009-11-25 Thread Gregory Ewing
On Wed, 25 Nov 2009 20:44:36 -0600, The Music Guy music...@alphaios.net declaimed the following in gmane.comp.python.general: I just posted to my blog about a feature that I'd like to see added to Python. http://alphaios.blogspot.com/2009/11/python-string-inferred-names-working.html I don't

[issue7117] Backport py3k float repr to trunk

2009-11-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks, Eric. The only remaining documentation issues I'm aware of are in Doc/tutorial/floatingpoint.rst. I think Raymond is going to update this to match the py3k version. I'll call this done, then! Thanks for all your help. --

[issue1606092] csv module broken for unicode

2009-11-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: This is indeed fixed in Python 3. If someone wishes to step forward with patches for 2.7, they can reopen this bug, but I don't think it is worth the effort. -- nosy: +r.david.murray resolution: - out of date stage: -

[issue6615] multiprocessing logging support test

2009-11-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Since you reversed() the _handlerList, the following part need to be changed: -_handlerList.insert(0, weakref.ref(handler, _removeHandlerRef)) +_handlerList.append(weakref.ref(handler, _removeHandlerRef)) Corrected in

[issue7394] sqlite3: some OperationalError exceptions should be ProgrammingError (PEP 249)

2009-11-25 Thread dontbugme
New submission from dontbugme pythonbugsbugme...@spamavert.com: The following code raises OperationalError exceptions: python -c 'import sqlite3; sqlite3.connect(:memory:).execute(bad syntax)' python -c 'import sqlite3; sqlite3.connect(:memory:).execute(SELECT * FROM no_such_table)' python -c

[issue7391] Re-title the Using Backslash to Continue Statements anti-idiom

2009-11-25 Thread Neil Cerutti
Neil Cerutti ceru...@trans-video.net added the comment: Yes, I know. That's why I feel it should not be labeled an anti-idiom, as it currently seems to be. -- status: pending - open ___ Python tracker rep...@bugs.python.org

[issue7391] Re-title the Using Backslash to Continue Statements anti-idiom

2009-11-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Agreed. -- priority: - low resolution: wont fix - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7391 ___

[issue4097] Traceback doesn't run back all the way

2009-11-25 Thread flox
flox la...@yahoo.fr added the comment: It looks similar to issue7378, but the latter has more details. Close as duplicate? -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4097

[issue4158] compilation of sqlite3 fails

2009-11-25 Thread flox
flox la...@yahoo.fr added the comment: Please close as invalid. -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4158 ___ ___

[issue4158] compilation of sqlite3 fails

2009-11-25 Thread flox
Changes by flox la...@yahoo.fr: -- nosy: -flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4158 ___ ___ Python-bugs-list mailing list

  1   2   >