Re: IDLE home page?

2008-10-22 Thread Gabriel Genellina
En Wed, 22 Oct 2008 04:49:14 -0200, Terry Reedy <[EMAIL PROTECTED]> escribió: Sebastian Bassi wrote: If I put IDLE in the search box at python.org, the first hit is: http://www.python.org/idle/ But this page is a directory without any index file: If I see the "ABOUT" windows (under HELP in th

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-22 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Ross Ridge wrote: > Ross Ridge wrote: > >> As opposed to the file system being the single point failure? > > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >>The file system is involved regardless. But leaving out an additional >>layer of failure on top of it does

Re: Need some advice

2008-10-22 Thread Bruno Desthuilliers
azrael a écrit : There have been some discutions with my partner about which protocol to use. We agreed to use also http. But we are looking for a possibility to use something to trasfer python objects like Json objects. 'like' ??? there are a couple json implementation for Python, and for PHP

Get 10000$+Bonus Without Investment.

2008-10-22 Thread chinu
hai, i am srinu from india. i am sending a blog url for yours use. Right side Of The Blog Awsurvey Banner will appear. click on the banner and get a free signup with 6$ bonus and you will get more surveys. once you have completed one survey you will get minimem 4$ and more left side of the blog

Re: Get 10000$+Bonus Without Investment.

2008-10-22 Thread asiandollno1
On Oct 22, 9:09 am, chinu <[EMAIL PROTECTED]> wrote: > hai, > i am srinu from india. i am sending a blog url for yours use. > > Right side Of The Blog Awsurvey Banner will appear. > > click on the banner and get a free signup with 6$ bonus and you will > get more surveys. > once you have completed

Python 2.5.chm problem

2008-10-22 Thread [EMAIL PROTECTED]
Hi! When I try to open the 2.5 Python help, I got error message: "A fájl (mk:@MSITStore:c:\Python25\Doc\Python25.chm) nem nyitható meg." The english translation is this: "Cannot open the file (mk:@MSITStore:c:\Python25\Doc\Python25.chm)" I not experienced this problem in the Python 2.4 the

GOODNEWS

2008-10-22 Thread jaggu
GOODNEWS EARN BY JUST READING SMS ON UR MOBILE- UR INCOMMING SMS PAY'S U INCOME ONE CLICK AWAY FROM EARNING THROUGH INCOMMING SMS http://www.mGinger.com/index.jsp?inviteId=623396 http://www.paisa4sms.com/Index.aspx?Inviteid=134129 http://www.youmint.com/network-jagguzwx2 http://mGinger.com/in

GOODNEWS 02

2008-10-22 Thread jaggu
GOODNEWS EARN BY JUST READING SMS ON UR MOBILE- UR INCOMMING SMS PAY'S U INCOME ONE CLICK AWAY FROM EARNING THROUGH INCOMMING SMS http://www.mGinger.com/index.jsp?inviteId=623396 http://www.paisa4sms.com/Index.aspx?Inviteid=134129 http://www.youmint.com/network-jagguzwx2 http://mGinger.com/in

GOODNEWS 03

2008-10-22 Thread jaggu
GOODNEWS EARN BY JUST READING SMS ON UR MOBILE- UR INCOMMING SMS PAY'S U INCOME ONE CLICK AWAY FROM EARNING THROUGH INCOMMING SMS http://www.mGinger.com/index.jsp?inviteId=623396 http://www.paisa4sms.com/Index.aspx?Inviteid=134129 http://www.youmint.com/network-jagguzwx2 http://mGinger.com/in

GOODNEWS 04

2008-10-22 Thread jaggu
GOODNEWS EARN BY JUST READING SMS ON UR MOBILE- UR INCOMMING SMS PAY'S U INCOME ONE CLICK AWAY FROM EARNING THROUGH INCOMMING SMS http://www.mGinger.com/index.jsp?inviteId=623396 http://www.paisa4sms.com/Index.aspx?Inviteid=134129 http://www.youmint.com/network-jagguzwx2 http://mGinger.com/in

GOODNEWS 05

2008-10-22 Thread jaggu
GOODNEWS EARN BY JUST READING SMS ON UR MOBILE- UR INCOMMING SMS PAY'S U INCOME ONE CLICK AWAY FROM EARNING THROUGH INCOMMING SMS http://www.mGinger.com/index.jsp?inviteId=623396 http://www.paisa4sms.com/Index.aspx?Inviteid=134129 http://www.youmint.com/network-jagguzwx2 http://mGinger.com/in

GOODNEWS 06

