Re: access abook addressbook with curses

2006-08-13 Thread Fabian Braennstroem
Hi Ben, * Ben C <[EMAIL PROTECTED]> wrote: > On 2006-08-08, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: >> Hi Ben, >> >> * Ben C <[EMAIL PROTECTED]> wrote: >>> On 2006-08-06, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: Hi Ben, * Ben C <[EMAIL PROTECTED]> wrote: > On 2006-08

PIL and solaris

2006-08-13 Thread kepioo
Hi all, I am trying to install PIL with python 2.3 on solaris X86, but I get this error message : building '_imaging' extension creating build/temp.solaris-2.10-i86pc-2.3 creating build/temp.solaris-2.10-i86pc-2.3/libImaging /sgnome/tools/x86-solaris/forte/SOS8/SUNWspro/bin/cc -i -xO4 -xspace -xs

Re: Drawing a grid on a picture

2006-08-13 Thread Brian Quinlan
Jive Dadson wrote: > I also found a reference to something called PIL. Maybe that's the > ticket. If so, where can I find it (with documentation)? Thanks. The will likely do what you want. And you can find it the same way that you would find anything online i.e. with google. But here is the l

Re: Python/Tk not working in Linux

2006-08-13 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, BinnyVA wrote: >> Some distributions move the `Tkinter` stuff into an own package. >> Search for a package called `python-tk` or `python-tkinter` or similar. > > I could use a 'python-tk' package - but the problem is the latest > version of python may not be available. T

Re: Drawing a grid on a picture

2006-08-13 Thread Jive Dadson
I also found a reference to something called PIL. Maybe that's the ticket. If so, where can I find it (with documentation)? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Drawing a grid on a picture

2006-08-13 Thread Jive Dadson
Hello folks. I know precisely zero about image processing. I want to draw a grid of lines one or two pixels wide on a picture (.jpg, .png, or whatever). [I want to transfer a sketch of the picture to a canvas (for oil painting), using the "grid method."] I figure this is probably a very easy

Re: Python/Tk not working in Linux

2006-08-13 Thread BinnyVA
> Some distributions move the > `Tkinter` stuff into an own package. Search for a package called > `python-tk` or `python-tkinter` or similar. I could use a 'python-tk' package - but the problem is the latest version of python may not be available. I am going to download Tcl/Tk and install it. T

Re: Easy to use distributed system?

2006-08-13 Thread Maurice LING
Jim Jones wrote: > I am looking for a system in Python that will easily allow me to distribute > processes across multiple systems?So, if I have a function 'foo', I'd > like to be able to call something along the lines of > > distribute(foo(x)) > > And have the system figure out which node

Re: recommended general-purpose string template packages?

2006-08-13 Thread Ravi Teja
> In general, I'm mainly interested in a template engine for dynamic web > pages but would like a general purpose one to avoid learning yet > another package for generating e-mail messages, form letters, source > code, whatever. > > In particular, does anyone have much experience with the Python >

Re: Easy to use distributed system?

2006-08-13 Thread Ravi Teja
Jim Jones wrote: > I am looking for a system in Python that will easily allow me to distribute > processes across multiple systems?So, if I have a function 'foo', I'd > like to be able to call something along the lines of > > distribute(foo(x)) > > And have the system figure out which node is a

Re: outputting a command to the terminal?

2006-08-13 Thread John Machin
John Salerno wrote: > > I think I'll take a look at the subprocess module, just for fun. :) ... and for learning too :-) Also, consider that some operating system commands are built into the shell (i.e. not run as a separate process), which makes using the subprocess module a bit difficult -- f

Re: selecting base class from user input

2006-08-13 Thread danielx
Is your declaration of ABC supposed to have some_super as one of the base classes? Your constructor has some_super as a parameter. What is this supposed to mean in light of the declaration for ABC? If you are trying to customize the base class of ABC by passing an argument to the constructor of AB

recommended general-purpose string template packages?

