ANN: eGenix mx Base Distribution 3.1.2

2009-01-29 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mx Base Distribution Version 3.1.2 for Python 2.3 - 2.6 Open Source Python extensions providing important and useful services

Re: date handling problem

2009-01-29 Thread M.-A. Lemburg
On 2009-01-29 03:38, Gabriel Genellina wrote: > En Wed, 28 Jan 2009 18:55:21 -0200, S.Selvam Siva > escribió: > >> I need to parse rss-feeds based on time stamp,But rss-feeds follow >> different >> standards of date(IST,EST etc). >> I dont know,how to standardize this standards.It will be helpful

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Bruno Desthuilliers
Ron Garret a écrit : I'm running a WSGI app under apache/mod_wsgi and I've noticed that whenever I restart the server after making a code change it takes a very long time (like a minute) before the script is active again. In other words, I do an apachectl restart, reload the page in my browser

Re: Python-list Digest, Vol 64, Issue 644

2009-01-29 Thread M Kumar
is python a pure objected oriented language? On Thu, Jan 29, 2009 at 2:08 PM, wrote: > Send Python-list mailing list submissions to >python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, visit >http://mail.python.org/mailman/listinfo/python-list > or, via

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Bruno Desthuilliers
Ron Garret a écrit : In article , Aleksandar Radulovic wrote: (snip) Secondly, why are you restarting apache after code changes? In normal circumstances, you shouldn't have to do that. I thought (and experiment confirms) that only the main WSGI app file gets reloaded automatically when it

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-29 Thread Bruno Desthuilliers
excord80 a écrit : On Jan 28, 4:57 am, Bruno Desthuilliers wrote: What about:http://thraxil.org/code/cgi_app/ (yes, it is a port of CGI::Application, and FWIW it's mentionned on the CGI::Application's wiki). Nice find. Thank you. Interesting project. It seems to be only one fairly short fi

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Aleksandar Radulovic
Graham, On Thu, Jan 29, 2009 at 1:16 AM, Graham Dumpleton wrote: > Sorry, you are wrong to assume that an Apache restart is not be > required. > If you are using mod_wsgi embedded mode, or mod_python, then a code > change will always require a full restart of Apache. I am running several middlew

Re: Python-list Digest, Vol 64, Issue 644