2008-10-22 Thread jaggu
GOODNEWS EARN BY JUST READING SMS ON UR MOBILE- UR INCOMMING SMS PAY'S U INCOME ONE CLICK AWAY FROM EARNING THROUGH INCOMMING SMS http://www.mGinger.com/index.jsp?inviteId=623396 http://www.paisa4sms.com/Index.aspx?Inviteid=134129 http://www.youmint.com/network-jagguzwx2 http://mGinger.com/in

socket programming (client-server)

2008-10-22 Thread ryan
i have implemented a small client server model to do file transfer over a LAN network. It work with some machines on the network and on others it doesnt. when i run the server.py file in some machine then it pops up a windows security alert. The message is as follows: Do you want to keep b

How can I handle the char immediately after its input, without waiting an endline?

2008-10-22 Thread Lave
Hi, all. I'm a new comer. So This question maybe sutpid.:) I want to write something that handle every char immediately after its input. Then tehe user don't need to type [RETURN] each time. How can I do this? Thanks in advance. -- Regards Lave -- http://mail.python.org/mailman/listinfo/pyth

Python search path (on Windows)

2008-10-22 Thread wooly booly
I would like to execute a Python script from Windows command line: Python myscript.py This works if myscript.py resides in the current folder. My question is: Is it possible to execute the command above from another folder? I put the script's folder in the PYTHONPATH environment variable but thi

Re: Need some advice

2008-10-22 Thread azrael
I mean shttp. (secure hyper text transfer protocol) On Oct 22, 9:48 am, Bruno Desthuilliers wrote: > azrael a écrit : > > > There have been some discutions with my partner about which protocol > > to use. We agreed to use also http. But we are looking for a > > possibility to use something to tr

Re: How can I handle the char immediately after its input, without waiting an endline?

2008-10-22 Thread rishi pathak
The below piece of code should give you some understanding import tty import sys tty.setraw(sys.stdin.fileno()) char='' print "Press x to exit" while char != 'x' : char = sys.stdin.read(1) print "You entered : ",char # Your code here On Wed, Oct 22, 2008 at 2:34 PM, Lave

Re: Python search path (on Windows)

2008-10-22 Thread Gabriel Genellina
En Wed, 22 Oct 2008 07:03:48 -0200, wooly booly <[EMAIL PROTECTED]> escribió: I would like to execute a Python script from Windows command line: Python myscript.py This works if myscript.py resides in the current folder. My question is: Is it possible to execute the command above from another

Re: How to transfer data structure or class from Python to C/C++?

2008-10-22 Thread Gabriel Genellina
En Tue, 21 Oct 2008 15:21:45 -0200, Aaron Brady <[EMAIL PROTECTED]> escribió: On Oct 21, 12:46 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: Hi Gabriel, Sorry, did you have some questions about it? No, that empty message was posted by mistake, sorry. -- Gabriel Genellina -- http://mail

Re: Commercial Products in Python

2008-10-22 Thread Paul Boddie
On 21 Okt, 19:50, "Paulo J. Matos" <[EMAIL PROTECTED]> wrote: > > I was just wondering, if you wish to commercialize an application > developed in Python, what's the way to go? See here for some answers: http://wiki.python.org/moin/HowDoYouProtectSource As I've already said a few times when answ

Re: Python search path (on Windows)

2008-10-22 Thread Diez B. Roggisch
wooly booly wrote: > I would like to execute a Python script from Windows command line: > > Python myscript.py > > This works if myscript.py resides in the current folder. My question is: > Is it possible to execute the command above from another folder? > > I put the script's folder in the PYT

Re: why this server can not run in python30

2008-10-22 Thread davy zhang
thanks so much for fixing the problems!! On Wed, Oct 22, 2008 at 2:56 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Wed, 22 Oct 2008 03:45:31 -0200, davy zhang <[EMAIL PROTECTED]> > escribió: > >> import asyncore, asynchat >> import os, socket, string >> >> PORT = 8000 >> >> class HTTPCha

Create a message

2008-10-22 Thread Amie
Hi, I would like to know if it's possible to display a message using python, if so can you show me an example. I saw something like:" from twisted.python import log log.msg" in some programs but am not too sure how it works Or provide me with the link that has info regarding that Thanks Amie --

Re: Unicode (UTF8) in dbhas on 2.5

2008-10-22 Thread Paul Boddie
On 21 Okt, 22:39, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > It's not possible to "fix" this - it isn't even broken. The *db modules, > by design, support storing of arbitrary bytes, not just character data. > You can put images into them, or sound files, java byte code files, etc. > So if Py

Re: Create a message

