Re: CTypes, 64 bit windows, 32 bit dll

2008-03-31 Thread Tim Roberts
rdahlstrom <[EMAIL PROTECTED]> wrote: >On Mar 31, 12:53 pm, "mimi.vx" <[EMAIL PROTECTED]> wrote: >> On Mar 31, 4:22 pm, rdahlstrom <[EMAIL PROTECTED]> wrote: >> >> > So I have a 64 bit Windows 2003 system, running python 2.5.1.1. >> >> > I can import a Windows .dll (msvcrt or whatever) using ctypes

Re: Rubik's cube translation

2008-03-31 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >What if this is connected: > D >array([[1, 2, 3], > [4, 5, 6], > [6, 7, 8]]) E >array([[6, 7, 8], > [0, 0, 0], > [0, 0, 0]]) > >--> > D >array([[1, 2, 3], > [4, 5, 6], > [6, 7, 8]]) E >array([[6, 7, 8], > [0,

Re: Why prefer != over <> for Python 3.0?

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 16:17:39 -0300, Terry Reedy <[EMAIL PROTECTED]> escribió: > "Bjoern Schliessmann" <[EMAIL PROTECTED]> > wrote > in message news:[EMAIL PROTECTED] > | > However, I'm quite sure that when Unicode has arrived almost > | > everywhere, some languages will start considering such c

Re: Looking for indent advice howto in emacs python-mode

2008-03-31 Thread Carl Banks
On Mar 31, 12:32 pm, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > Here's what I want to do: > > if ( ( v == 1 ) >or ( v == 2 ) >or ( v == 3 ) ): > pass > > but emacs (left to its own devices, does this. > > if ( ( v == 1 ) > or ( v == 2 ) > or ( v == 3 ) ): > pass > >

Re: standard input, for s in f, and buffering

2008-03-31 Thread Paddy
On Mar 31, 11:47 pm, Jorgen Grahn <[EMAIL PROTECTED]> wrote: > On 31 Mar 2008 06:54:29 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> > wrote: > > > > > On Sun, 30 Mar 2008 21:02:44 +, Jorgen Grahn wrote: > > >> I realize this has to do with the extra read-ahead buffering documented for > >

Re: Stuck in a loop

2008-03-31 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I wrote a simple algorithm and it keeps getting stuck in a loop. I | guess I'm just to tired to figure it out: The easiest way to figure out somethinglike this is to print your variables from inside the loop to see things stick, or if

Re: python persistence

2008-03-31 Thread Gabriel Genellina
En Tue, 01 Apr 2008 00:48:35 -0300, <[EMAIL PROTECTED]> escribió: > We do have, but on Windows, file is not locked to multi-tasking, > shelve. But why don't we have types in there, or non-string > primitives in keys? > c= shelve.open( 'temp', 'c' ) c['0']= 'a' c.sync() del c >

Re: Looking for indent advice howto in emacs python-mode

2008-03-31 Thread 7stud
On Mar 31, 10:32 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > Here's what I want to do: > > if ( ( v == 1 ) >    or ( v == 2 ) >    or ( v == 3 ) ): >      pass > python indenting = 4 spaces -- http://mail.python.org/mailman/listinfo/python-list

Re: deleting a line from a file

2008-03-31 Thread Paddy
On Mar 31, 7:10 pm, Mark Wooding <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: > > You could do it "in place" in all those systems afaik, either opening > > the file for both reading and writing, or using something like mmap. > > Basically you'd leave the file unchanged up to line N, then copy li

Re: Command line input

2008-03-31 Thread Paul Scott
On Mon, 2008-03-31 at 12:39 -0700, [EMAIL PROTECTED] wrote: > How do I receive input from the command line in Python? I have used: sys.argv[ 1 ] I have been doing Python for around 2 days now, so please do double check that! --Paul All Email originating from UWC is covered by disclaimer http

Re: python persistence

2008-03-31 Thread castironpi
On Mar 31, 7:14 pm, 7stud <[EMAIL PROTECTED]> wrote: > On Mar 31, 5:31 pm, [EMAIL PROTECTED] wrote: > > > Can you have a Python object stored entirely on disk? > > import cPickle as cp > > class Dog(object): >     def __init__(self, name): >         self.name = name > > d = Dog("Spot") > > f = open

Re: Using QSystemTrayIcon with PyQt

2008-03-31 Thread Alex Teiche
On Mar 31, 7:53 pm, Benjamin <[EMAIL PROTECTED]> wrote: > On Mar 31, 8:41 pm, Alex Teiche <[EMAIL PROTECTED]> wrote: > > > > > On Mar 31, 6:40 pm, Alex Teiche <[EMAIL PROTECTED]> wrote: > > > > On Mar 31, 11:49 am, Alex Teiche <[EMAIL PROTECTED]> wrote: > > > > > On Mar 30, 3:50 pm, Benjamin <[EMAI

Re: python persistence

2008-03-31 Thread castironpi
On Mar 31, 10:28 pm, [EMAIL PROTECTED] wrote: > On Mar 31, 9:27 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > > > On Mar 31, 8:51 pm, [EMAIL PROTECTED] wrote: > > > On Mar 31, 7:14 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > > On Mar 31, 5:31 pm, [EMAIL PROTECTED] wrote: > > > > > > Can y

Re: python persistence

2008-03-31 Thread castironpi
On Mar 31, 9:27 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Mar 31, 8:51 pm, [EMAIL PROTECTED] wrote: > > On Mar 31, 7:14 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > On Mar 31, 5:31 pm, [EMAIL PROTECTED] wrote: > > > > > Can you have a Python object stored entirely on disk? > > > > import cP

Re: socket error when loading the shell?

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 23:28:13 -0300, <[EMAIL PROTECTED]> escribió: > tried wi5th the normal IDLE too and it worked later after i posted > this but now it doesnt work again. and i havent chnaged my firewall in > between. Perhaps any other running process has opened the port that IDLE uses to comm

Re: Using QSystemTrayIcon with PyQt

2008-03-31 Thread Benjamin
On Mar 31, 8:41 pm, Alex Teiche <[EMAIL PROTECTED]> wrote: > On Mar 31, 6:40 pm, Alex Teiche <[EMAIL PROTECTED]> wrote: > > > > > On Mar 31, 11:49 am, Alex Teiche <[EMAIL PROTECTED]> wrote: > > > > On Mar 30, 3:50 pm, Benjamin <[EMAIL PROTECTED]> wrote: > > > > > On Mar 29, 11:02 pm, Alex Teiche <[

Re: class super method

2008-03-31 Thread Ed Leafe
On Mar 31, 2008, at 5:58 PM, George Sakkis wrote: >> is there any tutorial for super method (when/how to use it)? >> >> or maybe someone could explain me how it works? >> >> thx > > Super is one of the dark corners of the language [1,2]... a good rule > of thumb is to stay away from it, or at leas

Re: What motivates all unpaid volunteers at Pycon?

2008-03-31 Thread Aahz
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >I was impressed and humbled by all the unpaid volunteers at Pycon. What about the unpaid volunteers who weren't at PyCon? ;-) >I was wondering what motivated so many people to give so much to the >Python community.

Re: Python and Db

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 17:50:42 -0300, David Anderson <[EMAIL PROTECTED]> escribió: > I would like to use sqlite, But I also wanted a tutorial with the basis > of > the sql and etc, I never dealed with dbs before Then any database tutorial covering SQL will do. Of course there are differences

Re: socket error when loading the shell?

2008-03-31 Thread vokinloksar
i mean vpython(www.vpython.org). tried wi5th the normal IDLE too and it worked later after i posted this but now it doesnt work again. and i havent chnaged my firewall in between. python.exe works but i want the idle not the dos-interpreter. -- http://mail.python.org/mailman/listinfo/python-li

Re: python persistence

2008-03-31 Thread George Sakkis
On Mar 31, 8:51 pm, [EMAIL PROTECTED] wrote: > On Mar 31, 7:14 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > > On Mar 31, 5:31 pm, [EMAIL PROTECTED] wrote: > > > > Can you have a Python object stored entirely on disk? > > > import cPickle as cp > > > class Dog(object): > > def __init__(self, nam

Re: Looking for indent advice howto in emacs python-mode

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 16:36:13 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On 31 mar, 18:32, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: >> Here's what I want to do: >> >> if ( ( v == 1 ) >>or ( v == 2 ) >>or ( v == 3 ) ): >> pass > > Why the parens ? > > if a == 1 \ >

Re: Question about overloading of binary operators

2008-03-31 Thread Dan Bishop
On Mar 31, 5:03 pm, gigs <[EMAIL PROTECTED]> wrote: > Raj Bandyopadhyay wrote: > > Hi > > > Here's a simple class example I've defined > > > # > > class myInt(int): > >def __add__(self,other): > > return 0 > > > print 5 + myInt(4) #prints 9 > > print myInt(4)

Re: Stuck in a loop

2008-03-31 Thread Dan Bishop
On Mar 31, 8:22 pm, [EMAIL PROTECTED] wrote: > I wrote a simple algorithm and it keeps getting stuck in a loop. I > guess I'm just to tired to figure it out: > > compcount=[5,4,2,2] > suitrank=[0,0,0,0] > > trump=2 > l,lt=0,0 > while l<4: > while lt<4: > if l==trump: > l+=1

Re: Using QSystemTrayIcon with PyQt

2008-03-31 Thread Alex Teiche
On Mar 31, 6:40 pm, Alex Teiche <[EMAIL PROTECTED]> wrote: > On Mar 31, 11:49 am, Alex Teiche <[EMAIL PROTECTED]> wrote: > > > > > On Mar 30, 3:50 pm, Benjamin <[EMAIL PROTECTED]> wrote: > > > > On Mar 29, 11:02 pm, Alex Teiche <[EMAIL PROTECTED]> wrote:> Hello, > > > > > I am pretty new to Python,

Re: Using QSystemTrayIcon with PyQt

2008-03-31 Thread Alex Teiche
On Mar 31, 11:49 am, Alex Teiche <[EMAIL PROTECTED]> wrote: > On Mar 30, 3:50 pm, Benjamin <[EMAIL PROTECTED]> wrote: > > > > > On Mar 29, 11:02 pm, Alex Teiche <[EMAIL PROTECTED]> wrote:> Hello, > > > > I am pretty new to Python, and have never learned C++. I am trying to > > > implement the foll

Stuck in a loop

2008-03-31 Thread hexusnexus
I wrote a simple algorithm and it keeps getting stuck in a loop. I guess I'm just to tired to figure it out: compcount=[5,4,2,2] suitrank=[0,0,0,0] trump=2 l,lt=0,0 while l<4: while lt<4: if l==trump: l+=1 if l>3: break if lt==trump:

Re: Command line input

2008-03-31 Thread hexusnexus
On Mar 31, 4:04 pm, Rick Dooling <[EMAIL PROTECTED]> wrote: > On Mar 31, 2:39 pm, [EMAIL PROTECTED] wrote: > > > How do I receive input from the command line in Python? > > As long as we are all guessing, do you perhaps mean raw_input? > > my_name = raw_input("What is your name? ") > What is your n

Re: python persistence

2008-03-31 Thread castironpi
On Mar 31, 7:14 pm, 7stud <[EMAIL PROTECTED]> wrote: > On Mar 31, 5:31 pm, [EMAIL PROTECTED] wrote: > > > Can you have a Python object stored entirely on disk? > > import cPickle as cp > > class Dog(object): >     def __init__(self, name): >         self.name = name > > d = Dog("Spot") > > f = open

Re: python scripts to standalone executable

2008-03-31 Thread Mike Driscoll
On Mar 31, 4:53 pm, Amit Gupta <[EMAIL PROTECTED]> wrote: > On Mar 31, 1:52 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > What about creating a setup.py and using the distutils command to > > build rpms or tarballs? > > >http://docs.python.org/dist/built-dist.html > > > Mike > > My quick l

RE: Automatically fill in forms on line

2008-03-31 Thread Ryan Ginstrom
> On Behalf Of Jackie Wang > I want to automatically complete the following task: > > 1. Go to http://www.ffiec.gov/Geocode/default.aspx; ... > > Can Python realize these steps? Can these steps be done > witout openning and IE windows? Especially, I dont know how > to write code for step 2, 4 a

Re: python persistence

2008-03-31 Thread 7stud
On Mar 31, 5:31 pm, [EMAIL PROTECTED] wrote: > Can you have a Python object stored entirely on disk? import cPickle as cp class Dog(object): def __init__(self, name): self.name = name d = Dog("Spot") f = open("data.txt", "w") cp.dump(d, f) f.close() f = open("data.txt") stored_obj

Re: PyQt - How to prevent a dialog being resized?

2008-03-31 Thread hdante
On Mar 31, 7:12 pm, Kelie <[EMAIL PROTECTED]> wrote: > Hello, > > My question is as subject. I tried something like this and it doesn't > work. > > def resizeEvent(self, event): > self.size = event.oldSize() > > Any hint? > > Thank you. You should preset size hints: http://doc.trolltech.com/

python persistence

2008-03-31 Thread castironpi
Can you have a Python object stored entirely on disk? -- http://mail.python.org/mailman/listinfo/python-list

Re: class super method

2008-03-31 Thread castironpi
On Mar 31, 5:58 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Mar 31, 6:25 pm, gigs <[EMAIL PROTECTED]> wrote: > > > is there any tutorial for super method (when/how to use it)? > > > or maybe someone could explain me how it works? > > > thx > > Super is one of the dark corners of the language

RE: troll poll

2008-03-31 Thread Delaney, Timothy (Tim)
George Sakkis wrote: > On Mar 31, 1:46 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >>> More specifically, who can create a bigger mess on c.l.py? (check >>> one) >> >>> [ ] - Xah Lee >>> [X] - castironpi >> >> Xah Lee's postings might be trolls but sometimes they spark some >> re

Re: Command line input

2008-03-31 Thread Rick Dooling
On Mar 31, 2:39 pm, [EMAIL PROTECTED] wrote: > How do I receive input from the command line in Python? As long as we are all guessing, do you perhaps mean raw_input? my_name = raw_input("What is your name? ") What is your name? Rick >>> my_name 'Rick' -- http://mail.python.org/mailman/listinfo

Re: class super method

2008-03-31 Thread George Sakkis
On Mar 31, 6:25 pm, gigs <[EMAIL PROTECTED]> wrote: > is there any tutorial for super method (when/how to use it)? > > or maybe someone could explain me how it works? > > thx Super is one of the dark corners of the language [1,2]... a good rule of thumb is to stay away from it, or at least stick t

Re: Command line input

2008-03-31 Thread Jorgen Grahn
On 31 Mar 2008 20:13:05 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 31 Mar 2008 12:39:54 -0700, hexusnexus wrote: > >> How do I receive input from the command line in Python? > > Direct way `sys.argv`, comfortable way `optparse`. I have a feeling he doesn't mean command-line

Re: standard input, for s in f, and buffering

2008-03-31 Thread Jorgen Grahn
On 31 Mar 2008 06:54:29 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sun, 30 Mar 2008 21:02:44 +, Jorgen Grahn wrote: > >> I realize this has to do with the extra read-ahead buffering documented for >> file.next() and that I can work around it by using file.readline() >> instea

class super method

2008-03-31 Thread gigs
is there any tutorial for super method (when/how to use it)? or maybe someone could explain me how it works? thx -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with mod_python/3.3.1 and apache

2008-03-31 Thread Graham Dumpleton
On Apr 1, 8:03 am, NccWarp9 <[EMAIL PROTECTED]> wrote: > Hello, > > im using Apache HTTPD 2.2.8 with mod_python/3.3.1 Python/2.4.3 on > Windows and having truble starting pythone, any help would be > appreciated > . > Im getting this error: > > [Mon Mar 31 23:53:03 2008] [error] make_obcallback: co

PyQt - How to prevent a dialog being resized?

2008-03-31 Thread Kelie
Hello, My question is as subject. I tried something like this and it doesn't work. def resizeEvent(self, event): self.size = event.oldSize() Any hint? Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about overloading of binary operators

2008-03-31 Thread gigs
Raj Bandyopadhyay wrote: > Hi > > Here's a simple class example I've defined > > # > class myInt(int): >def __add__(self,other): > return 0 > > print 5 + myInt(4) #prints 9 > print myInt(4) + 5 #prints 0 > # > > The Python bi

Re: why does socket.makefile require non-blocking mode?

2008-03-31 Thread Forest
Bryan Olson wrote: >Looking at the code for the existing _fileobject's read method, it >will loose data it has already read if a socket.recv() call raises >an exception. The function keeps buffers in a local variable that >will be lost if an exception exits the scope. That much could be >fixed wit

Problem with mod_python/3.3.1 and apache

2008-03-31 Thread NccWarp9
Hello, im using Apache HTTPD 2.2.8 with mod_python/3.3.1 Python/2.4.3 on Windows and having truble starting pythone, any help would be appreciated . Im getting this error: [Mon Mar 31 23:53:03 2008] [error] make_obcallback: could not import mod_python.apache.\n 'import site' failed; use -v for tr

Re: PyQT / QDate / QTableWidget

2008-03-31 Thread wrightee
That worked! Thank you; I had given up on QDate but changing the format worked perfectly. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good time to start learning python?

2008-03-31 Thread Ant
On Mar 31, 5:40 pm, Rui Maciel <[EMAIL PROTECTED]> wrote: ... > So far the decision seems to be a no brainer. Yet, Python 3000 will arrive > in a few months. As it isn't backwards compatible with today's Python, > there is the risk that no matter what I learn until then, I will end up > having to r

Re: python scripts to standalone executable

2008-03-31 Thread Amit Gupta
On Mar 31, 1:52 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > What about creating a setup.py and using the distutils command to > build rpms or tarballs? > > http://docs.python.org/dist/built-dist.html > > Mike My quick look: The link you sent is under the header "Distributing Python Modules".

Re: CTypes, 64 bit windows, 32 bit dll

2008-03-31 Thread Martin v. Löwis
> Crap, no way to make a 32 bit load, even using the wowexec? With WoW64, you can run 32-bit processes on a 64-bit system (as you do all the time). That's all it does. You cannot load a 64-bit DLL into a 32-bit application, or vice versa. If you want to load a 32-bit DLL on Win64, use the 32-bit

Question about overloading of binary operators

2008-03-31 Thread Raj Bandyopadhyay
Hi Here's a simple class example I've defined # class myInt(int): def __add__(self,other): return 0 print 5 + myInt(4) #prints 9 print myInt(4) + 5 #prints 0 # The Python binary operation function (binary_op1() in Objects/a

Re: import multiple modules with same name

2008-03-31 Thread Gary Herron
Christian Bird wrote: > Is it possible to import multiple modules with the same name from > different locations? I'm using two different pieces of software, both > of which have a module named util.py. I know that I can modify > sys.path to fix which util gets imported when I do: > > import util

Re: Python and Db

2008-03-31 Thread David Anderson
It's DB = DataBase, I typed wrong on the text, but right at the subject =) On Mon, Mar 31, 2008 at 5:50 PM, David Anderson <[EMAIL PROTECTED]> wrote: > I would like to use sqlite, But I also wanted a tutorial with the basis of > the sql and etc, I never dealed with dbs before > > > On Mon, Mar 31

Re: License of Python

2008-03-31 Thread roee shlomo
On 30/03/2008, iu2 <[EMAIL PROTECTED]> wrote: > > The problem is that including Python's license in the binary, which as > I understand is a must do I think you only need to include the PSF license if you modify python itself. from http://www.python.org/psf/license/: > There is no GPL-like "cop

Re: python scripts to standalone executable

2008-03-31 Thread Mike Driscoll
On Mar 31, 12:24 pm, Amit Gupta <[EMAIL PROTECTED]> wrote: > Hi > > I am looking for a some tool that can convert python scripts to > executable on Linux. > > I found freeeze.py as the only option so far. Couple of queries on > freeze: > > 1. Have anyone used the freeze utility and any experiences

import multiple modules with same name

2008-03-31 Thread Christian Bird
Is it possible to import multiple modules with the same name from different locations? I'm using two different pieces of software, both of which have a module named util.py. I know that I can modify sys.path to fix which util gets imported when I do: import util I'd like to be able to do someth

Re: Python and Db

2008-03-31 Thread David Anderson
I would like to use sqlite, But I also wanted a tutorial with the basis of the sql and etc, I never dealed with dbs before On Mon, Mar 31, 2008 at 3:42 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Mon, 31 Mar 2008 14:50:27 -0300, David Anderson <[EMAIL PROTECTED]> > escribió: > > > Hi! I

Re: Newbie Question - Overloading ==

2008-03-31 Thread xkenneth
On Mar 31, 3:42 pm, Amit Gupta <[EMAIL PROTECTED]> wrote: > On Mar 31, 11:00 am, xkenneth <[EMAIL PROTECTED]> wrote: > > > Yeah, this is what I'm talking about: > > > > def __eq__(self, other) : > > >   try : > > >      return <> > > >   except AttributeError: > > >      return False > > > That see

Re: Newbie Question - Overloading ==

2008-03-31 Thread Amit Gupta
On Mar 31, 11:00 am, xkenneth <[EMAIL PROTECTED]> wrote: > Yeah, this is what I'm talking about: > > > def __eq__(self, other) : > > try : > > return <> > > except AttributeError: > > return False > > That seems a bit nasty to me. One thing about python (IMO); you can't just say this

Re: Problem with method overriding from base class

2008-03-31 Thread [EMAIL PROTECTED]
On 31 mar, 11:05, <[EMAIL PROTECTED]> wrote: > Hello everyone > > I have defined some sort of 'interface class' and a factory function that > creates instance objects of specific classes, which implement that interface: > > Interface definition: > **

Re: python scripts to standalone executable

2008-03-31 Thread Amit Gupta
On Mar 31, 11:45 am, John Henry <[EMAIL PROTECTED]> wrote: > Not sure. I use it on windows. > > > I haven't looked at pyinstall.. Is it for linux? > > It appears so - according tohttp://www.pyinstaller.org/ Thanks! It does show support for Linux. The documentation says it works for python until

Re: Command line input

2008-03-31 Thread Marc 'BlackJack' Rintsch
On Mon, 31 Mar 2008 12:39:54 -0700, hexusnexus wrote: > How do I receive input from the command line in Python? Direct way `sys.argv`, comfortable way `optparse`. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good time to start learning python?

2008-03-31 Thread Terry Reedy
"Rui Maciel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Recently I woke up inclined to take up the task of learning another | programming language. I've already dipped my toes in Perl (I've read online | tutorials and wrote a couple of irrelevant pet projects) but, as the | co

Command line input

2008-03-31 Thread hexusnexus
How do I receive input from the command line in Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a python c-module: passing double arrays to c functions. segmentation fault. swig

2008-03-31 Thread sturlamolden
On 31 Mar, 20:52, kim <[EMAIL PROTECTED]> wrote: > array_pointer_t = ndpointer(dtype=c_double) This one is wrong. The dtype should be the datatype kept in the array, which is 'float' (Python doubles) or 'numpy.float64'. array_pointer_t = ndpointer(dtype=numpy.float64) I'd take a good look at t

Re: Looking for indent advice howto in emacs python-mode

2008-03-31 Thread [EMAIL PROTECTED]
On 31 mar, 18:32, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > Here's what I want to do: > > if ( ( v == 1 ) >or ( v == 2 ) >or ( v == 3 ) ): > pass Why the parens ? if a == 1 \ or b == 2 \ or c == 3: pass -- http://mail.python.org/mailman/listinfo/python-list

Re: License of Python

2008-03-31 Thread Roger Miller
Is there any legal problem with including licenses for languages you don't use? (But I agree with the other posters that any competitor worthy of concern will figure it out in short order if they care.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie Question - Overloading ==

2008-03-31 Thread [EMAIL PROTECTED]
On 31 mar, 20:09, Duncan Booth <[EMAIL PROTECTED]> wrote: > xkenneth <[EMAIL PROTECTED]> wrote: > > Now obviously, if I test an instance of either class equal to each > > other, an attribute error will be thrown, how do I handle this? I > > could rewrite every __eq__ function and catch attribute er

Re: Beginner advice

2008-03-31 Thread Gary Herron
Paul Scott wrote: > I have been tasked to come up with an audio recorder desktop (cross > platform if possible - but linux only is OK) that: > > 1. records a lecture as an MP3 file (pymedia?) > 2. Provides a login form for server credentials > 3. Uploads via XMLRPC (pyxmlrpclib) to the server as a

Re: Why prefer != over <> for Python 3.0?

2008-03-31 Thread Terry Reedy
"Bjoern Schliessmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | > However, I'm quite sure that when Unicode has arrived almost | > everywhere, some languages will start considering such characters | > in their core syntax. | | This should be the time when there are widespread

Re: troll poll

2008-03-31 Thread George Sakkis
On Mar 31, 1:46 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > More specifically, who can create a bigger mess on c.l.py? (check one) > > > [ ] - Xah Lee > > [X] - castironpi > > Xah Lee's postings might be trolls but sometimes they spark some really > interesting and serious subthrea

Re: [OT] troll poll

2008-03-31 Thread Gary Herron
Duncan Booth wrote: > Paul Rubin wrote: > > >> "Daniel Fetchinson" <[EMAIL PROTECTED]> writes: >> >>> [ ] - Xah Lee >>> [ ] - castironpi >>> >> I've lost track but has it been established that they are not the same >> person? >> >> > Has it actually

Elementtree to parse xml

2008-03-31 Thread Doran, Harold
I received some help on list with sample code on how to parse through an xml file using element tree. I now have this working using toy examples nicely. However, when I work to apply this to my actual xml file, I am hitting a roadblock. Is anyone on the list able to look at an xml file that I can

Re: why does socket.makefile require non-blocking mode?

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 14:15:56 -0300, Forest <[EMAIL PROTECTED]> escribió: > My main concern is this: A brief look at the existing socket._fileobject > shows that its read() method calls recv() in a loop, appending to a > temporary buffer on each pass, and finally returning the buffer when > recv()

Re: troll poll

2008-03-31 Thread Grant Edwards
On 2008-03-31, Carl Banks <[EMAIL PROTECTED]> wrote: > On Mar 31, 1:41 pm, Paul Rubin wrote: >> "Daniel Fetchinson" <[EMAIL PROTECTED]> writes: >> > [ ] - Xah Lee >> > [ ] - castironpi >> >> I've lost track but has it been established that they are not the same >> perso

xlrd and cPickle.dump

2008-03-31 Thread patrick . waldo
Hi all, I have to work with a very large excel file and I have two questions. First, the documentation says that cPickle.dump would be the best way to work with it. However, I keep getting: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework \script

xlrd and cPickle.dump/rows to list

2008-03-31 Thread patrick . waldo
Hi all, I have to work with a very large excel file and I have two questions. First, the documentation says that cPickle.dump would be the best way to work with it. However, I keep getting: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework \script

Re: Creating a python c-module: passing double arrays to c functions. segmentation fault. swig

2008-03-31 Thread kim
thanks a lot, sturlamolden, for the quick reply! so i tried to use numpy and ctypes as you advised and i got it working: with some little changes for my linux machine - i hope they aren't the cause of the results: to load it, i only got it going with LoadLibrary: lib = numpy.ctypeslib.load_librar

Re: Using QSystemTrayIcon with PyQt

2008-03-31 Thread Alex Teiche
On Mar 30, 3:50 pm, Benjamin <[EMAIL PROTECTED]> wrote: > On Mar 29, 11:02 pm, Alex Teiche <[EMAIL PROTECTED]> wrote:> Hello, > > > I am pretty new to Python, and have never learned C++. I am trying to > > implement the following thing into my python application: > > >http://doc.trolltech.com/4.3/

Re: python scripts to standalone executable

2008-03-31 Thread John Henry
On Mar 31, 10:38 am, Amit Gupta <[EMAIL PROTECTED]> wrote: > On Mar 31, 10:37 am, John Henry <[EMAIL PROTECTED]> wrote: > > > > > On Mar 31, 10:24 am, Amit Gupta <[EMAIL PROTECTED]> wrote: > > > > Hi > > > > I am looking for a some tool that can convert python scripts to > > > executable on Linux.

Re: Python and Db

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 14:50:27 -0300, David Anderson <[EMAIL PROTECTED]> escribió: > Hi! I'm don't know almost nothing about bds, Can You suggest me an Simple > but efficient Bd to work with python apps? Can You suggest me any > tutorials? See the Python wiki at: http://wiki.python.org/moin/Dat

Re: Is this a good time to start learning python?

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 13:40:40 -0300, Rui Maciel <[EMAIL PROTECTED]> escribió: > Recently I woke up inclined to take up the task of learning another > programming language. I've already dipped my toes in Perl (I've read > online > tutorials and wrote a couple of irrelevant pet projects) but, as

Re: Of qooxdoo, qwt, and Python

2008-03-31 Thread John Henry
olive wrote: > On 31 mar, 18:05, John Henry <[EMAIL PROTECTED]> wrote: > > I was searching for a way to redevelop a desktop Pythoncard based > > program into a web-application. I understand what need to be done for > > all of the non-GUI code. For the GUI capabilities, I stumbled across > > a p

Re: Newbie Question - Overloading ==

2008-03-31 Thread Carl Banks
On Mar 31, 1:23 pm, xkenneth <[EMAIL PROTECTED]> wrote: > So i generally write quite a few classes, and in most I need to > overload the == operator. > > If i have two classes, like below: > > Class A: > attribute a > attribute b > > Class B: > attribute a > attribute c > > So if I've overloaded th

Re: deleting a line from a file

2008-03-31 Thread Mark Wooding
Paul Rubin wrote: > You could do it "in place" in all those systems afaik, either opening > the file for both reading and writing, or using something like mmap. > Basically you'd leave the file unchanged up to line N, then copy lines > downward starting from line N+1. At the end you'd use ftrunc

Re: [OT] troll poll

2008-03-31 Thread Duncan Booth
Paul Rubin wrote: > "Daniel Fetchinson" <[EMAIL PROTECTED]> writes: >> [ ] - Xah Lee >> [ ] - castironpi > > I've lost track but has it been established that they are not the same > person? > Has it actually been established that castironpi is actually a person? I t

Re: counting using variable length string as base

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 09:30:00 -0300, Graeme Glass <[EMAIL PROTECTED]> escribió: > On Mar 27, 11:01 am, Peter Otten <[EMAIL PROTECTED]> wrote: >> a b c aa ab ac ba bb bc ca cb cc aaa aab aac aba abb abc aca acb acc >> baa bab >> bac bba bbb bbc bca bcb bcc > > Here is a cool solution we came up

Re: CTypes, 64 bit windows, 32 bit dll

2008-03-31 Thread rdahlstrom
On Mar 31, 12:53 pm, "mimi.vx" <[EMAIL PROTECTED]> wrote: > On Mar 31, 4:22 pm, rdahlstrom <[EMAIL PROTECTED]> wrote: > > > > > So I have a 64 bit Windows 2003 system, running python 2.5.1.1. > > > I can import a Windows .dll (msvcrt or whatever) using ctypes, but > > when attempting to import anot

Re: Newbie Question - Overloading ==

2008-03-31 Thread Duncan Booth
xkenneth <[EMAIL PROTECTED]> wrote: > Now obviously, if I test an instance of either class equal to each > other, an attribute error will be thrown, how do I handle this? I > could rewrite every __eq__ function and catch attribute errors, but > that's tedious, and seemingly unpythonic. Also, I don

RE: Is this a good time to start learning python?

2008-03-31 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Rui Maciel > Sent: Monday, March 31, 2008 12:41 PM > To: python-list@python.org > Subject: Is this a good time to start learning python? > > Recently I woke up inclined to take up the task of l

Re: distutils as an application installer?

2008-03-31 Thread Gabriel Genellina
En Mon, 31 Mar 2008 08:32:15 -0300, PurpleServerMonkey <[EMAIL PROTECTED]> escribió: > Was hoping someone could take a quick look at my distutils problem and > give it a quick sanity check. > > Basically I have a server application (for Linux) that I want to > install to /usr/local/, this locati

Re: why does socket.makefile require non-blocking mode?

2008-03-31 Thread Forest
On Sat, 29 Mar 2008 08:18:23 -0300, Guilherme Polo wrote: >I don't know why you think timeout is forbidden too, it is not. I can't tell for sure whether it is or isn't, because of this language in the socket module docs: "s.settimeout(0.0) is equivalent to s.setblocking(0); s.settimeout(None) is

Re: Newbie Question - Overloading ==

2008-03-31 Thread xkenneth
Yeah, this is what I'm talking about: > def __eq__(self, other) : >   try : >      return <> >   except AttributeError: >      return False That seems a bit nasty to me. -- http://mail.python.org/mailman/listinfo/python-list

Re: troll poll

2008-03-31 Thread Carl Banks
On Mar 31, 1:41 pm, Paul Rubin wrote: > "Daniel Fetchinson" <[EMAIL PROTECTED]> writes: > > [ ] - Xah Lee > > [ ] - castironpi > > I've lost track but has it been established that they are not the same > person? Has it been established that castironpi is a person at al

Re: Of qooxdoo, qwt, and Python

2008-03-31 Thread olive
On 31 mar, 18:05, John Henry <[EMAIL PROTECTED]> wrote: > I was searching for a way to redevelop a desktop Pythoncard based > program into a web-application. I understand what need to be done for > all of the non-GUI code. For the GUI capabilities, I stumbled across > a package call qooxdoo (http

Python and Db

2008-03-31 Thread David Anderson
Hi! I'm don't know almost nothing about bds, Can You suggest me an Simple but efficient Bd to work with python apps? Can You suggest me any tutorials? Thanx -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] troll poll

2008-03-31 Thread Marc 'BlackJack' Rintsch
On Mon, 31 Mar 2008 10:04:31 -0700, Daniel Fetchinson wrote: > [Heavily off-topic fun stuff] > > This is a quick poll to have scientific data on our beloved troll community: > > Whose trolling behaviour is more professional? (check one) > > [X] - Xah Lee > [ ] - castironpi He dedicates some ti

How to build a body like this use SOAPPy?

2008-03-31 Thread qgg
repeat arrWords aa 11 bb 22 99 I try like this,but fail: WordsRequest(arrWords=[{'Name:u'aa','Num':u'11'}, {'Name:u'bb','Num':u'22'}],intActionId=99) W

Re: [OT] troll poll

2008-03-31 Thread Paul Rubin
"Daniel Fetchinson" <[EMAIL PROTECTED]> writes: > [ ] - Xah Lee > [ ] - castironpi I've lost track but has it been established that they are not the same person? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie Question - Overloading ==

2008-03-31 Thread Jean-Paul Calderone
On Mon, 31 Mar 2008 10:23:24 -0700 (PDT), xkenneth <[EMAIL PROTECTED]> wrote: >So i generally write quite a few classes, and in most I need to >overload the == operator. > >If i have two classes, like below: > >Class A: >attribute a >attribute b > >Class B: >attribute a >attribute c > >So if I've o

  1   2   >