Re: problem with packages and path

2008-08-29 Thread Daniel
On Aug 28, 2:28 am, "Marco Bizzarri" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 27, 2008 at 6:44 PM, Daniel <[EMAIL PROTECTED]> wrote: > > Hello, > > > I'm writing some unit tests for my python software which uses > > packages.  Here is the basic structure: > > > mypackage > >  __init__.py > >  modul

Re: Python graphics question:pixel scrolling

2008-08-29 Thread Diez B. Roggisch
Raymond Luxury-Yacht wrote: > To learn python, I've been trying to write a simple graphics program > which displays a 1D cellular automaton's evolution. The last time I > wrote this program, it was in C for a CGA adaptor (!) in which the > display was mapped to two interlaced blocks of memory, an

Re: How to check is something is a list or a dictionary or a string?

2008-08-29 Thread Jason Scheirer
On Aug 29, 9:16 am, [EMAIL PROTECTED] wrote: > Hi, > > How to check if something is a list or a dictionary or just a string? > Eg: > > for item in self.__libVerDict.itervalues(): >             self.cbAnalysisLibVersion(END, item) > > where __libVerDict is a dictionary that holds values as strings o

Re: Identifying the start of good data in a list

2008-08-29 Thread castironpi
On Aug 29, 9:43 am, Jorgen Grahn <[EMAIL PROTECTED]> wrote: > On 27 Aug 2008 15:50:14 GMT, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > > > > On Tue, 26 Aug 2008 17:04:19 -0700, tdmj wrote: > > >> On Aug 26, 5:49 pm, [EMAIL PROTECTED] wrote: > >>> I have a list that starts with zeros, has sporadi

Re: Sending e-mail

2008-08-29 Thread peter . jones . rpi
On Aug 28, 3:23 pm, gordyt <[EMAIL PROTECTED]> wrote: > Peter here is an example. I just tried it and it works fine. > > from smtplib import SMTP > HOST = "smtp.gmail.com" > PORT = 587 > ACCOUNT = "" # put your gmail email account name here > PASSWORD = "" # put your gmail email account password

Re: Lining Up and PaddingTwo Similar Lists

2008-08-29 Thread W. eWatson
castironpi wrote: ... I don't think that's guaranteed by anything. I realized that 'dat.sort()' and 'txt.sort()' weren't necessary, since their contents are moved to a dictionary, which isn't sorted. Actually, I'm getting the file names from listdir, and they appear to be sorted low to high.

Re: Date Comparison and Manipulation Functions?

2008-08-29 Thread W. eWatson
I just tried the following code, and got an unexpected result. from pyfdate import * t = Time() ts = Time(2008, 8, 29,15,20,7) tnew = ts.plus(months=6) print "new date: ", tnew Result: new date: 2009-02-28 15:20:07 I believe that should be April 1, 2009. If I use months = 1 and day =31, I ge

Re: Tough Guy Competition

