HTTP request error with urlopen

2008-07-02 Thread spandana g
Hello , I have written a code to get the page source of the google search page .. this is working for other urls. I have this problem with import re from urllib2 import urlopen string='http://www.google.com/search?num=20&hl=en&q=ipod&btnG=Search' file_source=file("google_source.txt",'w'

Re: How to pickle bound methods

2008-07-02 Thread Peter Otten
srinivasan srinivas wrote: Please don't top-post. > Could you please explain the code breifly?? I am not getting what it does. >> import copy_reg >> import new >> >> def make_instancemethod(inst, methodname): >>     return getattr(inst, methodname) >> >> def pickle_instancemethod(method): >>  

Re: Email Validation with domain

2008-07-02 Thread Sallu
On Jul 2, 6:25 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Sallu <[EMAIL PROTECTED]> writes: > > validateEmail(msg)  i wrote a script above it works fine > > Actually, no. It rejects a great many email addresses that are valid. > > > but it does not check for valid domain like .com .org .in how to

Re: Times where one would use new style classes vs classic classes

2008-07-02 Thread Ben Finney
Quek <[EMAIL PROTECTED]> writes: > I'd really like to know in the current context of Python 2.5, > besides in the cases of multi-inheritance, where would I use new > style classes? Is it a norm to use more new style classes even if I > don't have multi-inheritance in the industry, open source proj

Re: ANN: XML builder for Python

2008-07-02 Thread Stefan Behnel
Stefan Behnel wrote: > Jonas Galvez wrote: >> Not sure if it's been done before, but still... > > Obviously ;) > > http://codespeak.net/lxml/tutorial.html#the-e-factory > > ... and tons of other tools that generate XML, check PyPI. Although it might be the first time I see the with statement "m

Re: ANN: XML builder for Python

2008-07-02 Thread Stefan Behnel
Jonas Galvez wrote: > Not sure if it's been done before, but still... Obviously ;) http://codespeak.net/lxml/tutorial.html#the-e-factory ... and tons of other tools that generate XML, check PyPI. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: detection of unplugged cable

2008-07-02 Thread Oguz Yarimtepe
On Thu, Jul 3, 2008 at 7:33 AM, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Wed, 2 Jul 2008 13:32:59 +0300, "Oguz Yarimtepe" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: >I'd be willing to bet that S-video outputs do NOT have feed-back to > the video driver as t

Re: How to pickle bound methods

2008-07-02 Thread srinivasan srinivas
Peter, Could you please explain the code breifly?? I am not getting what it does. Thanks, Srini  - Original Message From: Peter Otten <[EMAIL PROTECTED]> To: python-list@python.org Sent: Wednesday, 2 July, 2008 12:53:19 PM Subject: Re: How to pickle bound methods srinivasan srinivas wr

Re: Queue/Priority Needed

2008-07-02 Thread Mariano Mara
Keith Nation wrote: I'm still very new to python, and I have a question about how to prioritize jobs in a queue. You can use the python 2.6 priority queue implementation: $ python Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyr

Re: Times where one would use new style classes vs classic classes

2008-07-02 Thread Daniel Fetchinson
> I'm really new to Python and I've been reading up some texts on older > versions of Python (2.2 to be specific). > > The text briefly mentioned new style and classic classes. > > I'd really like to know in the current context of Python 2.5, besides > in the cases of multi-inheritance, where would

Times where one would use new style classes vs classic classes

2008-07-02 Thread Quek
Hi all, I'm really new to Python and I've been reading up some texts on older versions of Python (2.2 to be specific). The text briefly mentioned new style and classic classes. I'd really like to know in the current context of Python 2.5, besides in the cases of multi-inheritance, where would I

Re: wxPython: How can I get window's HANDLE in wxPython.

2008-07-02 Thread Paul McNett
Leo Lee wrote: I need a window's handle to be passed to external c++. Thanks in advance import wx help(wx.Window.GetHandle) """ GetHandle(*args, **kwargs) unbound wx._core.Window method GetHandle(self) -> long Returns the platform-specific handle (as a long integer) of the physic

Re: wxPython: How can I get window's HANDLE in wxPython.

2008-07-02 Thread Benjamin Kaplan
On Wed, Jul 2, 2008 at 9:40 PM, Leo Lee <[EMAIL PROTECTED]> wrote: > I need a window's handle to be passed to external c++. > Thanks in advance > Try posting this to the wxPython-users mailing list. You'll probably get better answers there. http://www.wxpython.org/maillist.php > > -- > http://

Need help on Python File write operation.....

2008-07-02 Thread Devil
Hi, I am stuck at below mention point. I am not able to find any way of doing it in python. I have google enough to find any sample code but unsuccessful. Plz help. I am trying to write a file of size (user specified size) so that it will pops(remove) the oldest line written (data item) to make r

Re: internet porn

2008-07-02 Thread Dominic Rice
[EMAIL PROTECTED] wrote: Hello, WNBC is looking to interview someone who is addicted to internet porn for our 11pm newscast, if you are interested or availbale we can also disguse your identity. Call 212-664-2731 or email [EMAIL PROTECTED] Thanks wtf -- http://mail.python.org/mailman/listinfo/p

wxPython: How can I get window's HANDLE in wxPython.

2008-07-02 Thread Leo Lee
I need a window's handle to be passed to external c++. Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating list of possible configurations

2008-07-02 Thread Terry Reedy
Mensanator wrote: On Jul 2, 4:53 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: After this I tried figuring out a function that would generate the different possible configurations, but I couldn't quite wrap my head around it... Lookup "Cartesian Product". Any pointers as to how one

Re: wrong md5 checksum

2008-07-02 Thread Terry Reedy
kkwweett wrote: A. an error in the software that computed the value for the web page, B. a transcription error in putting the checksum on the web page, C. accidental corruption of the file, or D. a deliberate attempt to substitute a file with a similar MD5 sum. It seems that the answe

ANN: XML builder for Python

2008-07-02 Thread Jonas Galvez
Not sure if it's been done before, but still... from __future__ import with_statement from xmlbuilder import builder, element xml = builder(version="1.0", encoding="utf-8") with xml.feed(xmlns='http://www.w3.org/2005/Atom'): xml.title('Example Feed') xml.link(None, href='http://ex

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-02 Thread lotrpy
On 7月1日, 上午5时46分, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > I don't want to be so mean here, but how hard it could be be writing a > freesoftware which would automatically/intelligently auto complete > Python code? (I mean something that really does the job, like > Microsoft's Visual Studio or

libffi and ARM support for Python

2008-07-02 Thread Jeremy Link
The latest version of libffi is supposed to support the ARM processor. Has anyone taken this and folded into Python v2.5.2 so that we have support for this? I've tried but have run into a few issues: 1. Needed to enable FFI_CLOSURES 2. Added FFI_TRAMPOLINE_SIZE (set it to 32, not

Re: Sorting two dimentional array by column?

2008-07-02 Thread John Machin
On Jul 3, 7:35 am, Tobiah <[EMAIL PROTECTED]> wrote: > > Imagine an excel spreadsheet. I can choose > > a column and sort the records based on the items > > in that column. I would like to do the same > > thing with a large two dimensional array. > > What would be the fastest way (in computation

Re: Generating list of possible configurations

2008-07-02 Thread Mensanator
On Jul 2, 4:53 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello pythonistas. > > I'm a newbie to pretty much both programming and Python. I have a task > that involves writing a test script for every possible combination of > preference settings for a software I'm testing. I figured that

Re: Sorting two dimentional array by column?

2008-07-02 Thread Tobiah
>> Imagine an excel spreadsheet. I can choose >> a column and sort the records based on the items >> in that column. I would like to do the same >> thing with a large two dimensional array. >> What would be the fastest way (in computation time) >> to accomplish this? > > Now that I think about

Re: Sorting two dimentional array by column?

2008-07-02 Thread Paddy
On Jul 2, 10:35 pm, Tobiah <[EMAIL PROTECTED]> wrote: > > Imagine an excel spreadsheet.  I can choose > > a column and sort the records based on the items > > in that column.  I would like to do the same > > thing with a large two dimensional array. > > What would be the fastest way (in computation

Re: internet porn

2008-07-02 Thread Mensanator
On Jul 2, 4:42 pm, [EMAIL PROTECTED] wrote: > Hello, WNBC is looking to interview someone who is addicted to > internet porn for our 11pm newscast, if you are interested or > availbale we can also disguse your identity. > Call 212-664-2731 And don't be put off by the heavy breathing. > or email [

Re: C++ or Python

2008-07-02 Thread Pete Kirkham
2008/6/29 Dan Stromberg <[EMAIL PROTECTED]>: > > On Sun, 29 Jun 2008 11:20:45 +0200, Sebastian \"lunar\" Wiesner wrote: > > > Dan Stromberg <[EMAIL PROTECTED]>: > > > >> things like passing a method as a function parameter is a no-brainer > >> (requires extra syntax in java because of the cautious

Generating list of possible configurations

2008-07-02 Thread [EMAIL PROTECTED]
Hello pythonistas. I'm a newbie to pretty much both programming and Python. I have a task that involves writing a test script for every possible combination of preference settings for a software I'm testing. I figured that this was something that a script could probably do pretty easily, given all

internet porn

2008-07-02 Thread NewsChannel4
Hello, WNBC is looking to interview someone who is addicted to internet porn for our 11pm newscast, if you are interested or availbale we can also disguse your identity. Call 212-664-2731 or email [EMAIL PROTECTED] Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyro: ProtocolError('connection failed')

2008-07-02 Thread Irmen de Jong
Diez B. Roggisch wrote: THis is just a guess - but it seems that somehow you don't bind your pyro objects to the NIC's IP address, but to localhost (127.0.0.1) - which of course won't work. That never happened to me though, try and see the pyro docs on how to prevent/control to which IP a p

Re: Sorting two dimentional array by column?

2008-07-02 Thread Tobiah
> Imagine an excel spreadsheet. I can choose > a column and sort the records based on the items > in that column. I would like to do the same > thing with a large two dimensional array. > What would be the fastest way (in computation time) > to accomplish this? Now that I think about the prob

Queue/Priority Needed

2008-07-02 Thread Keith Nation
I'm still very new to python, and I have a question about how to prioritize jobs in a queue. Currently, I have a simple script that does the following: job1 = [1, 'Task1', 'v03', '-start', 'Bonnie'] job2 = [2, 'Task2', 'v01', '-start', 'Billy'] job3 = [3, 'Task3', 'v01', '-start', 'Bob'] jobseque

extending auto_dict

2008-07-02 Thread R W
I'm using the excellent 'auto_dict' (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/537637) but I'd like to be able to extend it. Currently my program has class auto_dict(dict): def __getitem__(self, key): return self.setdefault(key, self.__class__()) daily=auto_dict() tr

Sorting two dimentional array by column?

2008-07-02 Thread Tobiah
Imagine an excel spreadsheet. I can choose a column and sort the records based on the items in that column. I would like to do the same thing with a large two dimensional array. What would be the fastest way (in computation time) to accomplish this? This seems similar to a recent sorting thread

Re: Scripting SAP GUI (Windows)

2008-07-02 Thread M�ta-MCI (MVP)
Hi! You can use Autoit. Bad "conception" language ; but many good tools, for identify windows, process, send keystrokes, emulate mouse, etc. (Autohotkey is make on Autoit 2 ; Autoit is actually in version 3). Good trick : Autoit-X is a COM server, with the most importants functions of Autoit (

Re: Scripting SAP GUI (Windows)

2008-07-02 Thread M�ta-MCI (MVP)
Hi! Linux is much better place You confuse proselitism and objectivity... @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Run interpreter in emacs?

2008-07-02 Thread defn noob
thanks but i dont quite understand the load-path, add to the load path. the loadpath has a lot of variables. so where i should i place the python-mode folder and should i then add that directory to the loadpath? -- http://mail.python.org/mailman/listinfo/python-list

Re: Run interpreter in emacs?

2008-07-02 Thread Diez B. Roggisch
defn noob schrieb: Can I run the python interpreter from with in Emacs? Yes, the python-mode supports that. Make sure to install the proper one http://www.emacswiki.org/cgi-bin/wiki/PythonMode Do i have to change anything then? or is it by default? it already syntax-highlights python-files.

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-02 Thread Almar Klein
> The free Python editors/IDEs really do need work as far as code completion goes but I am hopeful. I agree, I'm quite new to python and just had my period of searching for the best IDE/editor. Wing wins for me, but it is not free (at least not te versions which do have code completion). Pype (a f

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-02 Thread Ivan Ven Osdel
Not really, I have just worked with them more. - Original Message - From: "Ali Servet Dönmez" <[EMAIL PROTECTED]> To: python-list@python.org Sent: Wednesday, July 2, 2008 1:15:04 PM GMT -06:00 US/Canada Central Subject: Re: Freesoftware for auto/intelligent code completing in Python On Ju

Re: wrong md5 checksum

2008-07-02 Thread kkwweett
A. an error in the software that computed the value for the web page, B. a transcription error in putting the checksum on the web page, C. accidental corruption of the file, or D. a deliberate attempt to substitute a file with a similar MD5 sum. It seems that the answer is probably B. Bu

Re: Most efficient way to get pixelcolors of an image?

2008-07-02 Thread defn noob
this just shows a GUI that normally shows pictures but it doesnt show any picture... from PIL import Image im = Image.open('C:/Users/saftarn/Desktop/images/giffer.gif') im2 = Image.open('C:/Users/saftarn/Desktop/images/blob.jpg') im.rotate(45).show() im2.show() -- http://mail.python.org/mailm

Re: detection of unplugged cable

2008-07-02 Thread Diez B. Roggisch
Oguz Yarimtepe schrieb: Hi, I am tring to develeop a gui with pyqt. I need to detect whether the the cable to vga, dmi or s-video outputs are plugged or unplugged. After detection i need to run a process. How can i do this? Not with python as is. This is OS-specific, and you should see what y

Run interpreter in emacs?

2008-07-02 Thread defn noob
Can I run the python interpreter from with in Emacs? Do i have to change anything then? or is it by default? it already syntax-highlights python-files. -- http://mail.python.org/mailman/listinfo/python-list

detection of unplugged cable

2008-07-02 Thread Oguz Yarimtepe
Hi, I am tring to develeop a gui with pyqt. I need to detect whether the the cable to vga, dmi or s-video outputs are plugged or unplugged. After detection i need to run a process. How can i do this? -- Oğuz Yarımtepe -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-02 Thread Tim Golden
In case it helps, there's a recipe just shown up on the Python Cookbook which at least illustrates DAO use: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/572165 TJG -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyro: ProtocolError('connection failed')

2008-07-02 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: Hello everyone Can someone help me fix this problem? I am using an example from Pyro(Python Remote Object) website directly. It is the last example from http://pyro.sourceforge.net/manual/8-example.htm I have two computers to run Server and Client. ###

Re: Most efficient way to get pixelcolors of an image?

2008-07-02 Thread Diez B. Roggisch
defn noob schrieb: i want to process a large number of images and store their respective pixels in a matrix. what is the mostt efficient way of opening and checking them? i doubt pygame is made for this purpose :) Au contaraire, it is. http://www.pygame.org/docs/ref/pixelarray.html Diez -- h

Re: Python and timezones

2008-07-02 Thread Mensanator
On Jul 2, 12:43 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm trying to write some code to deal with world timezones, and I'm > getting a strange result.  America/Iqaluit should not be showing up in > UTC+00:00, but it is.  Can anyone see what's wrong with this code? > > import time > fr

Re: Discover Islam - The Fastest Growing Religion in the World !

2008-07-02 Thread Dikkie Dik
If it so fast growing, I'd rather wait for a stable release... LOL -- http://mail.python.org/mailman/listinfo/python-list

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-02 Thread Ali Servet Dönmez
On Jul 2, 7:55 pm, Ivan Ven Osdel <[EMAIL PROTECTED]> wrote: > The free Python editors/IDEs really do need work as far as code completion > goes but I am hopeful. > > IMO Stani's Python Editor comes closest by providing some code sense through > a combination of history and doc strings for Python

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-02 Thread Ivan Ven Osdel
The free Python editors/IDEs really do need work as far as code completion goes but I am hopeful. IMO Stani's Python Editor comes closest by providing some code sense through a combination of history and doc strings for Python built-ins. Where it falls short is the ability to scan doc strings

Re: Trouble using pinckle

2008-07-02 Thread [EMAIL PROTECTED]
On 2 juil, 18:40, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > > > I'll also try the dictionnary method. > > > My final idea was that a dictionnary would be perhaps simple in the > > > future to save/load as XML and a parser. > > XML ? What a strange idea ? > > Why is it so strange ? It was kind o

Re: Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-02 Thread M.-A. Lemburg
On 2008-07-02 16:54, Iain King wrote: On Jul 2, 3:29 pm, Tim Golden <[EMAIL PROTECTED]> wrote: Iain King wrote: Hi. I'm using the win32 module to access an Access database, but I'm running into the File Sharing lock count as inhttp://support.microsoft.com/kb/815281 The solution I'd like to us

Re: Bloody signal handling (in embedded Python code)

2008-07-02 Thread Marcin Krol
Right, I didn't realize before that Python interpreter has its own signal handling routines. Now I am able to handle signals in Python code, but it still barfs on exit: import time import signal import sys def userBreak(sigNum, execFrame): print "Interrupted,,," sys.exit(sigN

Re: Most efficient way to get pixelcolors of an image?

2008-07-02 Thread Larry Bates
defn noob wrote: i want to process a large number of images and store their respective pixels in a matrix. what is the mostt efficient way of opening and checking them? i doubt pygame is made for this purpose :) i guess i could also use tkinter? and why cant i print out matrix after getting t

Re: convert unicode characters to visibly similar ascii characters

2008-07-02 Thread Jim
On Jul 1, 8:42 pm, Jim <[EMAIL PROTECTED]> wrote: > On Jul 1, 8:29 pm, John Machin <[EMAIL PROTECTED]> wrote: > > Comments on the above grep output: > > 1. You have SOFT HYPHEN twice, mapping it to u'-' and '-' > > Hmph. I'll correct that. Thanks. Well, maybe not. I forgot that I got the by-hand

Re: Trouble using pinckle

2008-07-02 Thread Cédric Lucantis
> > I'll also try the dictionnary method. > > My final idea was that a dictionnary would be perhaps simple in the > > future to save/load as XML and a parser. > XML ? What a strange idea ? Why is it so strange ? Many softs have their config in xml, and the xml.* modules are not that hard to use.

Most efficient way to get pixelcolors of an image?

2008-07-02 Thread defn noob
i want to process a large number of images and store their respective pixels in a matrix. what is the mostt efficient way of opening and checking them? i doubt pygame is made for this purpose :) i guess i could also use tkinter? and why cant i print out matrix after getting the pixels? do i hav

Re: lxml validation and xpath id function

2008-07-02 Thread Stefan Behnel
Floris Bruynooghe wrote: > I'm trying to use the .xpath('id("foo")') function on an lxml tree but > can't get it to work. Quick follow-up: this has been answered on the lxml mailing list: http://comments.gmane.org/gmane.comp.python.lxml.devel/3815 Stefan -- http://mail.python.org/mailman/listinf

Re: Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-02 Thread Tim Golden
Iain King wrote: On Jul 2, 3:29 pm, Tim Golden <[EMAIL PROTECTED]> wrote: Iain King wrote: Hi. I'm using the win32 module to access an Access database, but I'm running into the File Sharing lock count as inhttp://support.microsoft.com/kb/815281 The solution I'd like to use is the one where yo

Re: Trouble using pinckle

2008-07-02 Thread Bruno Desthuilliers
Pierre-Alain Dorange a écrit : Cédric Lucantis <[EMAIL PROTECTED]> wrote: Here self is only a local variable and its meaning is only a convention. So assigning it to a new value won't change the object itself (and is not a good idea as it may be confusing for the reader). Thanks, i was thinki

Bloody signal handling (in embedded Python code)

2008-07-02 Thread Marcin Krol
Hello everyone, And now for something completely different: signal handling sometimes works, sometimes it doesn't. When I embed following code, it works: count = 0 def test(): global count while True: count += 1 if (count % 10 == 0):

Re: Importing modules in embedded Python

2008-07-02 Thread Marcin Krol
OK I found the answer in yet another Google search, right after I gave up and posted here - turns out in order to import dynamically linked modules, one has to pass -E argument to the linker. Exception exceptions.ImportError: '/usr/lib/python2.4/lib-dynload/timemodule.so: undefined symbol: Py

Re: Trouble using pinckle

2008-07-02 Thread Pierre-Alain Dorange
Cédric Lucantis <[EMAIL PROTECTED]> wrote: > Here self is only a local variable and its meaning is only a convention. So > assigning it to a new value won't change the object itself (and is not a good > idea as it may be confusing for the reader). Thanks, i was thinking about something like that.

Importing modules in embedded Python

2008-07-02 Thread Marcin Krol
Hello everyone, I can embed Python interpreter in C code now, but now there's another problem, importing modules in Python code doesn't work: Exception exceptions.ImportError: '/usr/lib/python2.4/lib-dynload/timemodule.so: undefined symbol: PyModule_AddObject' in 'garbage collection' ignored

Woman on Top Sex Position - The Sexiest Mattress Move ...

2008-07-02 Thread kali
Woman on Top Sex Position - The Sexiest Mattress Move ... Top 10 Sex Stories of 2006 For your end-of-the-year sexual entertainment, my picks for the Top 10 Sex Stories of 2006:. 10. The Larry Wachowski Story ... click him in poen viset. * htt://mountanbikes.bl

Re: simple UnZip

2008-07-02 Thread MRAB
On Jul 2, 3:07 pm, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > Le Wednesday 02 July 2008 15:39:51 noydb, vous avez écrit : > > > > > Can someone help me with this script, which I found posted elsewhere? > > I'm trying to figure out what is going on here so that I can alter it > > for my needs, but

AttributeError with embedded Python

2008-07-02 Thread Peter LaDow
I posted this on c.l.p, but with the high level of traffic there, I thought I'd try to post here as well. I've embedded Python in an extension for a program we are using here at work. And I'm a bit stumped as to why I am getting an AttributeError only in the embedded Python. First, a bit of what

Re: How do web templates separate content and logic?

2008-07-02 Thread George Sakkis
On Jun 30, 3:16 pm, Mike <[EMAIL PROTECTED]> wrote: > On Jun 30, 1:41 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > Because _typically_ a web template consists of mostly HTML, with > > relatively little presentational logic and (ideally) no business > > logic. Now, if all one wants to do i

Re: Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-02 Thread Iain King
On Jul 2, 3:29 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > Iain King wrote: > > Hi.  I'm using the win32 module to access an Access database, but I'm > > running into the File Sharing lock count as > > inhttp://support.microsoft.com/kb/815281 > > The solution I'd like to use is the one where you c

Re: Trouble using pinckle

2008-07-02 Thread Cédric Lucantis
Le Wednesday 02 July 2008 16:09:07 Pierre-Alain Dorange, vous avez écrit : > Hello, > > I'm new to python and i'm deelopping a small game with pygame. > I got lot of fun with python. > > Trying to implement a config file to save user score and config. > Reading doc and some tutorial about file hand

Re: How do web templates separate content and logic?

2008-07-02 Thread Bruno Desthuilliers
TheDarkTrumpet a écrit : Another thing I'd like to add on this subject. I agree with others here that having logic in the view isn't really a bad thing. I used to think it did, but now I don't think it does as much. I feel that when you're separating out the view, you're giving really non-prog

Re: How to pickle bound methods

2008-07-02 Thread George Sakkis
On Jul 2, 8:26 am, srinivasan srinivas <[EMAIL PROTECTED]> wrote: > I am writing client-server program. The server will send a methodname and its > arguments to a client. The client has to execute the method and return back > the results. Are you aware of Pyro [1] ? Btw, you use the terminology

Spell suggest for locations

2008-07-02 Thread nabblepop
I'm working on spell suggestions for a list of places(~10^6) e.g pizza huthttp://www.nabble.com/Spell-suggest-for-locations-tp18239043p18239043.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-02 Thread Tim Golden
Iain King wrote: Hi. I'm using the win32 module to access an Access database, but I'm running into the File Sharing lock count as in http://support.microsoft.com/kb/815281 The solution I'd like to use is the one where you can temporarily override the setting using (if we were in VB): DAO.DBEng

Re: convert unicode characters to visibly similar ascii characters

2008-07-02 Thread Peter Bulychev
Thank you. That is exactly what I was looking for. 2008/7/2 Jim <[EMAIL PROTECTED]>: > Peter Bulychev wrote: > > I want to convert unicode character into ascii one. > You have to make some arbitrary choices of what to translate. Based > on some materials on effbot's site, and a recipe, I made

Re: simple UnZip

2008-07-02 Thread noydb
On Jul 2, 10:07 am, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > Le Wednesday 02 July 2008 15:39:51 noydb, vous avez écrit : > > > > > > > Can someone help me with this script, which I found posted elsewhere? > > I'm trying to figure out what is going on here so that I can alter it > > for my needs

Re: Scripting SAP GUI (Windows)

2008-07-02 Thread Sebastian "lunar" Wiesner
Thomas Guettler <[EMAIL PROTECTED]>: > Hi, > > I need to script SAP GUI running on MS-Windows: Doesn't that thing have a COM interface? -- Freedom is always the freedom of dissenters. (Rosa Luxemburg) -- http://mail.python.org/mailman/listinfo/python-list

Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-02 Thread Iain King
Hi. I'm using the win32 module to access an Access database, but I'm running into the File Sharing lock count as in http://support.microsoft.com/kb/815281 The solution I'd like to use is the one where you can temporarily override the setting using (if we were in VB): DAO.DBEngine.SetOption dbmax

Trouble using pinckle

2008-07-02 Thread Pierre-Alain Dorange
Hello, I'm new to python and i'm deelopping a small game with pygame. I got lot of fun with python. Trying to implement a config file to save user score and config. Reading doc and some tutorial about file handling i read about pickle, and yes it's very easy to implement. But i thought i miss som

Pyro: ProtocolError('connection failed')

2008-07-02 Thread jamitwidme
Hello everyone Can someone help me fix this problem? I am using an example from Pyro(Python Remote Object) website directly. It is the last example from http://pyro.sourceforge.net/manual/8-example.htm I have two computers to run Server and Client. ser

Re: simple UnZip

2008-07-02 Thread Cédric Lucantis
Le Wednesday 02 July 2008 15:39:51 noydb, vous avez écrit : > Can someone help me with this script, which I found posted elsewhere? > I'm trying to figure out what is going on here so that I can alter it > for my needs, but the lack of descriptive names is making it > difficult. And, the script do

Re: simple UnZip

2008-07-02 Thread Chris
On Jul 2, 3:39 pm, noydb <[EMAIL PROTECTED]> wrote: > Can someone help me with this script, which I found posted elsewhere? > I'm trying to figure out what is going on here so that I can alter it > for my needs, but the lack of descriptive names is making it > difficult.  And, the script doesn't qu

Re: simple UnZip

2008-07-02 Thread oj
On Jul 2, 2:39 pm, noydb <[EMAIL PROTECTED]> wrote: > Can someone help me with this script, which I found posted elsewhere? > I'm trying to figure out what is going on here so that I can alter it > for my needs, but the lack of descriptive names is making it > difficult.  And, the script doesn't qu

simple UnZip

2008-07-02 Thread noydb
Can someone help me with this script, which I found posted elsewhere? I'm trying to figure out what is going on here so that I can alter it for my needs, but the lack of descriptive names is making it difficult. And, the script doesn't quite do anything worthwhile -- it unzips one file from a zipf

Distribute ctypes based modules

2008-07-02 Thread rocksportrocker
Hi, how do you distribute ctypes based modules on a linux machine ? What does your setup.py look like ? I have to copy my shared library to /usr/lib or another common place, but I would prefer .../site-packages/... In the latter case I have to modify LD_LIBRARY_PATH oder some ld.so.conf configura

Re: Email Validation with domain

2008-07-02 Thread Ben Finney
Sallu <[EMAIL PROTECTED]> writes: > validateEmail(msg) i wrote a script above it works fine Actually, no. It rejects a great many email addresses that are valid. > but it does not check for valid domain like .com .org .in how to > validate with domain To validate a domain for delivery of email

Re: Scripting SAP GUI (Windows)

2008-07-02 Thread Thomas Guettler
I just got this link in a german newsgroup: http://pywinauto.openqa.org/ Seems to be what I was looking for. Nevertheless feedback still welcome. Thomas Guettler schrieb: Hi, I need to script SAP GUI running on MS-Windows: Open SAP GUI window, if it is not already open, and then batch input

Re: How do web templates separate content and logic?

2008-07-02 Thread TheDarkTrumpet
Another thing I'd like to add on this subject. I agree with others here that having logic in the view isn't really a bad thing. I used to think it did, but now I don't think it does as much. I feel that when you're separating out the view, you're giving really non-programmers the ability to actu

Re: dynamically load from module import xxx

2008-07-02 Thread Guilherme Polo
On Tue, Jul 1, 2008 at 1:46 PM, Gary Duzan <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Neal Becker <[EMAIL PROTECTED]> wrote: >>What is a good way to emulate: >> >>from module import xxx >>where 'module' is a dynamically generated string? >> >>__import__ ('modulename', fromlist=

Using Gnuplot and making an exe file outv the prog

2008-07-02 Thread J-Burns
Hello. Been using the gnuplot lately. Program runs fine. And its plots as well. Now i want to make an exe file out of this program using py2exe. Cud some1 help me in telling me how this is done. Thnks -- http://mail.python.org/mailman/listinfo/python-list

Re: n00bie wants advice.

2008-07-02 Thread oj
On Jul 2, 7:25 am, [EMAIL PROTECTED] wrote: > This simple script writes html color codes that can be viewed in a > browser.  I used short form hex codes (fff or 000, etc) and my list > has only six hex numbers otherwise the results get rather large. I > invite criticism as to whether my code is "py

Re: Email Validation with domain

2008-07-02 Thread livibetter
> If you want to validate the domain, do a DNS lookup on the domain or > some such. I don't think there are standard modules to provide this > functionality included with python. You could try using the socket > module, and reading up on the relevant protocols, or making calls to > external progra

Re: Email Validation with domain

2008-07-02 Thread oj
On Jul 2, 12:41 pm, Sallu <[EMAIL PROTECTED]> wrote: > Hi All,   import re > msg=raw_input('Enter the email : ') > > def validateEmail(email): > >         #if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9] > {1,3})(\\]?)$", email) != None: >         if re.match("^([EMAIL PROTECTED]

Re: Why is recursion so slow?

2008-07-02 Thread Nick Craig-Wood
Rich Harkins <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > [snip] > > By definition any function in a functional language will > > always produce the same result if given the same arguments, so you can > > memoize any function. > > > > Ah, so that's why time.time() seems to be stuck...

Re: How to pickle bound methods

2008-07-02 Thread srinivasan srinivas
I am writing client-server program. The server will send a methodname and its arguments to a client. The client has to execute the method and return back the results. Thanks, Srini - Original Message From: Peter Otten <[EMAIL PROTECTED]> To: python-list@python.org Sent: Wednesday, 2 J

Re: How to modify the data in a binary file?

2008-07-02 Thread Cédric Lucantis
Le Wednesday 02 July 2008 14:05:39 Jim Brown, vous avez écrit : > Hi all, I'm a Python newbie, so please pardon me if my question may look a > little silly. :) > > I want to modify a binary file p.data (which has some C-style "short" > integers -- 16-bit integers) in such a way: > The bit m and bit

How to modify the data in a binary file?

2008-07-02 Thread Jim Brown
Hi all, I'm a Python newbie, so please pardon me if my question may look a little silly. :) I want to modify a binary file p.data (which has some C-style "short" integers -- 16-bit integers) in such a way: The bit m and bit n of every "short int" si in the file are set to 1, and the left bits in s

Re: How to pickle bound methods

2008-07-02 Thread Peter Otten
srinivasan srinivas wrote: (Please don't top-post) > It works will for instance and class methods. But it doesn't work for > static methods. Can you tel me how to pickle static methods as well?? For static methods pickling is not so easy because these don't carry information about the class they

  1   2   >