2008-10-22 Thread James Mills
On Wed, Oct 22, 2008 at 8:21 PM, Amie <[EMAIL PROTECTED]> wrote: > I would like to know if it's possible to display a message using > python, if so can you show me an example. > I saw something like:" from twisted.python import log > log.msg" in some programs but am not too sure how it works Defin

How to do_size_allocate properly in a gtk.Viewport subclass

2008-10-22 Thread Joel Hedlund
Hi! I've raised this issue on #pygtk and #gtk+ but with no luck. I haven't been able to solve this even with aid of google, the pygtk reference and the gtk C source, so pretty please help? I'm making an application that you can think of as an image viewer. I want to display a widget in a gtk

Re: How can I handle the char immediately after its input, without waiting an endline?

2008-10-22 Thread Lave
Yes, it's what i want. Many thanks. BTW,python-list 's reply is so quick. I love it. I like you all guys. On 10/22/08, rishi pathak <[EMAIL PROTECTED]> wrote: > The below piece of code should give you some understanding > > import tty > import sys > tty.setraw(sys.stdin.fileno()) > char='' > prin

Re: How to do_size_allocate properly in a gtk.Viewport subclass

2008-10-22 Thread Hrvoje Niksic
Joel Hedlund <[EMAIL PROTECTED]> writes: > I've raised this issue on #pygtk and #gtk+ but with no luck. Note that there's a mailing list dedicated to PyGTK, <[EMAIL PROTECTED]>, so you might also want to ask your question there. -- http://mail.python.org/mailman/listinfo/python-list

do export statement in Python script

2008-10-22 Thread Simon Strobl
Hello, a program of mine, which is supposed to be used in a project, uses nltk. I want the other users to be able to use my program without having to fiddle around with their environment. Therefore, I tried this code: #!/usr/bin/ python import os os.system("export NLTK_DATA=/opt/nltk/data/") i

Re: How can I handle the char immediately after its input, without waiting an endline?

2008-10-22 Thread James Mills
Lave, If you're doing this btw, you may want to look at the curses module or urwid (3rd-party). cheers James On Wed, Oct 22, 2008 at 9:17 PM, Lave <[EMAIL PROTECTED]> wrote: > Yes, it's what i want. Many thanks. > > BTW,python-list 's reply is so quick. I love it. I like you all guys. > > On 10/

Re: do export statement in Python script

2008-10-22 Thread James Mills
On Wed, Oct 22, 2008 at 9:19 PM, Simon Strobl <[EMAIL PROTECTED]> wrote: > #!/usr/bin/ > python > > import os > > os.system("export NLTK_DATA=/opt/nltk/data/") Try: os.environ["NLTK_DATA"] = "/opt/nltk/data/" if that doesn't work, consider wrapping up NLTK in a bash script that contains the shel

Re: do export statement in Python script

2008-10-22 Thread Diez B. Roggisch
Simon Strobl wrote: > Hello, > > a program of mine, which is supposed to be used in a project, uses > nltk. I want the other users to be able to use my program without > having to fiddle around with their environment. Therefore, I tried > this code: > > #!/usr/bin/ > python > > import os > > o

Re: Create a message

2008-10-22 Thread Amie
On Oct 22, 12:44 pm, "James Mills" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 22, 2008 at 8:21 PM, Amie <[EMAIL PROTECTED]> wrote: > > I would like to know if it's possible to display a message using > > python, if so can you show me an example. > > I saw something like:" from twisted.python import l

Re: How to do_size_allocate properly in a gtk.Viewport subclass

2008-10-22 Thread Joel Hedlund
Hrvoje Niksic wrote: Note that there's a mailing list dedicated to PyGTK, <[EMAIL PROTECTED]>, so you might also want to ask your question there. Thanks. I'll try that and hope people won't take offense from cross-posting. I'll be wathching this thread for answers too though. In my experience

which program I need for sftp using pramiko??

2008-10-22 Thread sa6113
which program I have to install for using paramiko for sftp between a two windows machine in local network?? I have installed freeSSHd for server machine but I got an Authentication failed erro when try to connect to server using this code : sock.connect((hostname, port)) t = paramiko.Transport

which program I need for sftp using paramiko??

2008-10-22 Thread sa6113
which program I have to install for using paramiko for sftp between a two windows machine in local network?? I have installed freeSSHd for server machine but I got an Authentication failed erro when try to connect to server using this code : sock.connect((hostname, port)) t = paramiko.Transpo

ANN: Kamaelia 0.6.0, Axon 1.6.0 - New Release