2008-08-29 Thread W. eWatson
alex23 wrote: On Aug 29, 3:45 pm, "W. eWatson" <[EMAIL PROTECTED]> wrote: Something to do on your weekends. [non-related link clipped] Another thing to do with your weekends would be to -not spam-. Sorry, misdirected. -- W. Watson (121.015 Deg

Re: eval() == evil? --- How to use it safely?

2008-08-29 Thread Lie
On Aug 29, 8:14 pm, Fett <[EMAIL PROTECTED]> wrote: > On Aug 29, 7:42 am, Fett <[EMAIL PROTECTED]> wrote: > > > On Aug 28, 7:57 pm, Paul Rubin wrote: > > > So long story short: if I am expecting a dictionary of strings, I > > should make a parser that only accepts a dicti

How to check is something is a list or a dictionary or a string?

2008-08-29 Thread dudeja . rajat
Hi, How to check if something is a list or a dictionary or just a string? Eg: for item in self.__libVerDict.itervalues(): self.cbAnalysisLibVersion(END, item) where __libVerDict is a dictionary that holds values as strings or lists. So now, when I iterate this dictionary I want to c

Re: Tkinter tkMessageBox problem - message box is displayed with an additional window

2008-08-29 Thread dudeja . rajat
On Thu, Aug 28, 2008 at 3:54 PM, Guilherme Polo <[EMAIL PROTECTED]> wrote: > On Thu, Aug 28, 2008 at 10:29 AM, <[EMAIL PROTECTED]> wrote: >> Hi, >> I'm working on Windows Platform >> >> I'm facing some problem with the tkMessageBox. My code is as below: >> >> import tkMessageBox >> import Tix >> f

Re: Module __file__ attribute in Python 3

2008-08-29 Thread Jean-Paul Calderone
On 29 Aug 2008 15:21:53 GMT, Steven D'Aprano <[EMAIL PROTECTED]> wrote: On the python-dev mailing list, a question has be raised about a change to module.__file__ in Python 3. http://www.gossamer-threads.com/lists/python/dev/674923#674923 In Python 2.x, m.__file__ is the name of the file that t

Re: Python - ubuntu

2008-08-29 Thread Fredrik Lundh
azrael wrote: A friend of mine told me something about Guido and google developing an Ubuntu distribution based and totaly oriented for the Python appliction development. not sure about a version tuned for python, but wikipedia claims that there's a custom packaging used internally: htt

Re: Python graphics question:pixel scrolling

2008-08-29 Thread Paul Boddie
On 29 Aug, 16:57, Raymond Luxury-Yacht <[EMAIL PROTECTED]> wrote: > The code below works, and uses pygame for the graphics.  But the scrolling is > quite flickery when using large windows.  I'm sure that the code > contains various neophyte python errors, and I'd appreciate any > comments on that,

Module __file__ attribute in Python 3

2008-08-29 Thread Steven D'Aprano
On the python-dev mailing list, a question has be raised about a change to module.__file__ in Python 3. http://www.gossamer-threads.com/lists/python/dev/674923#674923 In Python 2.x, m.__file__ is the name of the file that the module was imported from. That file might end with .py, .pyc, .pyo, o

python/mechanize - redirect/refresh question

2008-08-29 Thread bruce
Hi. I'm using mechanize to parse a page/site that uses the meta http-equiv tag in order to perform a refresh/redirect of the page. I've tried a number of settings, and read different posts on various threads, but seem to be missing something. the test.html page is the page that the url returns, h

[no subject]

2008-08-29 Thread bruce
Hi. I'm using mechanize to parse a page/site that uses the meta http-equiv tag in order to perform a refresh/redirect of the page. I've tried a number of settings, and read different posts on various threads, but seem to be missing something. the test.html page is the page that the url returns, h

Re: [1,2,3] exactly same as [1,2,3,] ?

2008-08-29 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-08-29, Roy Smith <[EMAIL PROTECTED]> wrote: > > > Exactly. This is one of those little pieces of syntactic > > sugar which makes python so nice to work with. The > > alternative is (in C, for example) abominatio

Re: [1,2,3] exactly same as [1,2,3,] ?

2008-08-29 Thread Steven D'Aprano
On Thu, 28 Aug 2008 16:28:03 -0700, Paul McNett wrote: > [EMAIL PROTECTED] wrote: >> x=[1,2,3] >> and >> x=[1,2,3,] >> >> are exactly the same, right? > > When confronted with this type of question, I ask the interpreter: > > {{{ > mac:~ pmcnett$ python > Python 2.5.2 (r252:60911, Feb 22 2008,

Python - ubuntu

2008-08-29 Thread azrael
Hy folks A friend of mine told me something about Guido and google developing an Ubuntu distribution based and totaly oriented for the Python appliction development. I googled for it with no results. Is it possible that My Buddy is trying to foole me or is it possible that someone knows something

Python graphics question:pixel scrolling

2008-08-29 Thread Raymond Luxury-Yacht
To learn python, I've been trying to write a simple graphics program which displays a 1D cellular automaton's evolution. The last time I wrote this program, it was in C for a CGA adaptor (!) in which the display was mapped to two interlaced blocks of memory, and scrolling up two lines of pixels wa

Re: eval() == evil? --- How to use it safely?

2008-08-29 Thread Steven D'Aprano
On Fri, 29 Aug 2008 05:42:46 -0700, Fett wrote: > On Aug 28, 7:57 pm, Paul Rubin wrote: > > So long story short: if I am expecting a dictionary of strings, I should > make a parser that only accepts a dictionary of strings then. There is > no safe way to use an existing

Re: [1,2,3] exactly same as [1,2,3,] ?

2008-08-29 Thread Grant Edwards
On 2008-08-29, Roy Smith <[EMAIL PROTECTED]> wrote: > Exactly. This is one of those little pieces of syntactic > sugar which makes python so nice to work with. The > alternative is (in C, for example) abominations like this: > > const char* l[] = {"foo" > , "bar" >

Re: Identifying the start of good data in a list

2008-08-29 Thread Jorgen Grahn
On 27 Aug 2008 15:50:14 GMT, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 26 Aug 2008 17:04:19 -0700, tdmj wrote: > >> On Aug 26, 5:49 pm, [EMAIL PROTECTED] wrote: >>> I have a list that starts with zeros, has sporadic data, and then has >>> good data. I define the point at which the data

Re: eval() == evil? --- How to use it safely?

2008-08-29 Thread Bruno Desthuilliers
Fett a écrit : On Aug 28, 7:57 pm, Paul Rubin wrote: So long story short: if I am expecting a dictionary of strings, I should make a parser that only accepts a dictionary of strings then. or use an existing parser for an existing and documented format, as many poste

Re: importing from .pyd

2008-08-29 Thread John Machin
On Jul 14, 9:11 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote: > On 14 Jul., 06:03, moijes12 <[EMAIL PROTECTED]> wrote: [snip] > > Error i get is > > ImportError: DLL load failed: The specified module could not be found. > > Notice that the message clearly indicates that Python found the module > but

Re: [1,2,3] exactly same as [1,2,3,] ?

2008-08-29 Thread Roy Smith
Terry Reedy <[EMAIL PROTECTED]> wrote: > Yes, so you can write something like either your second example or > > l = [ >kjasldfjs, >kjsalfj, >ksjdflasj, > ] > > and insert items without worrying about leaving out the comma (less of a > problem with 'horizontal' list), or delete the la

Re: PyDoc in Windows Vista

2008-08-29 Thread Mike Driscoll
On Aug 28, 5:45 pm, Tyler Shopshire <[EMAIL PROTECTED]> wrote: > I can't seem to access the pydoc sever from my web browser. I start the > server from the command prompt and everything seems to be working fine, > then I got tohttp://localhost:/and it doesn't work. I also tried > starting the gr

Re: Ensure only single application instance.

2008-08-29 Thread Alex
SOP is to write the actual PID of the running process into the pidfile, then check to a) that the pidfile exists, and b) that the process referenced in the pidfile exists. if the pidfile exists, but the process does not, take over the pidfile and carry on. On Fri, Aug 29, 2008 at 9:51 AM, Heston

Ensure only single application instance.

2008-08-29 Thread Heston James
Good afternoon all. I have an application/script which is launched by crontab on a regular basis. I need an effective and accurate way to ensure that only one instance of the script is running at any one time. After a short look around the internet I found a couple of examples, such as this

Re: iterating over two arrays in parallel?

2008-08-29 Thread Cousin Stanley
> I want to interate over two arrays in parallel, > something like this: > > a=[1,2,3] > b=[4,5,6] > > for i,j in a,b: > print i,j > > where i,j would be 1,4,2,5, 3,6 etc. > > Is this possible? > > Many TIA! > Mark >>> >>> list_1 = range( 1 , 4 ) >>> list_2 = range( 4

Re: file data to list

2008-08-29 Thread Sion Arrowsmith
Emile van Sebille <[EMAIL PROTECTED]> wrote: >data = zip(*[xx.split() for xx in open('data.txt').read().split("\n")]) Files are iterable: data = zip(*[xx.rstrip().split() for xx in open('data.txt')]) saves you creating the extra intermediate list resulting from split("\n"). -- \S -- [EMAIL PR

Re: Fastest way to write huge files

2008-08-29 Thread Mohamed Yousef
Thanks all , but there is still something i forget to state -sorry - all communication will be via Http with a server so data is received via Http so local network solutions won't work the problem really starts after receiving data in storing them without much of a CPU/Memory usage and with a good

Re: eval() == evil? --- How to use it safely?

2008-08-29 Thread Fett
On Aug 29, 7:42 am, Fett <[EMAIL PROTECTED]> wrote: > On Aug 28, 7:57 pm, Paul Rubin wrote: > > So long story short: if I am expecting a dictionary of strings, I > should make a parser that only accepts a dictionary of strings then. > There is no safe way to use an existi

Re: Lining Up and PaddingTwo Similar Lists

2008-08-29 Thread Boris Borcic
D,T=[dict((x.split('.')[0],x) for x in X) for X in (dat,txt)] for k in sorted(set(D).union(T)) : for S in D,T : print '%-8s' % S.get(k,'None'), print HTH W. eWatson wrote: Maybe there's some function like zip or map that does this. If not, it's probably fairly easy to do with pu

Re: translating "create Semaphore" to Linux

2008-08-29 Thread Tim Golden
GHUM wrote: Tim, ... why use a Semaphore rather than a Mutex? as much as I understood the documentation at MSDN http://msdn.microsoft.com/en-us/library/ms686927(VS.85).aspx http://msdn.microsoft.com/en-us/library/ms686946(VS.85).aspx a mutex seems to be nothing else than a special case of a

Re: Beginner's question about string's join() method

2008-08-29 Thread Diez B. Roggisch
Macygasp wrote: > Hi, > > Can anybody tell me why and how this is working: > ','.join(str(a) for a in range(0,10)) > '0,1,2,3,4,5,6,7,8,9' > > I find this a little weird because join takes a sequence as argument; > so, it means that somehow, from the "str(a) ... " expression, a > sequence

Re: translating "create Semaphore" to Linux

2008-08-29 Thread GHUM
Tim, > ... why use a Semaphore rather than a Mutex? as much as I understood the documentation at MSDN http://msdn.microsoft.com/en-us/library/ms686927(VS.85).aspx http://msdn.microsoft.com/en-us/library/ms686946(VS.85).aspx a mutex seems to be nothing else than a special case of a semaphore? Th

Re: eval() == evil? --- How to use it safely?

2008-08-29 Thread Fett
On Aug 28, 7:57 pm, Paul Rubin wrote: So long story short: if I am expecting a dictionary of strings, I should make a parser that only accepts a dictionary of strings then. There is no safe way to use an existing construct. That is what I was afraid of. I know I will ha

Re: translating "create Semaphore" to Linux

2008-08-29 Thread Tim Golden
GHUM wrote: hSem = win32event.CreateSemaphore (None, 1, 1,"stringincludinginterfaceandport") rt=win32event.WaitForSingleObject (hSem, 0) if rt != win32event.WAIT_TIMEOUT: really_do_start_my_app() else: print "application allready running" to make sure that only ONE instance of the applicat

Re: importing from .pyd

2008-08-29 Thread moijes12
On Jul 14, 4:11 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote: > On 14 Jul., 06:03, moijes12 <[EMAIL PROTECTED]> wrote: > > > hi > > > there is a .pyd file present in the same folder as the script abc.py > > by the name foo.pyd .I don't have foo.py .In the script abc.py I try > > > import foo > > > Er

Re: translating "create Semaphore" to Linux

2008-08-29 Thread Francesco Bochicchio
On 29 Ago, 13:28, GHUM <[EMAIL PROTECTED]> wrote: > hello, > > in my application I am using > > hSem = win32event.CreateSemaphore (None, 1, > 1,"stringincludinginterfaceandport") > rt=win32event.WaitForSingleObject (hSem, 0) > if rt != win32event.WAIT_TIMEOUT: >    really_do_start_my_app() > else:

Re: Python in a Nutshell -- Book vs Web

2008-08-29 Thread Michele Simionato
On Aug 29, 1:44 pm, [EMAIL PROTECTED] (Cameron Laird) wrote: > Insightful.  Well, I find it insightful; perhaps it's > a personal blindness on my part.  I expect programmers > to understand, for example, that two lines of code can > be a good day's production, in some circumstances My best days ar

Re: Python in a Nutshell -- Book vs Web

2008-08-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >Cameron Laird wrote: > >> No. No, to an almost libelous extent. > >No matter what you write about, there's always a certain subcategory of >potential readers who insist that collection, editing, filtering, >structuring,

Beginner's question about string's join() method

2008-08-29 Thread Macygasp
Hi, Can anybody tell me why and how this is working: >>> ','.join(str(a) for a in range(0,10)) '0,1,2,3,4,5,6,7,8,9' I find this a little weird because join takes a sequence as argument; so, it means that somehow, from the "str(a) ... " expression, a sequence can be generated. If I write this:

Re: problem with plotting

2008-08-29 Thread Anish Chapagain
On Aug 29, 12:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Aug 29, 6:01 am, Anish Chapagain <[EMAIL PROTECTED]> wrote: > > > > > > > hi, > > I'm getting problem with the code below which after displaying graph > > plotted in external window, doesnot closes itself, even after closing >

Re: translating "create Semaphore" to Linux

2008-08-29 Thread Diez B. Roggisch
GHUM wrote: > hello, > > in my application I am using > > hSem = win32event.CreateSemaphore (None, 1, > 1,"stringincludinginterfaceandport") > rt=win32event.WaitForSingleObject (hSem, 0) > if rt != win32event.WAIT_TIMEOUT: >really_do_start_my_app() > else: >print "application allready ru

translating "create Semaphore" to Linux

2008-08-29 Thread GHUM
hello, in my application I am using hSem = win32event.CreateSemaphore (None, 1, 1,"stringincludinginterfaceandport") rt=win32event.WaitForSingleObject (hSem, 0) if rt != win32event.WAIT_TIMEOUT: really_do_start_my_app() else: print "application allready running" to make sure that only ONE

Re: Iterating two arrays at once

2008-08-29 Thread Bruno Desthuilliers
mathieu a écrit : (snip solution) Thanks all ! FWIW, this has been discussed here *very* recently (a couple hours ago). Look for a thread named "iterating over two arrays in parallel?", and pay special attention to Terry Reedy's answer. -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with plotting

2008-08-29 Thread [EMAIL PROTECTED]
On Aug 29, 6:01 am, Anish Chapagain <[EMAIL PROTECTED]> wrote: > hi, > I'm getting problem with the code below which after displaying graph > plotted in external window, doesnot closes itself, even after closing > the window of plotting the main python window shows processing. > code goes like this

Re: class definition syntax

2008-08-29 Thread Bruno Desthuilliers
harryos a écrit : hi i have seen some class definitions like class MyClass(object): def __init__(self): what does the object keyword It's not a keyword. inside the braces in MyClass() mean? Answer is here: http://docs.python.org/tut/node11.html#SECTION00115000

Re: class definition syntax

2008-08-29 Thread Ken Starks
harryos wrote: hi i have seen some class definitions like class MyClass(object): def __init__(self): what does the object keyword inside the braces in MyClass() mean? Has it got any significance? thanks in advance harry It is a syntax used for 'new type' classes, not so new a

problem with plotting

2008-08-29 Thread Anish Chapagain
hi, I'm getting problem with the code below which after displaying graph plotted in external window, doesnot closes itself, even after closing the window of plotting the main python window shows processing. code goes like this... plot(col1, col2, linewidth=1.0) xlabel('col1') ylabel('col2') title(

Re: Iterating two arrays at once

2008-08-29 Thread mathieu
On Aug 29, 12:46 pm, Matthias Bläsing <[EMAIL PROTECTED] aachen.de> wrote: > Am Fri, 29 Aug 2008 03:35:51 -0700 schrieb mathieu:> > > > A = [1,2,3] > > B = [4,5,6] > > for a,b in A,B: # does not work ! > > print a,b > > > It should print: > > > 1,4 > > 2,5 > > 3,6 > > Hey, > > zip i

Re: Iterating two arrays at once

2008-08-29 Thread Bruno Desthuilliers
mathieu a écrit : Hi there, just trying to figure out how to iterate over two array without computing the len of the array: A = [1,2,3] B = [4,5,6] for a,b in A,B: # does not work ! print a,b It should print: 1,4 2,5 3,6 for a, b in zip(A, B): print a, b or, using ite

Re: help needed with dictionary

2008-08-29 Thread lee
hi, thank you, ur code was helpful :) On Aug 29, 2:18 pm, Bruno Desthuilliers wrote: > lee a écrit : > > > > > hi all, > > i am a newbie in python. i was trying to work with dictionaries. i > > wanted to input values through command line and store the values in a > > dictionary. i m

Re: Iterating two arrays at once

2008-08-29 Thread Matthias Bläsing
Am Fri, 29 Aug 2008 03:35:51 -0700 schrieb mathieu:> > A = [1,2,3] > B = [4,5,6] > for a,b in A,B: # does not work ! > print a,b > > It should print: > > 1,4 > 2,5 > 3,6 Hey, zip is your friend: for a,b in zip(A,B): print a,b does what you want. If you deal with big l

Iterating two arrays at once

2008-08-29 Thread mathieu
Hi there, just trying to figure out how to iterate over two array without computing the len of the array: A = [1,2,3] B = [4,5,6] for a,b in A,B: # does not work ! print a,b It should print: 1,4 2,5 3,6 Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: PyImport_ImportModule deadlocks

2008-08-29 Thread Gabriel Genellina
En Thu, 28 Aug 2008 11:22:50 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribi�: I have an embedded Python shell and everything works fine, however, in my stdout catcher (in C to grab tracebacks) for some reason when I do a : PyImport_ImportModule( "sys" ) It deadlocks the process, is the

Re: class definition syntax

2008-08-29 Thread Wojtek Walczak
On Fri, 29 Aug 2008 02:50:57 -0700 (PDT), harryos wrote: > class MyClass(object): > def __init__(self): > > > what does the object keyword inside the braces in MyClass() mean? > Has it got any significance? It's inheritance. MyClass class inherits from object class. Check out poin

Re: problem with execv command

2008-08-29 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi, > > I'm facing problem with the execv command: > > my command is : > os.execv(' C:\Program Files\Subversion\bin\svn ', ( 'list', ' \" > http://subversion.stv.abc.com/svn/Eng \" ' ) ) > > The error I'm getting is : > OSError: [Errno 22] Invalid argument > > > I t

Re: microsoft terminal server

2008-08-29 Thread Tim Golden
[EMAIL PROTECTED] wrote: HI, i would like to know if there is a way to create a python script for automate mstsc.exe username and pwd credential, i mean i would create a script that first open mstsc.exe and in the same time is able to fill [computer+username+pwd]. Haven't tried it, but in princ

Re: class definition syntax

2008-08-29 Thread Diez B. Roggisch
harryos wrote: > hi > i have seen some class definitions like > > class MyClass(object): > def __init__(self): > > > what does the object keyword inside the braces in MyClass() mean? > Has it got any significance? It indicates a so-called new-style-class. The new style classes h

class definition syntax

2008-08-29 Thread harryos
hi i have seen some class definitions like class MyClass(object): def __init__(self): what does the object keyword inside the braces in MyClass() mean? Has it got any significance? thanks in advance harry -- http://mail.python.org/mailman/listinfo/python-list

Re: help needed with dictionary

2008-08-29 Thread Miles
On Fri, Aug 29, 2008 at 5:02 AM, lee wrote: > i wanted to input values through command line and store the values in a > dictionary. i mean for the same key , multiple values. http://mail.python.org/pipermail/python-list/2008-August/505509.html http://mail.python.org/pipermail/python-list/2008-Aug

problem with execv command

2008-08-29 Thread dudeja . rajat
Hi, I'm facing problem with the execv command: my command is : os.execv(' C:\Program Files\Subversion\bin\svn ', ( 'list', ' \" http://subversion.stv.abc.com/svn/Eng \" ' ) ) The error I'm getting is : OSError: [Errno 22] Invalid argument I tried using a variable for http path but still I'm ge

Re: subclassing complex

2008-08-29 Thread Peter Otten
BiDi wrote: > I have been trying to subclass complex, but I am not able to get the > right-hand arithmetic operators working. > > As shown below, if an object of my subclass 'xcomplex' is added on the > right of a 'comlex' object, the type returned is 'complex', not > 'xcomplex'. > > I've tried

Re: help needed with dictionary

2008-08-29 Thread Bruno Desthuilliers
lee a écrit : hi all, i am a newbie in python. i was trying to work with dictionaries. i wanted to input values through command line and store the values in a dictionary. i mean for the same key , multiple values. can any1 suggest me how can i do it.thank you i tried this, but the o

Re: [1,2,3] exactly same as [1,2,3,] ?

2008-08-29 Thread Ken Starks
[EMAIL PROTECTED] wrote: x=[1,2,3] and x=[1,2,3,] are exactly the same, right? I'm generating some python data, and it's less error prone to not treat the last element specially, but I want to be sure I'm generating an equivalent data structure. Many TIA! Mark >>> x=[1,2,3,] >>> repr(x) [1,2

help needed with dictionary

2008-08-29 Thread lee
hi all, i am a newbie in python. i was trying to work with dictionaries. i wanted to input values through command line and store the values in a dictionary. i mean for the same key , multiple values. can any1 suggest me how can i do it.thank you i tried this, but the old value is repl

Re: subclassing complex

2008-08-29 Thread Patrick Maupin
On Aug 29, 12:17 am, BiDi <[EMAIL PROTECTED]> wrote: > I have been trying to subclass complex, but I am not able to get the > right-hand arithmetic operators working. > > As shown below, if an object of my subclass 'xcomplex' is added on the > right of a 'comlex' object, the type returned is 'compl

Re: Python svn bindings for Subversion?

2008-08-29 Thread Mike B
On Thu, 28 Aug 2008 19:58:10 GMT, Matthew Woodcraft <[EMAIL PROTECTED]> wrote: >Mike B writes: >> I'm trying to get Subversion 'hook scripts' working on an Ubuntu box and the >> following fails. >> >> from svn import fs, repos, core, delta >[...] >> 'svn' appears to be a SWIG wrapper and could be

microsoft terminal server

2008-08-29 Thread yqyq22
HI, i would like to know if there is a way to create a python script for automate mstsc.exe username and pwd credential, i mean i would create a script that first open mstsc.exe and in the same time is able to fill [computer+username+pwd]. Regards thanks a lot in advance -- http://mail.python.org/m

os.ChDir() not thread-safe; was : Is tempfile.mkdtemp() thread-safe?

2008-08-29 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello, I'm using tempfile.mkdtemp() in a multithreading program and I've been having problems with it. Sometimes it tells me the file I'm trying to access (in the directory created with tempfile.mkdtemp()) doesn't exist. I suspect that tempfile.mkdtemp() returns the sa

Re: Checking if the file is a symlink fails

2008-08-29 Thread [EMAIL PROTECTED]
On Aug 28, 10:20 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Do you mean the following is deprecated ? > >http://docs.python.org/lib/module-stat.html > > >>From the documentation - > > > S_ISLNK( mode) > >     Return non-zero if the mode is from a symbolic link. > >

Re: Syntax error in ".py" file and globals variable values not available.

2008-08-29 Thread Alexis Boutillier
Timothy Grant a écrit : On Thu, Aug 28, 2008 at 1:40 AM, Alexis Boutillier <[EMAIL PROTECTED]> wrote: Timothy Grant a écrit : On Wed, Aug 27, 2008 at 2:49 AM, Alexis Boutillier <[EMAIL PROTECTED]> wrote: Hi, I have a strange behaviour of python with pdb and import statement. Here is the examp

PyDoc in Vista

2008-08-29 Thread Tyler Shopshire
I can't seem to get Pydoc up and running in windows Vista. I can search for modules manually by using the "pydoc module_name" command but if i try to set up an http server, it says the server is up and running but I can't access it in FF or IE. Any help is appreciated. -- http://mail.python.org/

PyDoc in Windows Vista

2008-08-29 Thread Tyler Shopshire
I can't seem to access the pydoc sever from my web browser. I start the server from the command prompt and everything seems to be working fine, then I got to http://localhost:/ and it doesn't work. I also tried starting the graphical mode with the -g parameter but I still cannot use PyDoc.

Re: Fastest way to write huge files

2008-08-29 Thread Tim Golden
Terry Reedy wrote: Mohamed Yousef wrote: let's say , I'm moving large files through network between devices what is the fastest way to do this ? what i came up with :- Use your OS's network copy command. On unix, that was once uucp. On Windows, I drag-and-drop to/from a Network Neighborho

u just click, u get some dollars

2008-08-29 Thread pavi
http://www.onlineincomess.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: computer support

2008-08-29 Thread andrew
On 2008-08-29, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hello every body in the group Hello Dr Nick :-) -- http://www.andrews-corner.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with list.insert

2008-08-29 Thread SUBHABRATA
Dear group, Thanx for your idea to use dictionary instead of a list. Your code is more or less, OK, some problems are there, I'll debug them. Well, I feel the insert problem is coming because of the Hindi thing. And Python2.5 is supporting Hindi quite fluently. I am writing in Python2.5.1. Best Reg

<    1   2