Re: Very practical question

2006-07-05 Thread Fredrik Lundh
madpython wrote: > Here is a short illustration: > > ... > self.b=Tkinter.Button(root,txt="Button",command=self.doSmth).pack() > self.l=Tkinter.Label(root,txt="default").pack() > def doSmth(self): > var=globals()["m"].__dict__["progLogic"].func("some > input") > self.l.con

Re: mirroring object attributes using xml-rpc

2006-07-05 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > but why can't I get the value of i like this? > > c.i > > How can I implement such behaviour? Not supported by XMLRpc. Switch to Pyro: http://pyro.sourceforge.net --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Error type for shelve.open()

2006-07-05 Thread aomighty
I tried what you said and it looked like maybe AttributeError, but that didn't work either. This code snippet: import shelve from traceback import format_exc try: db = shelve.open("meh", "r") except: print format_exc() Gave me this output: Traceback (most recent call last): File "test.p

Re: Very practical question

2006-07-05 Thread Tim Roberts
"madpython" <[EMAIL PROTECTED]> wrote: >I've been doing an application with Tkinter widgets. Nothing really >fancy just routine stuff. Though I have no problems with it by now I >guess it would be reasonable to ask about a thing that's been bothering >me a bit. Look at this piece of code: > >class

Re: mirroring object attributes using xml-rpc

2006-07-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Then the client code can get the value of i like this: > c = xmlrpclib.ServerProxy("address") > c.geti() > > but why can't I get the value of i like this? > > c.i you can't. the XML-RPC protocol only supports method calls, not attribute accesses. > How can I imple

Re: How can get button's name when cursor move over the button on a web page?

2006-07-05 Thread Fredrik Lundh
尹祥龙 wrote: > How can get button's name when cursor move over the button on a web page? that sounds like a JavaScript question, doesn't it? so what is it doing on comp.lang.python ? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to trap the event of a new process starting with wmi

2006-07-05 Thread gel
gel wrote: > Below is how it is down with vbscript. What is the best way to convert > this to python? > > strComputer = "." > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & > "\root\cimv2") > Set colMonitoredProcesses = objWMIService. _

Re: Installation of python on my workspace.

2006-07-05 Thread Lunpa
[EMAIL PROTECTED] wrote: > Hi, > > I had two questions. I am new to Unix and Python. I wanted to get > python installed on my unix terminal without too much interference from > the administrator. How can I do this? > > It seems python is already installed at some location. But when i type > Idle I

How to trap the event of a new process starting with wmi