2008-10-22 Thread Michael Sparks
Hi! With great pleasure I'd like to announce the release of Kamaelia 0.6.0 and Axon 1.6.0 :-) Summary === For the short of time:     Overview: library/framework for concurrency using message        passing components as the concurrency metaphor. Consists of a        kernel (Axon) and collect

Re: do export statement in Python script

2008-10-22 Thread Simon Strobl
On 22 Okt., 13:24, "James Mills" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 22, 2008 at 9:19 PM, Simon Strobl <[EMAIL PROTECTED]> wrote: > > #!/usr/bin/ > > python > > > import os > > > os.system("export NLTK_DATA=/opt/nltk/data/") > > Try: > > os.environ["NLTK_DATA"] = "/opt/nltk/data/" > > if that

socket programming (client-server) error

2008-10-22 Thread ryan fox
i have implemented a small client server model to do file transfer over a LAN network. It work with some machines on the network and on others it doesnt. when i run the server.py file in some machine then it pops up a windows security alert. The message is as follows: Do you want to keep bl

Re: socket programming (client-server) error

2008-10-22 Thread James Mills
On Wed, Oct 22, 2008 at 9:50 PM, ryan fox <[EMAIL PROTECTED]> wrote: > I guess its a firewall problem... How do i go abt it? > any help? See as it's most likely a firewall issue and a firewall that I'm not familiar with, I can't help here :/ Sorry. cheers James -- -- -- "Problems are solved

Re: Create a message

2008-10-22 Thread James Mills
On Wed, Oct 22, 2008 at 9:23 PM, Amie <[EMAIL PROTECTED]> wrote: > for example, I wanna display a message that contains a persons age > from the database like so: "Your age is 25". kind of like a messagebox Amie, you're just picking random behavioral examples that you've seen in the software world

Re: Python search path (on Windows)

2008-10-22 Thread Ant
On Oct 22, 10:03 am, "wooly booly" <[EMAIL PROTECTED]> wrote: > I would like to execute a Python script from Windows command line: > > Python myscript.py > > This works if myscript.py resides in the current folder. My question is: > Is it possible to execute the command above from another folder? >

Ordering python sets

2008-10-22 Thread Mr . SpOOn
Hi, I need a structure to represent a set of integers. I also need to perform on this set some basic set operations, such as adding or removing elements, joining with other sets and checking for the presence of specific elements. I think that using Python sets would be the best choice, but I also

add method to class dynamically?

2008-10-22 Thread Neal Becker
I have a class (actually implemented in c++ using boost::python). For an instance of this class, 'r', I'd like to support len (r). I don't want to add it to the c++ code, because this is a unique situation: this class should not normally support len(). So I try: r = ring_int (10) r.__len__ =

Re: add method to class dynamically?

2008-10-22 Thread Jean-Paul Calderone
On Wed, 22 Oct 2008 08:29:08 -0400, Neal Becker <[EMAIL PROTECTED]> wrote: I have a class (actually implemented in c++ using boost::python). For an instance of this class, 'r', I'd like to support len (r). I don't want to add it to the c++ code, because this is a unique situation: this class

Re: add method to class dynamically?

2008-10-22 Thread Diez B. Roggisch
Neal Becker wrote: > I have a class (actually implemented in c++ using boost::python). For an > instance of this class, 'r', I'd like to support len (r). I don't want to > add it to the c++ code, because this is a unique situation: this class > should not normally support len(). > > So I try: >

Re: Ordering python sets

2008-10-22 Thread Tim Chase
I think that using Python sets would be the best choice, but I also need integers to be ordered inside the set and I've just found out that, instead, Python sets are unordered collections. Sets (both in Python, and their mathematical definition) are unordered. However, some simple testing in m

Re: add method to class dynamically?

2008-10-22 Thread Neal Becker
Diez B. Roggisch wrote: > BTW, could you stop setting the followup-to to a non-existing (at least > for a standard newsreader) gmane-newsgroup? > Is this any better? -- http://mail.python.org/mailman/listinfo/python-list

Re: add method to class dynamically?

2008-10-22 Thread Diez B. Roggisch
Neal Becker wrote: > Diez B. Roggisch wrote: > >> BTW, could you stop setting the followup-to to a non-existing (at least >> for a standard newsreader) gmane-newsgroup? >> > > Is this any better? Yes, thanks. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Ordering python sets

2008-10-22 Thread Peter Otten
Tim Chase wrote: > Though for each test, in 2.3, 2.4, and 2.5 that I've got > installed on my local machine, they each printed "s" in-order, > and the iteration occurred in-order as well, even without the > added "sorted(list(s))" code. You need more tests then ;) >>> list(set([1,1000])) [1000,

Using python22.dll with Python 2.5?