2006-08-13 Thread John Machin
Hi, In general, I'm mainly interested in a template engine for dynamic web pages but would like a general purpose one to avoid learning yet another package for generating e-mail messages, form letters, source code, whatever. In particular, does anyone have much experience with the Python interfac

Re: Nested if and expected an indent block

2006-08-13 Thread [EMAIL PROTECTED]
Simon Forman wrote: > > I got rid of the triple quote string at the start of the function, and > > that cleared up the problem, though I don't know why. > > > Ah, yes. The docstring for a function (or at least its first > triple-quote) must be indented to the same degree as its statements. > (If y

Easy to use distributed system?

2006-08-13 Thread Jim Jones
I am looking for a system in Python that will easily allow me to distribute processes across multiple systems?So, if I have a function 'foo', I'd like to be able to call something along the lines of distribute(foo(x)) And have the system figure out which node is available for process, and t

Re: Nested if and expected an indent block

2006-08-13 Thread Simon Forman
[EMAIL PROTECTED] wrote: > Dustan wrote: > > > > > To see the full traceback, assuming you're using windows, you need to > > run it on the Command prompt. > > Hi Dustan: > > Here's the traceback: > > C:\docs\Python>SylloSolver.py > File "C:\docs\Python\SylloSolver.py", line > """ > ^ >

Re: Compiling wxPython app for Windows; Single EXE

2006-08-13 Thread Satya
Vincent Delporte wrote: > - there's no way to build a single EXE, to make deployment easier (if > multiple files, I need to build an installer with eg. NSIS or > InnoSetup)? > I am using InnoSetup. The included example script (I believe in py2exe) is adequate for simple applications. I just mod

Re: Nested if and expected an indent block

2006-08-13 Thread [EMAIL PROTECTED]
Dustan wrote: > > To see the full traceback, assuming you're using windows, you need to > run it on the Command prompt. Hi Dustan: Here's the traceback: C:\docs\Python>SylloSolver.py File "C:\docs\Python\SylloSolver.py", line """ ^ IndentationError: expected an indented block I go

Re: NNTPLIB STRANGE ERROR

2006-08-13 Thread Bryan Olson
2Good4You-Veki(Cro) wrote: > when I want use python nntplib: [...] > error: (10053, 'Software caused connection abort') That's not such a strange error; various network problems can cause it. It means something went wrong with the TCP connection, so your system aborted it. Does it happen consist

Re: Nested if and expected an indent block

2006-08-13 Thread Dustan
> Thanks for the replies: > > I'm sorry, the colon is there in the original, I accidentally blew it > off when I added the comment. The only information I get from IDLE is a > dialog box that says: > > Syntax Error > There's an error in your program: > expected an indented block > > Keith To see t

Re: yet another noob question