2009-01-29 Thread Chris Rebert
On Thu, Jan 29, 2009 at 1:08 AM, M Kumar wrote: > is python a pure objected oriented language? Firstly: (A) Replying to Digests rather than individual posts is very discouraged. (B) The proper way to start a new thread by emailing python-list@python.org (as it says in the very header of the diges

Re: Why doesn't eval of generator expression work with locals?

2009-01-29 Thread Hendrik van Rooyen
"Gabriel Genellina" wrote: >> Seems that it is important *when* those functions are evaluated, but I >> don't understand *why*... Because the scope changes - see also the recent thread on exec woes where towards the end I put in a similar example - funny, it must the flux or something - seems

Re: Why doesn't eval of generator expression work with locals?

2009-01-29 Thread Hendrik van Rooyen
"Gabriel Genellina" wrote: En Wed, 28 Jan 2009 16:00:43 -0200, Scott David Daniels > escribió: > >> The reason is that once your created object has its id taken, you >> must keep a handle on it, otherwise it may get recycled and reused. > >It doesn't matter in this case, I think. globals() is alw

Re: Exec woes

2009-01-29 Thread Hendrik van Rooyen
"Rhodri James" wrote: To: Sent: Thursday, January 29, 2009 6:12 AM Subject: Re: Exec woes > On Wed, 28 Jan 2009 07:47:00 -, Hendrik van Rooyen > wrote: > > This is actually not correct - it is the root cause of my trouble. > > if you write, in a nested scope: > > > > exec ( "somestring t

Re: dicts,instances,containers, slotted instances, et cetera.

2009-01-29 Thread James Stroud
ocsch...@gmail.com wrote: I can't port the entire app to be a stored database procedure. Perhaps I underestimate what you mean by this, but you may want to look at pyTables (http://www.pytables.org/moin/HowToUse). ctypes, maybe. I just find it odd that there's no quick answer on the fastest

is python Object oriented??

2009-01-29 Thread M Kumar
Object oriented languages doesn't allow execution of the code without class objects, what is actually happening when we execute some piece of code, is it bound to any class? Those who have time and consideration can help me -- Regards, Maneesh KB Comat Technologies Bangalore Mob: 9740-19230

Re: is python Object oriented??

2009-01-29 Thread Gary Herron
M Kumar wrote: > Object oriented languages doesn't allow execution of the code without > class objects, what is actually happening when we execute some piece > of code, is it bound to any class? > Those who have time and consideration can help me > Python *is* object-oriented, but it is not (as

Re: date handling problem

2009-01-29 Thread S.Selvam Siva
On Thu, Jan 29, 2009 at 2:27 PM, M.-A. Lemburg wrote: > On 2009-01-29 03:38, Gabriel Genellina wrote: > > En Wed, 28 Jan 2009 18:55:21 -0200, S.Selvam Siva > > escribió: > > > >> I need to parse rss-feeds based on time stamp,But rss-feeds follow > >> different > >> standards of date(IST,EST etc)

Re: is python Object oriented??

2009-01-29 Thread Chris Rebert
On Thu, Jan 29, 2009 at 2:01 AM, M Kumar wrote: > Object oriented languages doesn't allow execution of the code without class > objects, what is actually happening when we execute some piece of code, is > it bound to any class? That's not really the standard definition of object-oriented (c.f.

Re: is python Object oriented??

2009-01-29 Thread Bruno Desthuilliers
(answering to the OP) M Kumar wrote: Object oriented languages doesn't allow execution of the code without class objects, Chapter and verse, please ? Nothing in the (very few) "axioms" of OOP mentions "classes". You don't need classes to have an OOPL (ever heard about prototype-based langua

Re: is python Object oriented??

2009-01-29 Thread Muriel de Souza Godoi
Python offers support for object orientation, but it's not an object-oriented language. I mean, you can code a entire program in Python with no classes. So you use it if you want to. It's not like java, which you must use a class to code a Hello World, but Java isn't fully object-oriented, because

Re: is python Object oriented??

2009-01-29 Thread Tino Wildenhain
Muriel de Souza Godoi wrote: Python offers support for object orientation, but it's not an object-oriented language. I mean, you can code a entire program in Python with no classes. So you use it if you want to. It's not like java, which you must use a class to code a Hello World, but Java is

Re: is python Object oriented??

2009-01-29 Thread MC
Hi! Il se trouve que Chris Rebert a formulé : Python has functions, which are not associated with a class functions are methods of builtin... -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter w.pack()?

2009-01-29 Thread Steve Holden
W. eWatson wrote: > r wrote: >> On Jan 28, 10:12 pm, "W. eWatson" wrote: >>> Where in the world is a description of pack() for Tkinter widgets? Is it >>> some sort of general method for all widgets? I'm looking in a few >>> docs that >>> use it without ever saying where it is described. For one, >

Re: is python Object oriented??

2009-01-29 Thread Steve Holden
M Kumar wrote: > Object oriented languages doesn't allow execution of the code without > class objects, what is actually happening when we execute some piece of > code, is it bound to any class? > Those who have time and consideration can help me a) This is a purely theoretical consideration. Yo

Re: how to update python on gnu emacs?

2009-01-29 Thread Wang Lei
If you means python-mode, you can add this line to you .emacs: (setq py-python-command "python3.0") On 1/29/09, John Seales wrote: > > I've updated to python 2.6. My terminal application finds the new python > just fine, but my gnu-emacs still is on python 2.3. Does anyone know how I > can chang

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Graham Dumpleton
On Jan 29, 8:15 pm, Aleksandar Radulovic wrote: > Graham, > > On Thu, Jan 29, 2009 at 1:16 AM, Graham Dumpleton > > wrote: > > Sorry, you are wrong to assume that an Apache restart is not be > > required. > > If you are usingmod_wsgiembedded mode, or mod_python, then a code > > change will always

Re: how to update python on gnu emacs?

2009-01-29 Thread Wang Lei
Sorry. Mine is python3.0. Yours maybe is: (setq py-python-command "python2.6") -- Regards Lei -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get atexit hooks to run in the presence of execv?

2009-01-29 Thread Mark Wooding
ro...@panix.com (R. Bernstein) writes: > Recently, I added remote debugging via TCP sockets. (Well, also FIFO's > as well but closing sockets before restarting is what's of concern.) > > I noticed that execv in Python 2.5.2 doesn't arrange exit hooks to get > called. Should it? I'd consider that

Re: syntax color lang source code in blogs or website

2009-01-29 Thread Lorenzo Bettini
Xah Lee wrote: For those of you using emacs, here's the elisp code that allows you to syntax color computer language source code in your blog or website. http://xahlee.org/emacs/elisp_htmlize.html may I suggest also this one: http://www.gnu.org/software/src-highlite/ -- Lorenzo Bettini, PhD

Re: ctypes with Compaq Visual Fortran 6.6B *.dll (Windows XP), passing of integer and real values

2009-01-29 Thread Duncan Booth
alex wrote: > Jon > Thank you for your answer. I tried it with no success. > > However I tried with > tst=cdll.LoadLibrary("f:\\scratch\\test2\\footst.dll") instead of > tst=windll.LoadLibrary("f:\\scratch\\test2\\footst.dll") > > and it runs now with no error message, I can't figure for now wh

Re: is python Object oriented??

2009-01-29 Thread M Kumar
but still I am not clear of the execution of the code, when we write or execute a piece of python code without defining class, predefined class attributes are available (not all but __name__ and __doc__ are available). does it mean anything to this topic. Is it necessory to have __module__, __dict_

is there a shorter way to write this

2009-01-29 Thread garywood
I had a task in a book to pick 5 items from a list of 26 ensuring the items are not repeated import random list = ['a','b','c','d','e','f','g','h','i','j','k','l','m', 'n','o','p','q','r','s','t','u','v','w','x','y','z'] word = ' ' a = random.choice(list) list.remove(a) b = random.choice

Re: is python Object oriented??

2009-01-29 Thread Luis M . González
On Jan 29, 7:21 am, Gary Herron wrote: > Python *is* object-oriented, but it is not (as your definition suggests) > object-fascist.   I'm a python-nazi. No python for you! -- http://mail.python.org/mailman/listinfo/python-list

Re: Terminating a Python program that uses multi-process, multi-threading

2009-01-29 Thread Jesse Noller
On Wed, Jan 28, 2009 at 3:46 PM, akineko wrote: > Hello Python experts, > > I have a program that uses three processes (invoked by > multiprocessing) and several threads. > The program is terminated when ^C is typed (KeyboardInterrupt). > The main process takes the KeyboardInterrupt Exception and

Re: is python Object oriented??

2009-01-29 Thread Stephen Hansen
On Thu, Jan 29, 2009 at 5:58 AM, M Kumar wrote: > but still I am not clear of the execution of the code, when we write or > execute a piece of python code without defining class, predefined class > attributes are available (not all but __name__ and __doc__ are available). > does it mean anything

Re: is there a shorter way to write this

2009-01-29 Thread Stephen Hansen
On Thu, Jan 29, 2009 at 6:11 AM, garywood wrote: > I had a task in a book to pick 5 items from a list of 26 ensuring the > items are not repeated > > If the list is unique of 26 elements is guaranteed to be unique, simply: >>> import random >>> random.sample(list, 5) ['g', 'y', 'i',

Re: is there a shorter way to write this

2009-01-29 Thread Vlastimil Brom
2009/1/29 garywood : > I had a task in a book to pick 5 items from a list of 26 ensuring the items > are not repeated > > > import random > list = ['a','b','c','d','e','f','g','h','i','j','k','l','m', > 'n','o','p','q','r','s','t','u','v','w','x','y','z'] > word = ' ' > a = random.choice(li

Re: is there a shorter way to write this

2009-01-29 Thread Stephen Hansen
If the list is unique of 26 elements is guaranteed to be unique, simply: > Wow, 6am copy editing of my own posts is terribly ineffective. "If the list of 26 elements is guaranteed to be unique" -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a shorter way to write this

2009-01-29 Thread Tim Chase
I had a task in a book to pick 5 items from a list of 26 ensuring the items are not repeated import random list = ['a','b','c','d','e','f','g','h','i','j','k','l','m', 'n','o','p','q','r','s','t','u','v','w','x','y','z'] word = ' ' a = random.choice(list) list.remove(a) b = random.choice(

RE: is there a shorter way to write this

2009-01-29 Thread Andreas Tawn
> I had a task in a book to pick 5 items from a list of 26 ensuring the items are not repeated > > > import random > list = ['a','b','c','d','e','f','g','h','i','j','k','l','m', >'n','o','p','q','r','s','t','u','v','w','x','y','z'] > word = ' ' > a = random.choice(list) > list.remove(a) > b

Re: is python Object oriented??

2009-01-29 Thread Bruno Desthuilliers
MC a écrit : Hi! Il se trouve que Chris Rebert a formulé : Python has functions, which are not associated with a class functions are methods of builtin... Please check your facts. Python functions are not "methods" of anything (and not even necessarily attributes of a module - think about

Re: is there a shorter way to write this

2009-01-29 Thread Tim Chase
Hmm, sounds like homework, but I'll bite. The underlying problem does sound like homework, but the OP posted a working solution, and was only looking for ways to improve it. So I'm a little more lenient on providing alternatives. It's true that the homework problem may have been exactly as

py2exe + SQLite problem

2009-01-29 Thread Armin
Hello all, I have frozen a running application which is using SQLite with py2exe. When I start the exe file I see in the log file of the exe: Traceback (most recent call last): File "dpconf.py", line 666, in ? File "dpconf.py", line 251, in __init__ File "sqlite\main.pyc", line 255, in

py2exe + SQLite problem

2009-01-29 Thread Armin
Hello all, I have frozen a running application which is using SQLite with py2exe. When I start the exe file I see in the log file of the exe: Traceback (most recent call last): File "dpconf.py", line 666, in ? File "dpconf.py", line 251, in __init__ File "sqlite\main.pyc", line 255, in

Get thread pid

2009-01-29 Thread Alejandro
Hi: I have Python program running under Linux, that create several threads, and I want to now the corresponding PID of the threads. In each of the threads I have def run(self): pid = os.getpid() logger.critical('process ID: %s', pid) However, the reported PID is the father number, not t

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2009-01-29 Thread Anjanesh Lekshminarayanan
Im reading a file. But there seems to be some encoding error. >>> f = open(filename) >>> data = f.read() Traceback (most recent call last): File "", line 1, in data = f.read() File "C:\Python30\lib\io.py", line 1724, in read decoder.decode(self.buffer.read(), final=True)) File "C:\P

Re: Dynamic methods and lambda functions

2009-01-29 Thread coutinhoti...@gmail.com
On Jan 28, 11:32 pm, "Gabriel Genellina" wrote: > En Wed, 28 Jan 2009 16:05:39 -0200, coutinhoti...@gmail.com   > escribió: > > >   I had the same problem myself. > >   Mark's detailed explanation really helped me understand. > > >   I ended up doing something like: > > The code doesn't work as-i

Re: How to get atexit hooks to run in the presence of execv?

2009-01-29 Thread R. Bernstein
Mark Wooding writes: > ro...@panix.com (R. Bernstein) writes: > >> Recently, I added remote debugging via TCP sockets. (Well, also FIFO's >> as well but closing sockets before restarting is what's of concern.) >> >> I noticed that execv in Python 2.5.2 doesn't arrange exit hooks to get >> called.

Weird invisible arguments issues with Windows

2009-01-29 Thread Uberman
I've installed Python 2.6.1 (AMD64) under Windows Vista Ultimate 64-bit. First off, it didn't register the extension for .PY (although it did register .PYC). After manually associating the .PY extension with the python.exe executable, I am now getting some weirdness on the command line. When I r

persistent TCP connection in python using socketserver

2009-01-29 Thread markobrien85
G'day I'm currently using socketserver to build a simple XMLSocket (an XML based protocol used for communication between flash and the outside world) server. I've got flash establishing a connection, sending a request and my python server responding. However at this point socketserver terminates t

py2exe + data_files

2009-01-29 Thread Armin
Hello, is there a way to place individual data files into to the standard 'dist' directory and not into a subdirectory of 'dist' --Armin -- http://mail.python.org/mailman/listinfo/python-list

How does one view the source of function defined in the interpreter?

2009-01-29 Thread mattc
1) It appears that it is possible to view the source of a function defined in the interpreter; however, I seem to be unable to do it. Here is the code and resulting error. >>> def f(): print("hello world") >>> f >>> f() hello world >>> import inspect >>> inspect >>> inspect.getsourcelin

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2009-01-29 Thread Benjamin Kaplan
On Thu, Jan 29, 2009 at 11:24 AM, Anjanesh Lekshminarayanan < m...@anjanesh.net> wrote: > Im reading a file. But there seems to be some encoding error. > > >>> f = open(filename) > >>> data = f.read() > Traceback (most recent call last): > File "", line 1, in >data = f.read() > File "C:\Pyt

Re: Tkinter w.pack()?

2009-01-29 Thread W. eWatson
Gabriel Genellina wrote: En Thu, 29 Jan 2009 02:57:04 -0200, W. eWatson escribió: The word pack doesn't exist on the NMT pdf. Maybe there's a newer one? There is a PDF version of "An Introduction to Tkinter" here: http://www.pythonware.com/library/ Thanks. I have it but it's an odd one to

distutil problem ??

2009-01-29 Thread Armin
Hello, I have the following setup script for py2exe: from distutils.core import setup import py2exe setup(windows=['dpconf.py'], data_files=[ "", ["proj_db","gsd_db","dachs2.xbm"]] ) When I create the distribution I got the following err msg: *** copy data files *** warning:

Re: Tkinter w.pack()?

2009-01-29 Thread W. eWatson
r wrote: On Jan 28, 10:57 pm, "W. eWatson" wrote: The word pack doesn't exist on the NMT pdf. Maybe there's a newer one? Only the grid manager is discussed at NMT. I just like how at NMT the widget attributes are in a table and then a list the widget methods follows below that -- much better

Re: Weird invisible arguments issues with Windows

2009-01-29 Thread Tim Golden
Uberman wrote: I've installed Python 2.6.1 (AMD64) under Windows Vista Ultimate 64-bit. First off, it didn't register the extension for .PY (although it did register .PYC). After manually associating the .PY extension with the python.exe executable, I am now getting some weirdness on the comman

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2009-01-29 Thread Anjanesh Lekshminarayanan
> It does auto-detect it as cp1252- look at the files in the traceback and > you'll see lib\encodings\cp1252.py. Since cp1252 seems to be the wrong > encoding, try opening it as utf-8 or latin1 and see if that fixes it. Thanks a lot ! utf-8 and latin1 were accepted ! -- http://mail.python.org/mail

Re: Weird invisible arguments issues with Windows

2009-01-29 Thread MRAB
Uberman wrote: I've installed Python 2.6.1 (AMD64) under Windows Vista Ultimate 64-bit. First off, it didn't register the extension for .PY (although it did register .PYC). After manually associating the .PY extension with the python.exe executable, I am now getting some weirdness on the comman

Re: Weird invisible arguments issues with Windows

2009-01-29 Thread Chris Hulan
On Jan 29, 11:35 am, Uberman wrote: > I've installed Python 2.6.1 (AMD64) under Windows Vista Ultimate 64-bit. > > First off, it didn't register the extension for .PY (although it did register > .PYC). > > After manually associating the .PY extension with the python.exe executable, I > am now gett

Re: is python Object oriented??

2009-01-29 Thread Michael Torrie
M Kumar wrote: > but still I am not clear of the execution of the code, when we write or > execute a piece of python code without defining class, predefined class > attributes are available (not all but __name__ and __doc__ are available). > does it mean anything to this topic. Is it necessory to h

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2009-01-29 Thread Benjamin Kaplan
On Thu, Jan 29, 2009 at 12:09 PM, Anjanesh Lekshminarayanan < m...@anjanesh.net> wrote: > > It does auto-detect it as cp1252- look at the files in the traceback and > > you'll see lib\encodings\cp1252.py. Since cp1252 seems to be the wrong > > encoding, try opening it as utf-8 or latin1 and see if

CUDA

2009-01-29 Thread dg . google . groups
Hi all, Has anyone managed to get any of the Python CUDA libraries working on Windows using cygwin? Which one, and was anything special required? Thanks in advance for any advice. Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Spam making a comeback??

2009-01-29 Thread skip
r> Seems like the level of spam is increasing in the last week, and r> today has been bad. How are the spambytes coming along? Spambayes is doing fine, but it only filters spam for the mailing list. It has no effect on the Usenet side of things (comp.lang.python). -- Skip Montanaro - s

slicings: 3 questions

2009-01-29 Thread Alan G Isaac
1. I seem not to understand something obvious at http://docs.python.org/3.0/reference/expressions.html#slicings (I assume I'm just not reading this right.) What is an example of a slicing using a "slice_list"? 2. It seems that slice objects and range objects are awfully similar in many ways. Is

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-29 Thread J Kenneth King
excord80 writes: > I need to make a small, relatively low-traffic site that users can > create accounts on and log into. Scripts must run as cgi (no > mod_python or FastCGI is available). Can anyone recommend a small and > simple web framework for Python, maybe similar to Perl's > CGI::Applicatio

Re: Tkinter w.pack()?

2009-01-29 Thread Gabriel Genellina
En Thu, 29 Jan 2009 14:55:13 -0200, W. eWatson escribió: Gabriel Genellina wrote: En Thu, 29 Jan 2009 02:57:04 -0200, W. eWatson escribió: The word pack doesn't exist on the NMT pdf. Maybe there's a newer one? There is a PDF version of "An Introduction to Tkinter" here: http://www.pytho

Re: slicings: 3 questions

2009-01-29 Thread Chris Rebert
On Thu, Jan 29, 2009 at 10:01 AM, Alan G Isaac wrote: > 1. I seem not to understand something obvious at > http://docs.python.org/3.0/reference/expressions.html#slicings > (I assume I'm just not reading this right.) > What is an example of a slicing using a "slice_list"? There's nothing in the st

Re: persistent TCP connection in python using socketserver

2009-01-29 Thread Jean-Paul Calderone
On Thu, 29 Jan 2009 08:38:43 -0800 (PST), markobrie...@gmail.com wrote: G'day I'm currently using socketserver to build a simple XMLSocket (an XML based protocol used for communication between flash and the outside world) server. I've got flash establishing a connection, sending a request and my

Re: is python Object oriented??

2009-01-29 Thread Terry Reedy
M Kumar wrote: Object oriented languages doesn't allow execution of the code without class objects, what is actually happening when we execute some piece of code, is it bound to any class? Those who have time and consideration can help me My take.. Python is a language. Programs written i

Re: How does one view the source of function defined in the interpreter?

2009-01-29 Thread Terry Reedy
mattc wrote: Once the interpreter reads lines of code, then, as far as the interpreter is concerned, they are gone. 3) One last thing, is there any documentation for augmenting, extending, or editing a function in the interpreter once it is defined? Use IDLE, edit code in an edit window, the

Re: is python Object oriented??

2009-01-29 Thread Kay Schluehr
On 29 Jan., 11:21, Gary Herron wrote: > Python *is* object-oriented, but it is not (as your definition suggests) > object-fascist.   I'd put it more mildly. Python is object oriented. The orientation is there but the fanatism is gone. Kay -- http://mail.python.org/mailman/listinfo/python-list

ImportError in embedded Python Interpreter

2009-01-29 Thread googler . 1 . webmaster
Hi, i have a problem. I compiled Python and the socket module so I got this structure. (all on windows) C:\test\dll_files\python25.dll C:\test\my_app C:\test\dll_files\DLLs\ C:\test\dll_files\python.exe If I run python I get the console and I can call "import socket" which succeeds. I wrote a sm

Re: Spam making a comeback??

2009-01-29 Thread Terry Reedy
s...@pobox.com wrote: r> Seems like the level of spam is increasing in the last week, and r> today has been bad. How are the spambytes coming along? Spambayes is doing fine, but it only filters spam for the mailing list. It has no effect on the Usenet side of things (comp.lang.python).

ImportError in embedded Python Interpreter

2009-01-29 Thread googler . 1 . webmaster
Hi, i have a problem. I compiled Python and the socket module so I got this structure. (all on windows) C:\test\dll_files\python25.dll C:\test\my_app C:\test\dll_files\DLLs\ C:\test\dll_files\python.exe If I run python.exe I get the console and I can call "import socket" which succeeds. I wrote

receive and react to MIDI input

2009-01-29 Thread elsjaako
Hi all. I want to write an application that reads midi notes and then does something (specifically, play sound files, but that doesn't really matter for this question). I'm on windows. I went on MSDN and tried to get it to work, and I found myself getting pretty far (considering how little I know

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Aleksandar Radulovic
Graham, On Thu, Jan 29, 2009 at 1:00 PM, Graham Dumpleton wrote: > In other words, it is not universal that any code change will be > automatically detected and a reload occur. There are also various > caveats on what mod_python module importer does, as it is reloading > modules into an existing

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2009-01-29 Thread Benjamin Peterson
Anjanesh Lekshminarayanan anjanesh.net> writes: > > > It does auto-detect it as cp1252- look at the files in the traceback and > > you'll see lib\encodings\cp1252.py. Since cp1252 seems to be the wrong > > encoding, try opening it as utf-8 or latin1 and see if that fixes it. > > Thanks a lot !

Re: receive and react to MIDI input

2009-01-29 Thread r
On Jan 29, 1:33 pm, elsjaako wrote: There is a Python MIDI module, i think it is pyMIDI, have you checked it out? -- http://mail.python.org/mailman/listinfo/python-list

Re: slicings: 3 questions

2009-01-29 Thread Alan G Isaac
On Thu, Jan 29, 2009 at 10:01 AM, Alan G Isaac wrote: 1. I seem not to understand something obvious at http://docs.python.org/3.0/reference/expressions.html#slicings (I assume I'm just not reading this right.) What is an example of a slicing using a "slice_list"? On 1/29/2009 1:37 PM Chris Re

python 2.6 wininst problem

2009-01-29 Thread timw.google
I just installed Python2.6 on my WinXP box in a non-standard location (not C:\Python26) since I'm not admin. I used cygwin to create a module of an extension I wrote, but when I went to execute the installer, I get a popup error "This application has failed to start because the application configu

Re: ctypes with Compaq Visual Fortran 6.6B *.dll (Windows XP), passing of integer and real values

2009-01-29 Thread alex
Duncan Thank you for your explanation of the relationship between calling convention and stack management. I will try to understand better this topic in the CVF and ctypes documentation (not so easy). Regards Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2009-01-29 Thread John Machin
Benjamin Kaplan case.edu> writes: > > > On Thu, Jan 29, 2009 at 12:09 PM, Anjanesh Lekshminarayanan anjanesh.net> wrote: > > It does auto-detect it as cp1252- look at the files in the traceback and > > you'll see lib\encodings\cp1252.py. Since cp1252 seems to be the wrong > > encoding, try ope

Re: python 2.6 wininst problem

2009-01-29 Thread Martin v. Löwis
> Do I now have to get the Helpdesk to install Python for me? No, you should wait for Python 2.6.2; this should fix this problem. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Weird invisible arguments issues with Windows

2009-01-29 Thread Uberman
Tim Golden wrote: > What does your association look like? Try ftype; should be something > like this: > > H:\>ftype python.file > python.file="C:\Python26\python.exe" "%1" %* Then, Chris Hulan wrote: > on my XP system, in the registry under HKEY_CLASSES_ROOT\Applications > \python.exe\shell\open

Re: slicings: 3 questions

2009-01-29 Thread Alan G Isaac
On Thu, Jan 29, 2009 at 10:01 AM, Alan G Isaac wrote: 2. It seems that slice objects and range objects are awfully similar in many ways. Is this "appearance only", or was there any discussion of unifying them? Curious for insight... On 1/29/2009 1:37 PM Chris Rebert apparently wrote: Wouldn

Re: ImportError in embedded Python Interpreter

2009-01-29 Thread googler . 1 . webmaster
Hi! Okay, I checkede Py_Main(...) and called some python code there. There it works too. So I know whats missing. sys.environ.. returns nothing. How can I set the paths with the Python C API? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: slicings: 3 questions

2009-01-29 Thread Robert Kern
On 2009-01-29 15:33, Alan G Isaac wrote: On Thu, Jan 29, 2009 at 10:01 AM, Alan G Isaac wrote: 2. It seems that slice objects and range objects are awfully similar in many ways. Is this "appearance only", or was there any discussion of unifying them? Curious for insight... On 1/29/2009 1:37

Re: ctypes with Compaq Visual Fortran 6.6B *.dll (Windows XP), passing of integer and real values

2009-01-29 Thread member thudfoo
On Thu, Jan 29, 2009 at 1:08 PM, alex wrote: > Duncan > Thank you for your explanation of the relationship between calling > convention and stack management. > I will try to understand better this topic in the CVF and ctypes > documentation (not so easy). > > Regards Alex > > -- > http://mail.pyth

Re: receive and react to MIDI input

2009-01-29 Thread elsjaako
On Jan 29, 9:36 pm, r wrote: > On Jan 29, 1:33 pm, elsjaako wrote: > > There is a Python MIDI module, i think it is pyMIDI, have you checked > it out? Thank you for the responce. Unfortunately, that package is for OS X (it doesn't say that clearly on the website). But it might indeed be worthwhi

Re: Why doesn't eval of generator expression work with locals?

2009-01-29 Thread Gabriel Genellina
En Thu, 29 Jan 2009 05:14:41 -0200, Hendrik van Rooyen escribió: "Gabriel Genellina" wrote: En Wed, 28 Jan 2009 16:00:43 -0200, Scott David Daniels (I *think* this has to do with free variables in the "right side" (after the "in" keyword) of a generator expression; they appear to be evaluat

parsing text from a file

2009-01-29 Thread Wes James
If I read a windows registry file with a line like this: "{C15039B5-C47C-47BD-A698-A462F4148F52}"="v2.0|Action=Allow|Active=TRUE|Dir=In|Protocol=6|Profile=Public|App=C:\\Program Files\\LANDesk\\LDClient\\tmcsvc.exe|Name=LANDesk Targeted Multicast|Edge=FALSE|" with this code: f=open('fwrules.reg2

Re: Why doesn't eval of generator expression work with locals?

2009-01-29 Thread Gabriel Genellina
En Wed, 28 Jan 2009 18:06:01 -0200, Peter Otten <__pete...@web.de> escribió: Gabriel Genellina wrote: (I think this has to do with free variables in the "right side" (after the "in" keyword) of a generator expression; they appear to be evaluated when the expression is *defined*, not when is is

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2009-01-29 Thread Benjamin Kaplan
On Thu, Jan 29, 2009 at 4:19 PM, John Machin wrote: > Benjamin Kaplan case.edu> writes: > > > > > > > On Thu, Jan 29, 2009 at 12:09 PM, Anjanesh Lekshminarayanan > anjanesh.net> wrote: > > > It does auto-detect it as cp1252- look at the files in the traceback > and > > > you'll see lib\encoding

verilog like class w/ bitslicing & int/long classtype

2009-01-29 Thread mark . seagoe
I'm trying to make a script environment with datatypes (or classes) for accessing hardware registers. At the top level, I would like the ability to bitwise ops if bit slice brackets are used, but if no brackets are used, I would like it to write/read the whole value. For example, if I have someth

Re: is python Object oriented??

2009-01-29 Thread Ben Finney
MC writes: > Hi! > > Il se trouve que Chris Rebert a formulé : > > Python has functions, which are not associated with a class > > functions are methods of builtin... No, because ‘builtin’ is not a class. -- \ “The shortest distance between two points is under | `\

Re: parsing text from a file

2009-01-29 Thread Vlastimil Brom
2009/1/29 Wes James : > If I read a windows registry file with a line like this: > ... > > with this code: > > f=open('fwrules.reg2.txt') > > for s in f: > if s.find('LANDesk') <0: >print s, > > > LANDesk is not found. > > how do I find LANDesk in a string like this. is the "\\" messing thing

Re: pyAA for Python2.5

2009-01-29 Thread Rob Williscroft
Kottiyath wrote in news:d86a0c1d-e158-4aa1-a47f-e2149948bdc3 @p2g2000prf.googlegroups.com in comp.lang.python: > On Jan 29, 1:51 am, Rob Williscroft wrote: >> Kottiyath wrote in news:6a594643-f6a2-4d8d-aab3-27eb16cb2fb8 >> @b38g2000prf.googlegroups.com in comp.lang.python: >> >> > I have mingw32

Re: pygccxml xml output file

2009-01-29 Thread Roman
On Jan 24, 3:25 pm, whatazor wrote: > Hi all, > I start to use this module in order to produce xml( and the make other > things), but differently from gccxml I don't find the variable that > set the name of the xml output file after the parsing (in gccxml is - > fxml), so it creates temporary file

Can't understand what python wants from me

2009-01-29 Thread Oleksiy Khilkevich
Hello, everyone, This may be a totally noob question, but since I am one, so here is it. I have the following code (not something much of): http://paste.debian.net/27204 The current code runs well, but the problem is with input value: http://paste.debian.net/27205 Аs you can see, the numbers ar

Re: Can't understand what python wants from me

2009-01-29 Thread Chris Rebert
On Thu, Jan 29, 2009 at 1:50 PM, Oleksiy Khilkevich wrote: > Hello, everyone, > This may be a totally noob question, but since I am one, so here is it. > > I have the following code (not something much of): > http://paste.debian.net/27204 > The current code runs well, but the problem is with input

Re: Can't understand what python wants from me

2009-01-29 Thread Chris Hulan
On Jan 29, 4:50 pm, Oleksiy Khilkevich wrote: > Hello, everyone, > This may be a totally noob question, but since I am one, so here is it. > > I have the following code (not something much > of):http://paste.debian.net/27204 > The current code runs well, but the problem is with input > value:htt

  1   2   >