2008-10-22 Thread Martin Schneider
Hi! I'd like to use the numpy library (which runs on Python 2.5) in the same project with another (mandatory) library which needs python22.dll. When I try to compile I get an error similar to "python22.dll not compatible with the current Python version." Has anybody an idea how to solve this

Re: Ordering python sets

2008-10-22 Thread Mr . SpOOn
On Wed, Oct 22, 2008 at 3:37 PM, Peter Otten <[EMAIL PROTECTED]> wrote: > Tim Chase wrote: > >> Though for each test, in 2.3, 2.4, and 2.5 that I've got >> installed on my local machine, they each printed "s" in-order, >> and the iteration occurred in-order as well, even without the >> added "sorte

Two-dimensional array tutorial?

2008-10-22 Thread Martin Schneider
Hi! I'd like to handle two-dimensional arrays. My first choice, the numpy library, doesn't seem to be an option due to compatibility issues (see my other thread about python22.dll). Is there a tutorial somewhere how to handle 2d-arrays with vanilla Python? Thanks and best regards, Martin --

Re: Using python22.dll with Python 2.5?

2008-10-22 Thread Diez B. Roggisch
Martin Schneider wrote: > Hi! > > I'd like to use the numpy library (which runs on Python 2.5) in the same > project with another (mandatory) library which needs python22.dll. When > I try to compile I get an error similar to "python22.dll not compatible > with the current Python version." > > H

Re: Two-dimensional array tutorial?

2008-10-22 Thread Diez B. Roggisch
Martin Schneider wrote: > Hi! > > I'd like to handle two-dimensional arrays. My first choice, the numpy > library, doesn't seem to be an option due to compatibility issues (see > my other thread about python22.dll). > > Is there a tutorial somewhere how to handle 2d-arrays with vanilla Python?

Re: Python 2.6, multiprocessing module and BSD

2008-10-22 Thread Jesse Noller
On Tue, Oct 21, 2008 at 6:45 PM, <[EMAIL PROTECTED]> wrote: > It seems that the multiprocessing module in 2.6 is broken for *BSD; > I've seen issue 3770 regarding this. I'm curious if there are more > details on this issue since the posts in 3770 were a bit unclear. For > example, one post claimed

Re: Using python22.dll with Python 2.5?

2008-10-22 Thread Robert Kern
Martin Schneider wrote: Hi! I'd like to use the numpy library (which runs on Python 2.5) in the same project with another (mandatory) library which needs python22.dll. When I try to compile I get an error similar to "python22.dll not compatible with the current Python version." Has anybody

Re: Two-dimensional array tutorial?

2008-10-22 Thread Martin Schneider
Diez B. Roggisch schrieb: Can't you just get Numpy (or it's predecessors, Numeric) compiled against ptyhon2.2? I tried Numeric, but e.g. it doesn't seem to feature transpose... How do I compile Numpy against python2.2? :-) Thanks for your answers and best regards, Martin -- http://mail.python

Re: Two-dimensional array tutorial?

2008-10-22 Thread Diez B. Roggisch
Martin Schneider wrote: > Diez B. Roggisch schrieb: >> Can't you just get Numpy (or it's predecessors, Numeric) compiled against >> ptyhon2.2? > > I tried Numeric, but e.g. it doesn't seem to feature transpose... > > How do I compile Numpy against python2.2? :-) By following the instructions o

Re: Python 2.6, multiprocessing module and BSD

2008-10-22 Thread YouCanCallMeAl
On Oct 21, 8:08 pm, Philip Semanchuk <[EMAIL PROTECTED]> wrote: > On Oct 21, 2008, at 6:45 PM, [EMAIL PROTECTED] wrote: > > > It seems that the multiprocessing module in 2.6 is broken for *BSD; > > I've seen issue 3770 regarding this. I'm curious if there are more > > details on this issue since th

Re: Ordering python sets

2008-10-22 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Mr.SpOOn <[EMAIL PROTECTED]> wrote: > It seems to me that it orders elements when you add using the add() > method, but if you create a set starting from a list, it may result > unordered. Arrrggghhh! None of these behaviors are guaranteed. The docs say, "A set

Re: Python 2.6, multiprocessing module and BSD

2008-10-22 Thread YouCanCallMeAl
On Oct 22, 8:11 am, "Jesse Noller" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 21, 2008 at 6:45 PM,  <[EMAIL PROTECTED]> wrote: > > It seems that the multiprocessing module in 2.6 is broken for *BSD; > > I've seen issue 3770 regarding this. I'm curious if there are more > > details on this issue since

Re: Two-dimensional array tutorial?