2006-07-05 Thread gel
Below is how it is down with vbscript. What is the best way to convert this to python? strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colMonitoredProcesses = objWMIService. _ ExecNotificationQuery("s

Re: EnhancedObject: Yet Another Python ORM (an RFC)

2006-07-05 Thread fumanchu
[EMAIL PROTECTED] wrote: > > So why tell us? What are your ideas? What does your design do that the > > others don't? > > Basically, the API I exemplificated in the first exemple. My initial > idea was to have a way of turn alread designed objects into persistent > ones. This is not the goal of SQL

shoving a [pygame] up your [gtk]!

2006-07-05 Thread Lunpa
My project: I'm working on a game, where in the ui, it takes the pygame window, and shoves it into a gtk2 socket widget. (gtk2 widgets are generated with glade, with the exception of the socket widget, which is manualy added into a window) My problem: Since adding the gtk half, it is realy slow.

Generating multiple lists from one list

2006-07-05 Thread Girish Sahani
hello ppl, Consider a list like ['a.1','b.3','b.4','c.2']. Here 'a','b','c' are objects and 1,3,4,2 are their instance ids and they are unique e.g. a.1 and b.1 cannot exist together. From this list i want to generate multiple lists such that each list must have one and only one instance of every

Re: languages with full unicode support

2006-07-05 Thread Tim Roberts
Dale King <[EMAIL PROTECTED]> wrote: >Tim Roberts wrote: >> "Xah Lee" <[EMAIL PROTECTED]> wrote: >> >>> Languages with Full Unicode Support >>> >>> As far as i know, Java and JavaScript are languages with full, complete >>> unicode support. That is, they allow names to be defined using unicode. >>

Re: Python framework questions

2006-07-05 Thread johnzenger
mp wrote: > Hello, I have a couple general questions. > > First, how do most web frameworks serve html? I'm coding in python and > I want to keep all my html seperate from my python stuff. I can serve > these html files from a mysql database or just from the file system, do > people use both these

How can get button's name when cursor move over the button on a web page?

2006-07-05 Thread 尹祥龙
How can get button's name when cursor move over the button on a web page? -- http://mail.python.org/mailman/listinfo/python-list

Installation of python on my workspace.

2006-07-05 Thread pyguru
Hi, I had two questions. I am new to Unix and Python. I wanted to get python installed on my unix terminal without too much interference from the administrator. How can I do this? It seems python is already installed at some location. But when i type Idle I am not able to get the Integrated Envir

Re: Python framework questions

2006-07-05 Thread Anand
mp wrote: > Hello, I have a couple general questions. > > First, how do most web frameworks serve html? I'm coding in python and > I want to keep all my html seperate from my python stuff. I can serve > these html files from a mysql database or just from the file system, do > people use both thes

Re: Generating multiple lists from one list

2006-07-05 Thread Anand
> p_code = '' > for i,k in enumerate(ks): > p_code += i*' ' + "for item%s in elts['%s']:\n" %(i,k) > p_code += len(ks)*' '+'print ['+','.join([ "item%s" %i > for i,k in enumerate(ks) ])+']' > > # print the code > print p_code > > >for item0 in elts['a']: > > for item1 in elts['b']: > > for

Re: use var to form name of object

2006-07-05 Thread gel
Simon Forman wrote: > gel wrote: > > > > > class testclass: > > import wmi > > import time > > global d_software > > global l_notepad > > global d_licence_numbers > > d_licence_numbers = {"notepad.exe":1, "Adobe":1} > > l_notepad =[] > > d_software = {"notepad.exe

Re: mirroring object attributes using xml-rpc

2006-07-05 Thread sashang
Just to make things clearer the problem I have is if I do this: c = xmlrpclib.ServerProxy("http://somewhere";) c.i I get this error: So how do I fake things so that xmlrpc knows not to try and call i but gets the value of i instead? -- http://mail.python.org/mailman/listinfo/python-list

ANN: M2Crypto 0.16

2006-07-05 Thread Heikki Toivonen
I am happy to announce the M2Crypto 0.16 release. Highlights: - All known memory leaks fixed - All known regressions fixed - Added --openssl option to setup.py which can be used to specify where OpenSSL is installed, by Matt Rodriguez - ECDSA signatures and ECDH key agreement, requires OpenSSL 0

Re: import

2006-07-05 Thread Anand
David Jackson wrote: > Hi all, > > I'm a real beginner with python but have what I think is a simple question. > I am writing some simple modules and would like to place them into a > subdirectory. But then I cannot seem to import them. I have tried the > following. > > I wrote a module called

Re: use var to form name of object

2006-07-05 Thread Simon Forman
gel wrote: > class testclass: > import wmi > import time > global d_software > global l_notepad > global d_licence_numbers > d_licence_numbers = {"notepad.exe":1, "Adobe":1} > l_notepad =[] > d_software = {"notepad.exe":[[],[]], "Adobe":[[],[]]} > Wow! For a se

Re: use var to form name of object

2006-07-05 Thread gel
gel wrote: > Bruno Desthuilliers wrote: > > > gel wrote: > > > gel wrote: > > > > > > > > >>Hi > > >>I would like to pass a variable in and use it as part of a name of an > > >>object, something like below, where I pass the variable software into > > >>the function and use it as part of the name

Re: problems with midi programming in python

2006-07-05 Thread sreekant
Simon Forman wrote: > Not related to your actual question, but note: > >> if len(result) == 0: > > empty lists test as False, so this can just be > >> if not result: > > > > and > >> result[len(result)-1] -= 128 > > you can index lists with negative ints, backwards fro

Re: problems with midi programming in python

2006-07-05 Thread sreekant
Total godsend. Had to reverse the list but now it works perfectly. Not only it solved the problem of longer notes but also that of rests. If you don't terribly mind, during the development of this particular program , I would love to ask for help. If that is ok with you, please reply to sreekan

Virtual Private Servers (was Re: Out of the box database support)

2006-07-05 Thread Aahz
In article <[EMAIL PROTECTED]>, Terry Hancock <[EMAIL PROTECTED]> wrote: > >I sympathize with the shared-hosting problem, that's a major pain. I >would say 'go find a virtual private hosting service', but my batting >average is not so good with actual companies on that. I had one that >was pretty

Re: Error type for shelve.open()

2006-07-05 Thread Simon Forman
[EMAIL PROTECTED] wrote: > I wanted to write the following code: > > import shelve > try: >db = shelve.open(file, "r") > except SomeError: >print "Oh no, db not found" > > Only, I'm not sure what SomeError should be. I tried error, > anydbm.error, shelve.open.anydb.error, etc. but can't fin

Re: problems with midi programming in python

2006-07-05 Thread Simon Forman
Not related to your actual question, but note: > if len(result) == 0: empty lists test as False, so this can just be > if not result: and > result[len(result)-1] -= 128 you can index lists with negative ints, backwards from the end of the list, so this can be >

Re: use var to form name of object

2006-07-05 Thread gel
Bruno Desthuilliers wrote: > gel wrote: > > gel wrote: > > > > > >>Hi > >>I would like to pass a variable in and use it as part of a name of an > >>object, something like below, where I pass the variable software into > >>the function and use it as part of the name of the object so that I can > >>

CLPython

2006-07-05 Thread bearophileHUGS
Just found: http://trac.common-lisp.net/clpython/ Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Built-in Exceptions - How to Find Out Possible Errno's

2006-07-05 Thread Justin Azoff
Gregory Piñero wrote: > Hi Guys, > > I'm sure this is documented somewhere, I just can't locate it. Say I > have this code: > > try: > myfile=file('greg.txt','r') > except IOError, error: [...] > So basically I'm looking for the document that tells me what possible > errors I can catch and t

Re: problems with midi programming in python

2006-07-05 Thread [EMAIL PROTECTED]
sreekant wrote: > Hi folks > > I hope someone here might be able to help. I scavenged some info and > even code from the net and am trying to write a module that reads a text > file and spits out a midi file. > > So far I managed to make it work to the level of reading a text file > with appropriat

Re: [Mailman-Developers] Parsing and Rendering rfc8222

2006-07-05 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jul 5, 2006, at 12:30 AM, Mark Sapiro wrote: > Also there is a related issue if A posts, B replies, A replies off > list > to B, and B replies on list. If threading relies solely on References: > or In-Reply-To:, and either A's or B's MUA generat

Re: [Mailman-Developers] Parsing and Rendering rfc8222

2006-07-05 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jul 4, 2006, at 5:33 PM, Brad Knowles wrote: > Don't ignore non-Python solutions. My main problem with non-Python solutions /as a default for Mailman/ is that it complicates distribution and packaging. It means that we'll have additional depe

Re: [Mailman-Developers] Parsing and Rendering rfc8222

2006-07-05 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jul 4, 2006, at 3:44 PM, emf wrote: > Here's where I'm at, grouped functionally: > > * Need to convert rfc8222 to xml/html > > I haven't found anything substantial via searching. My next step is to > go spelunking in MailManager code and other pyth

mirroring object attributes using xml-rpc

2006-07-05 Thread sashang
Hi Say I have a class like the following class Test: i = 1 def geti(self): return self.i And I use it in an xml-rpc server like this: t = Test() s.register_instance(t) Then the client code can get the value of i like this: c = xmlrpclib.ServerProxy("address") c.geti() but why can't I

Re: [Mailman-Developers] Parsing and Rendering rfc2822

2006-07-05 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jul 5, 2006, at 6:37 PM, emf wrote: >> I seem to >> recall this is also Barry's preference who noted the existing >> pipermail >> was only a stop-gap solution so there would be some default archiver, >> but it was never the intention Mailman woul

Error type for shelve.open()

2006-07-05 Thread aomighty
I wanted to write the following code: import shelve try: db = shelve.open(file, "r") except SomeError: print "Oh no, db not found" Only, I'm not sure what SomeError should be. I tried error, anydbm.error, shelve.open.anydb.error, etc. but can't find it. Things worked fine with simply except

Re: [Mailman-Developers] Parsing and Rendering rfc2822

2006-07-05 Thread emf
John Dennis wrote: > It's not at all clear to me that mailman should be responsible for > archiving. While I am somewhat in agreement, the current situation is that archiving comes bundled with mailman and represents a significant weakness in its current web UI. Not doing anything about the web

how to trace threads ?

2006-07-05 Thread k0mp
Hi, First, sorry for the dumb question. I'm trying to find out how to trace threads. There is a settrace function in the threading module but I can't figure out how to use it. Is there someone who can show me a sample ? Thanks, Kathan -- http://mail.python.org/mailman/listinfo/python-list

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread Steve M
I see you've had success with elementtree, but in case you are still thinking about SAX, here is an approach that might interest you. The idea is basically to turn your program inside-out by writing a standalone function to process one myID node. This function has nothing to do with SAX or parsing

Re: Built-in Exceptions - How to Find Out Possible Errno's

2006-07-05 Thread Mark Peters
A quick test: >>> try: f = open("foo","r") except IOError, error: print errno.errorcode[error.errno] ENOENT It looks to me like your if statement should be as simple as: if error.errno == errno.ENOENT: print os.strerror(error.errno) Mark -- http://mail.python.org/mailman/

Re: cas in python

2006-07-05 Thread ondrej . certik
ginac already has two separate bindings, pyginac and swiginac. O. faulkner wrote: > import ctypes > ctypes.cdll.find('ginac') > > i like designing APIs, and i'm up for learning ctypes, so i'll help > wrap ginac using ctypes. > > [EMAIL PROTECTED] wrote: > > Hello, > > from time to time, people her

problems with midi programming in python

2006-07-05 Thread sreekant
Hi folks I hope someone here might be able to help. I scavenged some info and even code from the net and am trying to write a module that reads a text file and spits out a midi file. So far I managed to make it work to the level of reading a text file with appropriate notes, octaves, transposi

Python framework questions

2006-07-05 Thread mp
Hello, I have a couple general questions. First, how do most web frameworks serve html? I'm coding in python and I want to keep all my html seperate from my python stuff. I can serve these html files from a mysql database or just from the file system, do people use both these options? Are there ot

Re: Built-in Exceptions - How to Find Out Possible Errno's

2006-07-05 Thread Mark Peters
Gregory Piñero wrote: > Thanks Mark, that does help, but what is this errno module? I mean, > does it apply to OSError or to IOError or both? My guess is that the IOError will return the underlying operating system error, but that's just a guess (and no time to dig for the answer right now) Mar

Re: SWIG, C++, and Mac OS X

2006-07-05 Thread nate
why are you modifying your setup.py file? can't you just run: swig -c++ -python exampleFile.i ? have you seen http://www.swig.org/tutorial.html , does it describe something like what you'd like to do? n -- http://mail.python.org/mailman/listinfo/python-list

Re: Built-in Exceptions - How to Find Out Possible Errno's

2006-07-05 Thread Gregory Piñero
Thanks Mark, that does help, but what is this errno module? I mean, does it apply to OSError or to IOError or both? On 5 Jul 2006 14:44:28 -0700, Mark Peters <[EMAIL PROTECTED]> wrote: > > I did find this but it doesn't have numbers and I can't tell if it's > > even what I'm looking for: > > http

Re: Built-in Exceptions - How to Find Out Possible Errno's

2006-07-05 Thread Mark Peters
> I did find this but it doesn't have numbers and I can't tell if it's > even what I'm looking for: > http://docs.python.org/lib/module-errno.html Error number picked at random: >>> import errno >>> print errno.errorcode.keys() [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 2

Built-in Exceptions - How to Find Out Possible Errno's

2006-07-05 Thread Gregory Piñero
Hi Guys, I'm sure this is documented somewhere, I just can't locate it. Say I have this code: try: myfile=file('greg.txt','r') except IOError, error: #now psuedo code because this is what I'm trying to figure out if error.errno=='file doesn't exist':

Re: cas in python

2006-07-05 Thread faulkner
import ctypes ctypes.cdll.find('ginac') i like designing APIs, and i'm up for learning ctypes, so i'll help wrap ginac using ctypes. [EMAIL PROTECTED] wrote: > Hello, > from time to time, people here are asking about the computer algebra > system (cas) in python. I wonder, is there a demand for s

ANN: Intro to Python course, Aug 16-18, San Francisco

2006-07-05 Thread w chun
What: (Intense) Intro to Python When: August 16-18, 2006 Where: San Francisco (SFO/San Bruno), CA, USA Web:http://cyberwebconsulting.com (click "Python Training" link) Need to get up-to-speed with Python as quickly as possible? Come join us in beautiful Northern California for another one

Re: import

2006-07-05 Thread faulkner
that should be __init__.py [TWO underscores]. and you might want to import sys and check sys.path [the list of directories searched by the import mechanism]. David Jackson wrote: > Hi all, > > I'm a real beginner with python but have what I think is a simple question. > I am writing some simple m

Re: Perl Dictionary Convert

2006-07-05 Thread faulkner
data.replace('=', ':').replace(';', ',') then eval in a namespace object whose __getitem__ method returns its argument unchanged. class not_str(str):# take care of that IPF.Contact def __getattr__(self, attr):return self + '.' + attr class not_dict(dict): def __getitem__(self, name):

import

2006-07-05 Thread David Jackson
Hi all, I'm a real beginner with python but have what I think is a simple question. I am writing some simple modules and would like to place them into a subdirectory. But then I cannot seem to import them. I have tried the following. I wrote a module called fibo.py with some definitions in i

Re: Numeric import_array() problem - OS X 10.4

2006-07-05 Thread Paul Miller
Paul Miller wrote: > I had some code that used to work that now doesn't. It's an embedded > Python interpreter that uses numpy internally. The code calls > "import_array()", which now fails (and generates a "ImportError: No > module named _numpy" error). Nevermind - "user error". A recent OS X

Re: Very practical question

2006-07-05 Thread Bruno Desthuilliers
madpython a écrit : > Marc 'BlackJack' Rintsch wrote: > >>In <[EMAIL PROTECTED]>, madpython >>wrote: >> >> >>No it's not the normal way. Why don't you give `c` as argument to the >>`interClassCall()`? >> >>class B(object): >>def interClassCall(self, c): >>print c.a.a() >> >>class C(ob

Re: Module for creating a screenshot of a web page given a URL?

2006-07-05 Thread Rune Strand
[EMAIL PROTECTED] wrote: > Is there a Python module that, given a URL, will grab a screenshot of > the web page it goes to? I'd like to be able to feed such a module a > list of URLs from a file. > > Thanks very much. Not as I know of, but it's easy to write Something like this quasi-code: impor

Perl Dictionary Convert

2006-07-05 Thread Tom Grove
I have a server program that I am writing an interface to and it returns data in a perl dictionary. Is there a nice way to convert this to something useful in Python? Here is some sample data: 200 data follow { Calendar = { Access = { anyone = lr;}; Class = IPF.Appointment; Me

Quick Basic to Python converter

2006-07-05 Thread Vines, John (Civ, ARL/CISD)
Title: Quick Basic to Python converter All,     We have a legacy project which has been written in Quick Basic.  We need to port it to Python.  Are there any converters from Quick Basic to Python Thanks in advance, John Vines ARL MSRC http://www.arl.hpc.mil HPCD, CSEB Scientif

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
OK, I posted my previous message before I saw your reply on how to handle the server side. On the client side, should I use httplib.HTTPConnection.request() to upload the data or can I do this through xmlrpc.ServerProxy objects? Jeremy -- http://mail.python.org/mailman/listinfo/python-list

cas in python

2006-07-05 Thread ondrej . certik
Hello, from time to time, people here are asking about the computer algebra system (cas) in python. I wonder, is there a demand for such a thing? I would be interested in functionality of at least ginac, but something, which could easily be extended. Ginac (pyginac or swiginac) are fine, but it se

Module for creating a screenshot of a web page given a URL?

2006-07-05 Thread dananrg
Is there a Python module that, given a URL, will grab a screenshot of the web page it goes to? I'd like to be able to feed such a module a list of URLs from a file. Thanks very much. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
Fredrik Lundh wrote: > the XML-RPC protocol uses HTTP POST, so if you can handle XML-RPC, you > should be able to handle any POST request. what server are you using ? I need some clarification of your suggestion. Instead of sending URLs, I could read the file as a string, create a Binary object

Re: Very practical question

2006-07-05 Thread madpython
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, madpython > wrote: > > > No it's not the normal way. Why don't you give `c` as argument to the > `interClassCall()`? > > class B(object): > def interClassCall(self, c): > print c.a.a() > > class C(object): > def __init__(sel

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread rajarshi . guha
Stefan Behnel wrote: > [EMAIL PROTECTED] wrote: > > I have an XML file which contains entries of the form: > > > > > > 1 > > 2 > > > > 1 > > Thanks to everybody for the pointers. ElementTree is what I ended up using and my looks like this (based on the ElementTree tutorial code):

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: > Just SimpleXMLRPCServer from the standard library. which means that you should be able to do something like from SimpleXMLRPCServer import SimpleXMLRPCServer,\ SimpleXMLRPCRequestHandler class MyRequestHandler(SimpleXMLRPCRequestHandler): def do_POST(self):

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > I have an XML file which contains entries of the form: > > > 1 > 2 > > 1 > > > Currently, I have written a SAX based handler that will read in all the > entries and return a list of the contents of these > entries. However this is not scalable and for my

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
>What server are you using? Just SimpleXMLRPCServer from the standard library. -- http://mail.python.org/mailman/listinfo/python-list

Re: EnhancedObject: Yet Another Python ORM (an RFC)

2006-07-05 Thread [EMAIL PROTECTED]
> So why tell us? What are your ideas? What does your design do that the > others don't? Basically, the API I exemplificated in the first exemple. My initial idea was to have a way of turn alread designed objects into persistent ones. This is not the goal of SQLObject, for example. Other litle diff

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: > Sorry for such a simple question, but how would I do this? XML-RPC > runs on top of HTTP, so can I do a POST without running a separate HTTP > server? the XML-RPC protocol uses HTTP POST, so if you can handle XML-RPC, you should be able to handle any POST request. what server

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
Fredrik Lundh wrote: >why not just use an ordinary HTTP POST request ? Sorry for such a simple question, but how would I do this? XML-RPC runs on top of HTTP, so can I do a POST without running a separate HTTP server? Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC server-client communication

2006-07-05 Thread Stefka
Hi, thanx for the hint :)! I ran a port scan and it turned out, that the port was realy closed. Thanx again! greetz, Stefka Laszlo Nagy wrote: > Please go to the machine where you php program resides, and check if the > server is not blocked by firewall rules. For example, do > > telnet xxx.xxx

Re: handling unicode data

2006-07-05 Thread Martin v. Löwis
Filipe wrote: > They do, in fact, output different values. The value outputed by > pyscripter was "135" (x87) while the value outputed in the command line > was "216" (xd8). I can't understand why though, because the script > being run is precisely the same on both environments. That's indeed surp

Re: RegEx conditional search and replace

2006-07-05 Thread Juho Schultz
Martin Evans wrote: > Sorry, yet another REGEX question. I've been struggling with trying to get > a regular expression to do the following example in Python: > > Search and replace all instances of "sleeping" with "dead". > > This parrot is sleeping. Really, it is sleeping. > to > This parrot is

Re: Very practical question

2006-07-05 Thread Bruno Desthuilliers
madpython a écrit : > I've been doing an application with Tkinter widgets. Nothing really > fancy just routine stuff. Though I have no problems with it by now I > guess it would be reasonable to ask about a thing that's been bothering > me a bit. Look at this piece of code: > > class A(object): >

Re: Fork You.. Forking and threading..

2006-07-05 Thread Nick Craig-Wood
rh0dium <[EMAIL PROTECTED]> wrote: > I have a problem with putting a job in the background. Here is my > (ugly) script which I am having problems getting to background. There > are threads about doing > > python script.py & > > and others > > nohup python script.py & > > and y

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: > I'm currently implementing an XML-RPC service in Python where binary > data is sent to the server via URLs. However, some clients that need > to access the server may not have access to a web server, and I need to > find a solution. I came up with the idea of embedding a simple

Re: EuroPython 2006 and Py3.0

2006-07-05 Thread bearophileHUGS
Kay Schluehr: > there is nothing really new or interesting or challenging. > Micro-optimizations and shape lifting. I see. Maybe Python is becoming a commodity used by more than 10e6 persons, so changellenges aren't much fit anymore. Guido has tried to avoid the problems of Perl6, making Py3.0 a i

Re: Generating multiple lists from one list

2006-07-05 Thread Pierre Quentel
# first step : build a dictionary mapping the objects # to all possible ids alist = ['a.1','b.3','b.4','c.2','c.6','d.3'] elts = {} for item in alist: obj=item.split('.')[0] if elts.has_key(obj): elts[obj].append(item) else: elts[obj] = [item] # then build the Python c

Re: List Manipulation

2006-07-05 Thread Gerard Flanagan
Dennis Lee Bieber wrote: > On 5 Jul 2006 04:37:46 -0700, "Gerard Flanagan" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > > You can use a class rather than have lists of lists: > > > Are you sure you want to introduce classes into the mix, when simple > basics a

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi, I have an XML file which contains entries of the form: > > > 1 > 2 > > 1 > > > Currently, I have written a SAX based handler that will read in all the > entries and return a list of the contents of these > entries. However this is not scalable and fo

Re: languages with full unicode support

2006-07-05 Thread Dale King
Tim Roberts wrote: > "Xah Lee" <[EMAIL PROTECTED]> wrote: > >> Languages with Full Unicode Support >> >> As far as i know, Java and JavaScript are languages with full, complete >> unicode support. That is, they allow names to be defined using unicode. >> (the JavaScript engine used by FireFox supp

Re: Fork You.. Forking and threading..

2006-07-05 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, rh0dium wrote: > if os.fork() == 0: > os.setsid > sys.stdout = open("/dev/null", 'w') > sys.stdin = open("/dev/null", 'r') I don't know if it's the cause of your problem, but you're not doing the backgrounding right, it should be: if o

iterate over a series of nodes in an XML file

2006-07-05 Thread rajarshi . guha
Hi, I have an XML file which contains entries of the form: 1 2 1 Currently, I have written a SAX based handler that will read in all the entries and return a list of the contents of these entries. However this is not scalable and for my purposes it would be better if I could iterat

Re: EuroPython 2006 and Py3.0

2006-07-05 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > >From this interesting blog entry by Lawrence Oluyede: > http://www.oluyede.org/blog/2006/07/05/europython-day-2/ > and the Py3.0 PEPs, I think the people working on Py3.0 are doing a > good job, I am not expert enough (so I don't post this on the Py3.0 > mailing list),

Re: Very practical question

2006-07-05 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, madpython wrote: > I've been doing an application with Tkinter widgets. Nothing really > fancy just routine stuff. Though I have no problems with it by now I > guess it would be reasonable to ask about a thing that's been bothering > me a bit. Look at this piece of code: >

Re: Very practical question

2006-07-05 Thread Fredrik Lundh
madpython wrote: > What is another way to get data from method of another instance of a > class? Or maybe print globals()['c'].__dict__['a'].a() is perfectly > normal. I'd say it's a fireable offense. -- http://mail.python.org/mailman/listinfo/python-list

XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
I'm currently implementing an XML-RPC service in Python where binary data is sent to the server via URLs. However, some clients that need to access the server may not have access to a web server, and I need to find a solution. I came up with the idea of embedding a simple HTTP server in the XML-R

Re: Fork You.. Forking and threading..

2006-07-05 Thread Grant Edwards
On 2006-07-05, rh0dium <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a problem with putting a job in the background. Here is my > (ugly) script which I am having problems getting to background. There > are threads about doing > > python script.py & > > and others > > nohup python scrip

Fork You.. Forking and threading..

2006-07-05 Thread rh0dium
Hi all, I have a problem with putting a job in the background. Here is my (ugly) script which I am having problems getting to background. There are threads about doing python script.py & and others nohup python script.py & and yet others ( python script.py > /dev/null & ) & R

Very practical question

2006-07-05 Thread madpython
I've been doing an application with Tkinter widgets. Nothing really fancy just routine stuff. Though I have no problems with it by now I guess it would be reasonable to ask about a thing that's been bothering me a bit. Look at this piece of code: class A(object): def a(self): return "a

Re: XML-RPC server-client communication

2006-07-05 Thread Laszlo Nagy
Stefka írta: > Hi all, > > I try to implement a python xml-rpc server and call it from a php > client. If the server and the client are on the same machine > (localhost) the communication between them is just fine. When I start > the server on a different host I don't get an answer. > Please go

XML-RPC server-client communication

2006-07-05 Thread Stefka
Hi all, I try to implement a python xml-rpc server and call it from a php client. If the server and the client are on the same machine (localhost) the communication between them is just fine. When I start the server on a different host I don't get an answer. What is missing there?? I tried also to

Re: EnhancedObject: Yet Another Python ORM (an RFC)

2006-07-05 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote: > I have some ideas about a ORM design, but have no time to start its > development. > I used SQLObject, Django's Model, and looked at SQLAlchemy and Dejavu, > an readed some thread in the last year or so. Wouldn't it be better to try and make the relationel model directly

Re: python list/array question...

2006-07-05 Thread Bruno Desthuilliers
Sybren Stuvel wrote: > Bruno Desthuilliers enlightened us with: > >>Python has lists (which AFAIK really are arrays not linked lists, >>but they are called 'lists'). > > > An array is generally understood as a list of items of the same type, > hence Python lists aren't arrays. A list is general

Re: EnhancedObject: Yet Another Python ORM (an RFC)

2006-07-05 Thread fumanchu
[EMAIL PROTECTED] wrote: > I have some ideas about a ORM design, > but have no time to start its development. So why tell us? What are your ideas? What does your design do that the others don't? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/

SWIG, C++, and Mac OS X

2006-07-05 Thread Siddartha Krishnan
Hi, I'm new to using python and SWIG. I am running Mac OS X 10.4. I have a C++ class which I want to access from python, however I am unable to compile it as a shared module in Mac OS X. I have tried using Distutils and have successfully created a C extension module, however I am unable to

How to save an image created from multiple images?

2006-07-05 Thread Gerald Marie Nelly
Did u get the answer to that question??? To find out more about Reuters visit www.about.reuters.com Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. -- http://mail.python.org/m

  1   2   >