2006-08-13 Thread Jason Nordwick
better (sorry, still learning Python): def cross(x,y): return [a+b for a in x for y in b] Jason Nordwick wrote: > Or without filter: > > from operator import add > def pr(x): print x > def cross(x,y): return reduce(add, [[a+b for b in y] for a in x]) > x=map(pr, reduce(cross, [map(str,range(1,6)

Re: yet another noob question

2006-08-13 Thread Jason Nordwick
Or without filter: from operator import add def pr(x): print x def cross(x,y): return reduce(add, [[a+b for b in y] for a in x]) x=map(pr, reduce(cross, [map(str,range(1,6))]*5)) mike_wilson1333 wrote: > I would like to generate every unique combination of numbers 1-5 in a 5 > digit number and

Re: outputting a command to the terminal?

2006-08-13 Thread John Salerno
Yu-Xi Lim wrote: > I assume you're using a Debian-based distro with aptitude as the front > end. In which case, all dpkg operations should be logged in > /var/log/dpkg.log Yes, I'm using Ubuntu. But I checked this log file and I'm a bit confused. It has a lot of listings for 5-31-06, but I did

Re: yet another noob question

2006-08-13 Thread Jason Nordwick
def pr(x): print(x) >>> x=map(pr,[x for x in xrange(11,56) if '1'<=min(str(x)) and >>> max(str(x))<='5']) 11 12 13 14 15 21 22 23 24 25 31 32 33 34 35 41 42 43 44 45 51 52 53 54 55 mike_wilson1333 wrote: > I would like to generate every unique combination of numbers 1-5 in a 5 > digit number an

Re: Nested if and expected an indent block

2006-08-13 Thread [EMAIL PROTECTED]
alisonken1 wrote: > [EMAIL PROTECTED] wrote: > > Greetings: > > > > elif q.lower() == "some"# s in some is highlighted > > > Any ideas? Thanks in advance. > > > > Keith > > Would the missing colon have something to do with it? > > > elif q.lower() == "some": Thanks for the replies: I'm

Re: open() and Arabic language

2006-08-13 Thread John Machin
MaaSTaaR wrote: > Hello ... > > firstly , sorry for my bad English . > > i have problem with open() function when i use it with file which name > in Arabic , the open() will not find the file , and i am sure the file > is exist . > > > so how i can solve this problem ? Provide more information --

Re: Nested if and expected an indent block

2006-08-13 Thread alisonken1
[EMAIL PROTECTED] wrote: > Greetings: > elif q.lower() == "some"# s in some is highlighted > Any ideas? Thanks in advance. > > Keith Would the missing colon have something to do with it? > elif q.lower() == "some": -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested if and expected an indent block

2006-08-13 Thread Tim Williams
On 13 Aug 2006 16:28:45 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Greetings: > > I'm brand new to Python and decided to write a syllogism solver for a > class I'm taking. At the start of the program, I define a function that > classifies the type of each statement in the syllogism. Pyth

Re: yet another noob question

2006-08-13 Thread [EMAIL PROTECTED]
Sybren Stuvel wrote: > mike_wilson1333 enlightened us with: > > I would like to generate every unique combination of numbers 1-5 in a 5 > > digit number and follow each combo with a newline. So i'm looking at > > generating combinations such as: (12345) , (12235), (4) and so on. > > Count fro

Nested if and expected an indent block

2006-08-13 Thread [EMAIL PROTECTED]
Greetings: I'm brand new to Python and decided to write a syllogism solver for a class I'm taking. At the start of the program, I define a function that classifies the type of each statement in the syllogism. Python tells me that it is expecting an indented block at the s in "some". I can see what

Re: looking for a simple way to load a program from another python program..

2006-08-13 Thread Luis M. González
Try this: import os os.startfile('cabel.py') This should work with any program or file, not only python ones. Hope this helps, Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling wxPython app for Windows; Single EXE

2006-08-13 Thread Vincent Delporte
On 13 Aug 2006 13:46:14 -0700, "Tim N. van der Leeuw" <[EMAIL PROTECTED]> wrote: >I have a wxPython app, which I compile into one EXE file. Then there's >just 1 support file needed: a MS DLL (which, once distributed, you will >not need to update). OK. So you compile the Python app into an EXE usin

Re: looking for a simple way to load a program from another python program..

2006-08-13 Thread [EMAIL PROTECTED]
Caleb Hattingh wrote: > Hi Eric > > Check that ".py" and ".pyw" are in your PATHEXT environment variable > (are you using Windows?). Then, if the folder that cabel is in is in > your PATH environment variable, and the correct association for .py > files is set up (i.e. they get run by python.exe

Re: looking for a simple way to load a program from another python program..

2006-08-13 Thread [EMAIL PROTECTED]
Caleb Hattingh wrote: > Hi Eric > > Check that ".py" and ".pyw" are in your PATHEXT environment variable > (are you using Windows?). Then, if the folder that cabel is in is in > your PATH environment variable, and the correct association for .py > files is set up (i.e. they get run by python.exe

Re: outputting a command to the terminal?

2006-08-13 Thread Yu-Xi Lim
John Salerno wrote: > 1. First of all, does Linux keep track of the packages you manually > install? If so, then I won't have to do this at all. I assume you're using a Debian-based distro with aptitude as the front end. In which case, all dpkg operations should be logged in /var/log/dpkg.log

Re: [OT] John Salerno

2006-08-13 Thread Joe Feise
John Salerno wrote on 08/12/06 21:44: > Alan Connor wrote: > >> So. You post using three different newsservers, which no one who >> posts under the same alias all the time does. >> >> And there are virtually no Linux groups in your posting history >> for the last year. > > Wow, you need some he

Re: outputting a command to the terminal?

2006-08-13 Thread Diez B. Roggisch
John Salerno schrieb: > Here's my new project: I want to write a little script that I can type > at the terminal like this: > > $ scriptname package1 [package2, ...] > > where scriptname is my module name and any subsequent arguments are the > names of Linux packages to install. Running the scr

Re: seeking the "Hello World" of Packages

2006-08-13 Thread dwhall
Kevin, I just posted a small package to the python package index. It has one source file of interest and some unit tests.The remaining files are either needed for or made by distutils. Should be pretty easy to follow if you've read the distutils docs. Note that the package you get does not

outputting a command to the terminal?

2006-08-13 Thread John Salerno
Here's my new project: I want to write a little script that I can type at the terminal like this: $ scriptname package1 [package2, ...] where scriptname is my module name and any subsequent arguments are the names of Linux packages to install. Running the script as above will create this line:

Re: yet another noob question

2006-08-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >mike_wilson1333 <[EMAIL PROTECTED]> wrote: > >> I would like to generate every unique combination of numbers 1-5 in a 5 >> digit number and follow each combo with a newline. So i'm looking at .

Re: looking for a simple way to load a program from another python program..

2006-08-13 Thread Caleb Hattingh
Hi Eric Check that ".py" and ".pyw" are in your PATHEXT environment variable (are you using Windows?). Then, if the folder that cabel is in is in your PATH environment variable, and the correct association for .py files is set up (i.e. they get run by python.exe), either os.system('cabel') or o

Re: looking for a simple way to load a program from another python program..

2006-08-13 Thread Simon Forman
[EMAIL PROTECTED] wrote: > I was looking for a simple way to load a simple python program from > another python program. > > I tried > > os.system(cabel) > > The file name is cabel.py a csound instrument editor.. > > The error I am getting is > > Traceback (most recent call last): > File "C:\Pyth

Re: Compiling wxPython app for Windows; Single EXE

2006-08-13 Thread Tim N. van der Leeuw
Vincent Delporte wrote: > Hi > > I browsed the archives, but since some messages date back a bit, I > wanted to make sure that > > - py2exe is still the best tool in town to compile Python scripts to > run on a Windows host that doesn't have Python installed, including > wxWidgets/wxPython > > - t

selecting base class from user input

2006-08-13 Thread Jackson
I want a class that will determine its base class by the argument passed in. What I am about to write _does_not_work_, but it shows what I am trying to do. class ABC(some_super): def __init__(self,some_super): some_super.__init__(self) if some_super == list:

Re: John Salerno

2006-08-13 Thread Bretts
Alan Connor wrote: > On alt.os.linux, in <[EMAIL PROTECTED]>, "jason" wrote: > > Path: > > text.usenetserver.com!atl-c01.usenetserver.com!news.usenetserver.com!atl-c05.usenetserver.com!news.usenetserver.com!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13

Compiling wxPython app for Windows; Single EXE

2006-08-13 Thread Vincent Delporte
Hi I browsed the archives, but since some messages date back a bit, I wanted to make sure that - py2exe is still the best tool in town to compile Python scripts to run on a Windows host that doesn't have Python installed, including wxWidgets/wxPython - there's no way to build a single EXE, to ma

Re: yet another noob question

2006-08-13 Thread Paul Rubin
Paul Rubin writes: > Now you can use the function to print the list you wanted: > > for i in xrange(1234,1333): >print base5x(i, 5) Whoops, pasted the wrong thing from my test window. Sorry. That was supposed to say: for i in xrange(5**5): p

Re: yet another noob question

2006-08-13 Thread Paul Rubin
"mike_wilson1333" <[EMAIL PROTECTED]> writes: > I would like to generate every unique combination of numbers 1-5 in a 5 > digit number and follow each combo with a newline. So i'm looking at > generating combinations such as: (12345) , (12235), (4) and so on. > What would be the best way to do

Re: open() and Arabic language

2006-08-13 Thread Butternut Squash
MaaSTaaR wrote: > Hello ... > > firstly , sorry for my bad English . > > i have problem with open() function when i use it with file which name > in Arabic , the open() will not find the file , and i am sure the file > is exist . > > > so how i can solve this problem ? probably a unicode prob

looking for a simple way to load a program from another python program..

2006-08-13 Thread [EMAIL PROTECTED]
I was looking for a simple way to load a simple python program from another python program. I tried os.system(cabel) The file name is cabel.py a csound instrument editor.. The error I am getting is Traceback (most recent call last): File "C:\Python24\Lib\site-packages\boa-constructor\tes

Re: yet another noob question

2006-08-13 Thread bearophileHUGS
Simon Forman: > I originally meant this as a joke and was going to say not to use it. > But on my old, slow computer it only takes about a second or two. Another possibility, still using a filter: nodig = set("06789") r = [i for i in xrange(1, 5+1) if not (set(`i`) & nodig)] Bye, bearoph

Re: Kill process based on window name (win32)

2006-08-13 Thread Roger Upole
Trying to do this for different sessions is going to be much more complicated. Each terminal service session has its own window station, and there may be more than one desktop per window station. You'll need several functions from the win32service module for accessing window stations and desktops,

Py_Initialize crashes with winpdb

2006-08-13 Thread eastier
Hi all, I've an application with embedded python. In order to reload the python scripts, I end the python session, and reopen one just after : <...release used modules...> Py_Finalize(); Py_Initialize(); <...Acquire relevant modules...> In order to debug the python script, I recently tried win

Re: yet another noob question

2006-08-13 Thread Alex Martelli
mike_wilson1333 <[EMAIL PROTECTED]> wrote: > I would like to generate every unique combination of numbers 1-5 in a 5 > digit number and follow each combo with a newline. So i'm looking at > generating combinations such as: (12345) , (12235), (4) and so on. > What would be the best way to do t

NNTPLIB STRANGE ERROR

2006-08-13 Thread 2Good4You-Veki(Cro)
HI, when I want use python nntplib: >>> import nntplib >>> s=nntplib.NNTP('news.t-com.hr') >>> s.group('hr.mag.bug') THEN ERROR IS: Traceback (most recent call last): File "", line 1, in -toplevel- s.group('hr.mag.bug') File "C:\Python24\lib\nntplib.py", line 346, in group resp = sel

Re: Subtyping a non-builtin type in C/C++

2006-08-13 Thread johan2sson
[EMAIL PROTECTED] wrote: > > > I am trying to create a subclass of a python class, defined in python, > > > in C++, but I am having some problems. Note to future news group archeologists: I have since learned that that's because it "can't be done", in the sense that there's no defined way that i

Re: yet another noob question

2006-08-13 Thread Simon Forman
Stargaming wrote: > Stargaming schrieb: > > mike_wilson1333 schrieb: > > > >> I would like to generate every unique combination of numbers 1-5 in a 5 > >> digit number and follow each combo with a newline. So i'm looking at > >> generating combinations such as: (12345) , (12235), (4) and so on

Re: yet another noob question

2006-08-13 Thread Stargaming
Stargaming schrieb: > mike_wilson1333 schrieb: > >> I would like to generate every unique combination of numbers 1-5 in a 5 >> digit number and follow each combo with a newline. So i'm looking at >> generating combinations such as: (12345) , (12235), (4) and so on. >> What would be the best w

Re: yet another noob question

2006-08-13 Thread Rene Pijlman
Stargaming: >Generally, it is range(1, 5) Minus all numbers whose decimal string representation matches [0-9]*[06-9][0-9]* Briljant! -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: yet another noob question

2006-08-13 Thread Rene Pijlman
mike_wilson1333: >I would like to generate every unique combination of numbers 1-5 in >a 5 digit number [...] What would be the best way to do this? Ask the Java newsgroup to design a clever algorithm and post it here for pythonification. Ask for the pseudocode, not the Java code. -- René Pijlm

Re: yet another noob question

2006-08-13 Thread Simon Forman
mike_wilson1333 wrote: > I would like to generate every unique combination of numbers 1-5 in a 5 > digit number and follow each combo with a newline. So i'm looking at > generating combinations such as: (12345) , (12235), (4) and so on. > What would be the best way to do this? So, basically i'

Re: yet another noob question

2006-08-13 Thread Stargaming
mike_wilson1333 schrieb: > I would like to generate every unique combination of numbers 1-5 in a 5 > digit number and follow each combo with a newline. So i'm looking at > generating combinations such as: (12345) , (12235), (4) and so on. > What would be the best way to do this? So, basically

Re: open() and Arabic language

2006-08-13 Thread Simon Forman
MaaSTaaR wrote: > Hello ... > > firstly , sorry for my bad English . > > i have problem with open() function when i use it with file which name > in Arabic , the open() will not find the file , and i am sure the file > is exist . > > > so how i can solve this problem ? On this page http://www.amk.

open() and Arabic language

2006-08-13 Thread MaaSTaaR
Hello ... firstly , sorry for my bad English . i have problem with open() function when i use it with file which name in Arabic , the open() will not find the file , and i am sure the file is exist . so how i can solve this problem ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread Pasi Oja-Nisula
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Tkinter also has a timer-type function called *after*. Use this to call > your init function just befrore the mainloop call. You gui wil show up > and you can then update it to show progress as you wish > No neep for thread or Tix modules.

yet another noob question

2006-08-13 Thread mike_wilson1333
I would like to generate every unique combination of numbers 1-5 in a 5 digit number and follow each combo with a newline. So i'm looking at generating combinations such as: (12345) , (12235), (4) and so on. What would be the best way to do this? So, basically i'm looking for a list of all com

Re: semi-Newbie question

2006-08-13 Thread len
Sample and test code shows you are correct. tpsFile - is really the SQL file I will be inserting new policy records into tagFile - is a CVS file containing all of the information for a new policy in an XMLish fashion (one record per filed of the policy) I will receive from a third party tagIdxFi

Re: Using a dictionary to pass data to/from embedded python functions

2006-08-13 Thread Alex Martelli
Bill Pursell <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > > > I wrote the following file za.c: > > > > > and proceeded to compile and execute as follows: [[Note: it does not > > matter that I'm using 2.5, the code is just as fine with previous > > versions -- it just happens that 2.5 i

Re: reading from sockets

2006-08-13 Thread Simon Forman
AndrewTK wrote: > Simon Forman wrote: > > So I'm guessing it's something wrong in your java server. > > Thanks then. I'll keep testing then... Although I don't seem to have > netcat on my unit... > > I'm using a uni computer so I can't install stuff... but I'm guessing > what I wrote is something l

Re: Kill process based on window name (win32)

2006-08-13 Thread drodrig
I am running the program mentioned below as an NT service on a terminal server. The service listens on a UDP port for any of a series of commands. In this case, the command "closeApps " will notify the service to close all the open apps for user (). So while the code below works great for a standal

Re: Installed correctly

2006-08-13 Thread Rich
(sorry, I accidentally hit "send" before I was finished) Well thanks for all your replies. I've now uninstalled Python, and reinstalled it using the default path (C:\python24), to avoid any complications. But command line still said "unrecognized command", when typing "python". So apparently yo

Re: Installed correctly

2006-08-13 Thread BartlebyScrivener
Rich wrote: >> But command line still says "unrecognized command", You don't say which installer you are using? I know the ActiveState installer puts the python directory in your environment automatically, and I bet the Python.org installer does too. Do you see Python24 in your path? If you get

Re: Installed correctly

2006-08-13 Thread Rich
Well thanks for all your replies. I've now uninstalled Python, and reinstalled it using the default path (C:\pythoh24). But command line still says "unrecognized command", when typng "pythoin". so maybe you have to -- http://mail.python.org/mailman/listinfo/python-list

Re: reading from sockets

2006-08-13 Thread AndrewTK
Simon Forman wrote: > So I'm guessing it's something wrong in your java server. Thanks then. I'll keep testing then... Although I don't seem to have netcat on my unit... I'm using a uni computer so I can't install stuff... but I'm guessing what I wrote is something like a basic-basic thingy that

Re: reading from sockets

2006-08-13 Thread AndrewTK
Simon Forman wrote: > So I'm guessing it's something wrong in your java server. Thanks then. I'll keep testing then... -- http://mail.python.org/mailman/listinfo/python-list

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-13 Thread Jean-Paul Calderone
On 12 Aug 2006 21:59:20 -0700, zxo102 <[EMAIL PROTECTED]> wrote: >Jean-Paul, >I just start to learn Twisted. Here is my simple case: I can find >the data sent by clients in dataReceived but I don't know which >client/which port the data is from. After I know where the data comes >from, I can do

Re: Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread jmdeschamps
Maric Michaud wrote: > Le dimanche 13 août 2006 12:39, Pasi Oja-Nisula a écrit : > > > The question is how (or where) can I call my loadImages function right > > after the mainloop starts? Or is there a better way to do this? > > > Seems a good use case for multi-thread, try something like this : >

Re: Installed correctly

2006-08-13 Thread BartlebyScrivener
Ray wrote: > are there any > problems with this? Apparently, yes ;) >> Do you know how to set up the %PATH% variable in win2k? In case you don't, this is from another thread: Sequence on XP is Start | Control Panel | System | Advanced | Environmental Variables. Then in the lower half of the di

Re: Which KDE IDE for Python?

2006-08-13 Thread Detlev Offenbach
Bart Ogryczak wrote: > > Diez B. Roggisch wrote: >> Bart Ogryczak schrieb: >> > Hi, >> > Rigth now I'm using two IDEs for Python, KDevelop and Eric. Both >> > have drawbacks. KDevelop is a multilanguage IDE, and doesn't really >> > have anything special for Python. There's no Python debugger, no

Re: Installed correctly

2006-08-13 Thread Angelo Zhou
Ray wrote: > > I've just installed Python 2.4.3 on windows 2000. On the download page > it says that if python is installed the version number will be > displayed if you enter "python" in a command line window, but that > does not happen - it just says "unrecognized command". Rebooting does > not

Re: __LINE__ and __FILE__ functionality in Python?

2006-08-13 Thread Maric Michaud
Le dimanche 13 août 2006 14:18, John Machin a écrit : > I don't usually go for one-liners, especially ugly ones like > "inspect.stack()[1][1:3]" but it avoids the risk of hanging on to a > reference to the frame object -- see the warning in the inspect docs. Yes, my mistake, thanks for pointing th

Re: Installed correctly

2006-08-13 Thread John Machin
Ray wrote: > I've just installed Python 2.4.3 on windows 2000. On the download page > it says that if python is installed the version number will be > displayed if you enter "python" in a command line window, but that > does not happen - it just says "unrecognized command". Rebooting does > not he

Installed correctly

2006-08-13 Thread Ray
I've just installed Python 2.4.3 on windows 2000. On the download page it says that if python is installed the version number will be displayed if you enter "python" in a command line window, but that does not happen - it just says "unrecognized command". Rebooting does not help. So is it correc

ERROR "no mem to add parser accelerator"

2006-08-13 Thread John Savage
When I attempt to run the MSDOS version of python I get the error message "no mem to add parser accelerator" and am returned to the DOS prompt. Yet I've been successfully running this python executable for months on this pc and as far as I know I haven't changed anything that could have upset pytho

set_focus_chain in pygtk and wxPython

2006-08-13 Thread egbert
In pygtk is available: set_focus_chain Does wxPython have something similar ? -- Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991 -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] John Salerno

2006-08-13 Thread jason
Alan Connor wrote: > Looks like pretty much all trolls to me. > > Note: I won't be downloading any articles on this thread. > > Alan > Funny how you keep saying that but keep downloading and responding. -- http://mail.python.org/mailman/listinfo/python-list

Re: __LINE__ and __FILE__ functionality in Python?

2006-08-13 Thread Joakim Hove
Maric Michaud <[EMAIL PROTECTED]> writes: > Sure, try : > > In [46]: import inspect > > In [47]: c=inspect.currentframe() > > In [48]: c.f_lineno > Out[48]: 1 > > In [49]: c.f_code.co_filename > Out[49]: '' Thanks a lot - that was just what I wanted. Regards - Joakim -- Joakim Hove hove AT

Re: __LINE__ and __FILE__ functionality in Python?

2006-08-13 Thread John Machin
Joakim Hove wrote: > Hello, > > i have simple[1] function like this: > >def log_msg(msg , file , line): >print "%s:%s %s" % (file,line,msg) > > the file and line arguments should be the filename and linenumber of > the source file where the function is called. If this were C I would >

Re: __LINE__ and __FILE__ functionality in Python?

2006-08-13 Thread Maric Michaud
Le dimanche 13 août 2006 13:31, Joakim Hove a écrit : > Hello, > > i have simple[1] function like this: > >def log_msg(msg , file , line): >print "%s:%s %s" % (file,line,msg) > > the file and line arguments should be the filename and linenumber of > the source file where the function

Re: Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread Maric Michaud
Le dimanche 13 août 2006 12:39, Pasi Oja-Nisula a écrit : > The question is how (or where) can I call my loadImages function right > after the mainloop starts? Or is there a better way to do this? > Seems a good use case for multi-thread, try something like this : In [28]: import Tix In [29]: ma

Re: Using a dictionary to pass data to/from embedded python functions

2006-08-13 Thread Bill Pursell
Alex Martelli wrote: > > I wrote the following file za.c: > and proceeded to compile and execute as follows: [[Note: it does not > matter that I'm using 2.5, the code is just as fine with previous > versions -- it just happens that 2.5 is what I'm using right now in > order to help out with 2.5

__LINE__ and __FILE__ functionality in Python?

2006-08-13 Thread Joakim Hove
Hello, i have simple[1] function like this: def log_msg(msg , file , line): print "%s:%s %s" % (file,line,msg) the file and line arguments should be the filename and linenumber of the source file where the function is called. If this were C I would have used the __FILE__ and __LINE_

Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread Pasi Oja-Nisula
I have written a small image viewer application for sorting out photos downloaded from camera. This was quite easy, thanks to the great Python Imaging Library. Since the loading and thumbnailing phase takes a while at the start of the program, I figured that it would be nice to show the gui and p

Re: trouble with replace

2006-08-13 Thread Anthra Norell
This might well take the trouble out ot the OP's replace: http://cheeseshop.python.org/pypi/SE/2.2%20beta Regards Frederic -- And here is how it works: >>> text = '''defgefabcdefy effwerbyuuuterrfr''' >>> im

Re: keep a list of read and unread items

2006-08-13 Thread Stargaming
Ant schrieb: > a wrote: > > >>i m building an rss reader and i want you suggestions for datastructure >>for keeping read and unread list for each use >>i m assuming it will be very sparse > > > A dictionary for each site seems to be the obvious choice, mapping the > article ID to True or False.

Re: keep a list of read and unread items

2006-08-13 Thread Ant
a wrote: > i m building an rss reader and i want you suggestions for datastructure > for keeping read and unread list for each use > i m assuming it will be very sparse A dictionary for each site seems to be the obvious choice, mapping the article ID to True or False. -- http://mail.python.org

keep a list of read and unread items

2006-08-13 Thread a
keep a list of read and unread items hi guys i m building an rss reader and i want you suggestions for datastructure for keeping read and unread list for each use i m assuming it will be very sparse thanks -- http://mail.python.org/mailman/listinfo/python-list