2008-10-22 Thread Robert Kern
Martin Schneider wrote: Diez B. Roggisch schrieb: Can't you just get Numpy (or it's predecessors, Numeric) compiled against ptyhon2.2? I tried Numeric, but e.g. it doesn't seem to feature transpose... Yes, it does. Numeric.transpose() How do I compile Numpy against python2.2? :-) You can

Re: Python 2.6, multiprocessing module and BSD

2008-10-22 Thread Jesse Noller
On Wed, Oct 22, 2008 at 10:31 AM, <[EMAIL PROTECTED]> wrote: > On Oct 22, 8:11 am, "Jesse Noller" <[EMAIL PROTECTED]> wrote: >> On Tue, Oct 21, 2008 at 6:45 PM, <[EMAIL PROTECTED]> wrote: >> > It seems that the multiprocessing module in 2.6 is broken for *BSD; >> > I've seen issue 3770 regarding

Re: Two-dimensional array tutorial?

2008-10-22 Thread Martin Schneider
Robert Kern schrieb: Martin Schneider wrote: I tried Numeric, but e.g. it doesn't seem to feature transpose... Yes, it does. Numeric.transpose() Then I must have made a mistake. I'll look into it. Thanks for the correction. How do I compile Numpy against python2.2? :-) You cannot. The

Re: Ordering python sets

2008-10-22 Thread Mr . SpOOn
On Wed, Oct 22, 2008 at 4:30 PM, Roy Smith <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Mr.SpOOn <[EMAIL PROTECTED]> wrote: > >> It seems to me that it orders elements when you add using the add() >> method, but if you create a set starting from a list, it may result >> unordered

Re: Append a new value to dict

2008-10-22 Thread Frank Niemeyer
> However incrementing a non-existing key throws an exception. Right. And that's exactly what I would expect, according to the "principle of least surprise" Python tries to obey. There's simply no way to increment a non-existent value - not without performing some obscure implict behind-the-scenes

socket and DynDNS

2008-10-22 Thread Stephan Schulz
Hi all, I need an application that will duplicate an incoming stream of UDP messages and send it on to some external server that has a dynamic DNS address. I can use the dynamic name someserver.dyndns.org to get the current IP address or to send data too. The question I have is how to do this in

Re: Python 2.6, multiprocessing module and BSD

2008-10-22 Thread Philip Semanchuk
On Oct 22, 2008, at 10:11 AM, Jesse Noller wrote: On Tue, Oct 21, 2008 at 6:45 PM, <[EMAIL PROTECTED]> wrote: It seems that the multiprocessing module in 2.6 is broken for *BSD; I've seen issue 3770 regarding this. I'm curious if there are more details on this issue since the posts in 3770 we

Re: socket programming (client-server) error

2008-10-22 Thread Python
On 22 okt 2008, at 13:50, ryan fox wrote: i have implemented a small client server model to do file transfer over a LAN network. It work with some machines on the network and on others it doesnt. when i run the server.py file in some machine then it pops up a windows security alert. The messa

Re: Python 2.6, multiprocessing module and BSD

2008-10-22 Thread Jesse Noller
On Wed, Oct 22, 2008 at 11:06 AM, Philip Semanchuk <[EMAIL PROTECTED]> wrote: >> The BSD issue was raised late in the cycle for 2.6. The problem is >> that FBSD's support is "very experimental" as Phillip points out - and >> OpenBSD doesn't even have them. >> >> Due to the lateness of the issue and

Re: IDLE home page?

2008-10-22 Thread Sebastian Bassi
On Wed, Oct 22, 2008 at 3:49 AM, Terry Reedy <[EMAIL PROTECTED]> wrote: > Depending on the answer you get here, you might send the same observation > and question to [EMAIL PROTECTED] OK, I've just sent it. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: static variables in Python?

2008-10-22 Thread Stephan Schulz
In article <[EMAIL PROTECTED]>, kj wrote: > > >Yet another noob question... > >Is there a way to mimic C's static variables in Python? Or something >like it? The idea is to equip a given function with a set of >constants that belong only to it, so as not to clutter the global >namespace with vari

Re: Python 2.6, multiprocessing module and BSD

2008-10-22 Thread Philip Semanchuk
On Oct 22, 2008, at 11:37 AM, Jesse Noller wrote: On Wed, Oct 22, 2008 at 11:06 AM, Philip Semanchuk <[EMAIL PROTECTED] > wrote: One oversight I noticed the multiprocessing module docs is that a semaphore's acquire() method shouldn't have a timeout on OS X as sem_timedwait() isn't supported o

substitution of a method by a callable object

2008-10-22 Thread netimen
Can I substitute a method of a class by a callable object (not a function)? I can very easy insert my function in a class as a method, but an object - can't. I have the following: class Foo(object): pass class Obj(object): def __call__(self, obj_self): print 'Obj' def func(self)

Re: Ordering python sets

2008-10-22 Thread Peter Pearson
On Wed, 22 Oct 2008 15:37:03 +0200, Peter Otten <[EMAIL PROTECTED]> wrote: > Tim Chase wrote: > >> Though for each test, in 2.3, 2.4, and 2.5 that I've got >> installed on my local machine, they each printed "s" in-order, >> and the iteration occurred in-order as well, even without the >> added "so

Re: How can I handle the char immediately after its input, without waiting an endline?

2008-10-22 Thread Chris Ortner
Is there a way to do the opposite of tty.setraw afterwards to prevent the terminal from not displaying any characters that are typed in? Of course, this can be resolved by re-opening it, but thats not really convenient. -- http://mail.python.org/mailman/listinfo/python-list

[APSW] SELECT COUNT(*) not succesfull?

2008-10-22 Thread Gilles Ganault
Hello I'm trying to use the APSW package to access a SQLite database, but can't find how to check if a row exists. I just to read a tab-separated file, extract a key/value from each line, run "SELECT COUNT(*)" to check whether this tuple exists in the SQLite database, and if not, run an INSERT. T

2.6, 3.0, and truly independent intepreters

2008-10-22 Thread Andy
Dear Python dev community, I'm CTO at a small software company that makes music visualization software (you can check us out at www.soundspectrum.com). About two years ago we went with decision to use embedded python in a couple of our new products, given all the great things about python. We we

Why can't I assign a class method to a variable?

2008-10-22 Thread ed
I'm trying to make a shortcut by doing this: t = Globals.ThisClass.ThisMethod Calling t results in an unbound method error. Is it possible to do what I want? I call this method in hundreds of locations and I'm trying to cut down on the visual clutter. Thank you! -- http://mail.python.org/ma

Re: How can I handle the char immediately after its input, without waiting an endline?

2008-10-22 Thread Terry Reedy
rishi pathak wrote: The below piece of code should give you some understanding import tty import sys tty.setraw(sys.stdin.fileno()) char='' print "Press x to exit" while char != 'x' : char = sys.stdin.read(1) print "You entered : ",char # Your code here Does not work on

Re: Why can't I assign a class method to a variable?

2008-10-22 Thread Diez B. Roggisch
ed wrote: > I'm trying to make a shortcut by doing this: > > t = Globals.ThisClass.ThisMethod > > Calling t results in an unbound method error. > > Is it possible to do what I want? I call this method in hundreds of > locations and I'm trying to cut down on the visual clutter. You need to mak

Re: error estimation in a non-linear least squares fitting

2008-10-22 Thread Evelien
Thanks Robert for your reply. I must say I am kind of disappointed if that is the only solution. I thought that such a standard problem as least squares fitting, would always give you an estimation of the error bars, without having to look up how you can convert a covariance matrix into error bars.

Re: Append a new value to dict

2008-10-22 Thread bearophileHUGS
Frank Niemeyer: > There's simply no > way to increment a non-existent value - not without performing some > obscure implict behind-the-scenes stuff. Like importing and using a defaultdict(int). > > So you > > either have to use a workaround: > > >  >>> try: > > ...   counter['B'] += 1 > > ... ex

Re: substitution of a method by a callable object

2008-10-22 Thread Terry Reedy
netimen wrote: Can I substitute a method of a class by a callable object (not a function)? I can very easy insert my function in a class as a method, but an object - can't. Yes you can and did. class Foo(object): pass class Obj(object): def __call__(self, obj_self): print 'Ob

Re: Ordering python sets

2008-10-22 Thread Peter Otten
Peter Pearson wrote: > On Wed, 22 Oct 2008 15:37:03 +0200, Peter Otten <[EMAIL PROTECTED]> wrote: >> Tim Chase wrote: >> >>> Though for each test, in 2.3, 2.4, and 2.5 that I've got >>> installed on my local machine, they each printed "s" in-order, >>> and the iteration occurred in-order as well,

Re: substitution of a method by a callable object

2008-10-22 Thread George Sakkis
On Oct 22, 12:13 pm, netimen <[EMAIL PROTECTED]> wrote: > Can I substitute a method of a class by a callable object (not a > function)? I can very easy insert my function in a class as a method, > but an object - can't. > > I have the following: > > class Foo(object): >     pass > > class Obj(obje

Re: Ordering python sets

2008-10-22 Thread bearophileHUGS
Mr.SpOOn: > Is there another convenient structure or shall I use lists and define > the operations I need? As Python becomes accepted for more and more "serious" projects some more data structures can eventually be added to the collections module: - SortedSet, SortedDict: can be based on red-blac

Re: 2.6, 3.0, and truly independent intepreters

2008-10-22 Thread Thomas Heller
Andy schrieb: > Dear Python dev community, > > [...] Basically, > we use embedded python and use it to wrap our high performance C++ > class set which wraps OpenGL, DirectX and our own software renderer. > In addition to wrapping our C++ frameworks, we use python to perform > various "worker" tas

Re: ANN: Enthought Python Distribution - New Release

2008-10-22 Thread Guido van Rossum
Hey Travis, Congratulations with this release! Are you guys thinking of Python 2.6 yet, now that it's been released? --Guido On Tue, Oct 21, 2008 at 2:53 PM, Travis Vaught <[EMAIL PROTECTED]> wrote: > Greetings, > > Enthought, Inc. is very pleased to announce the newest release of the > Enthough

Re: Python 2.5.chm problem

2008-10-22 Thread Martin v. Löwis
> When I try to open the 2.5 Python help, I got error message: > "A fájl (mk:@MSITStore:c:\Python25\Doc\Python25.chm) nem nyitható meg." Can you please elaborate what precisely you do to "open the 2.5 Python help"? What operating system are you using, how did you install Python, and where are y

Re: socket and DynDNS

2008-10-22 Thread Martin v. Löwis
> My naive and ugly alternative is to periodically (e.g. every 5 > minutes) do a manual lookup and use the last address. You should look at the TTL of the DNS record, and re-lookup when it expires. There will be *no* kind of protection for UDP messages. When the machine loses its IP address, it w

Re: 2.6, 3.0, and truly independent intepreters

2008-10-22 Thread Martin v. Löwis
> - In python 3, the C module API now supports true interpreter > independence, but have all the modules in the python codebase been > converted over? No, none of them. > Are they all now truly compliant? It will only take > a single static/global state variable in a module to potentially cause

Re: no module named _tkinter

2008-10-22 Thread Ben ZX
On Oct 21, 9:11 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Oct 22, 2:10 am, Ben ZX <[EMAIL PROTECTED]> wrote: > > > When I type Thanks. Right on. > > > import Tkinter > > > I get > > > no module named _tkinter. > > > I compiled my own python 2.5.2, and I didn't do anything special: jus

Re: IRC

2008-10-22 Thread Lie Ryan
On Tue, 21 Oct 2008 05:59:43 -0700, Amie wrote: > HI All, > > Please can you perhaps provide me with links or good places where I can > learn what IRC is, how to work with it and how to write to a large log > file at the same time as letting the IRC spy read and write to the > server. > > Thank

Re: Ordering python sets

2008-10-22 Thread Duncan Booth
Peter Otten <[EMAIL PROTECTED]> wrote: > Here's another one: > set([1,9]) > set([1, 9]) set([9,1]) > set([9, 1]) > > This time I did indeed search systematically... > You missed one with smaller values: >>> set([8,0]) set([8, 0]) >>> set([0,8]) set([0, 8]) You can work some of it out

Re: [APSW] SELECT COUNT(*) not succesfull?

2008-10-22 Thread Bruno Desthuilliers
Gilles Ganault a écrit : Hello I'm trying to use the APSW package to access a SQLite database, but can't find how to check if a row exists. I just to read a tab-separated file, extract a key/value from each line, run "SELECT COUNT(*)" to check whether this tuple exists in the SQLite database, an

Re: error estimation in a non-linear least squares fitting

2008-10-22 Thread Robert Kern
Evelien wrote: Thanks Robert for your reply. I must say I am kind of disappointed if that is the only solution. I thought that such a standard problem as least squares fitting, would always give you an estimation of the error bars, without having to look up how you can convert a covariance matrix

Re: p2exe for python 2.6

2008-10-22 Thread Stefaan Himpe
How can convert my python script in exe for the python version 2.6? You must use a standalone executable builder like * py2exe (Windows) * py2app (Mac OS) * PyInstaller (all platforms) * cx_Freeze (Windows and Linux) * bbFreeze (Windows and Linux) Presumably you could use GU

Re: substitution of a method by a callable object

2008-10-22 Thread Bruno Desthuilliers
netimen a écrit : Can I substitute a method of a class by a callable object (not a function)? I can very easy insert my function in a class as a method, but an object - can't. functions implement the descriptor protocol so when looked up as class attributes, the lookup invoke their __get__ met

  1   2   >