subway code

2007-02-07 Thread Daniel Nogradi
(Somehow this message didn't go through for the first time.) Does anyone know what happened to the subway project? The sites gosubway.org and subway.python-hosting.com have been down for a long time now. Actually, I would like to have the code just to look at it and maybe learn something, but it

Re: winsound/ossaudiodev equivalent on a mac

2007-02-07 Thread Daniel O'Connor
ixer/ I've never used it but I like the idea of cross platform code, makes life a lot simpler for the programmer :) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of t

[Windows] Sending CTRL-C event to console application

2007-02-08 Thread Daniel Clark
I have a Windows command line based application that only shuts down cleanly if it sees "CTRL-C" on the console. I need to automate the running of this application, but still allow the user sitting at the machine to cancel the process cleanly if he/she needs to. In Unix this would be a tiny shell s

Re: Sending CTRL-C event to console application

2007-02-09 Thread Daniel Clark
On Feb 8, 9:12 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 08 Feb 2007 15:54:05 -0300, Daniel Clark <[EMAIL PROTECTED]> > escribió: > > I have a Windows command line based application that only shuts down > > cleanly if it sees "C

Re: Sending CTRL-C event to console application

2007-02-09 Thread Daniel Clark
On Feb 9, 9:12 am, "Daniel Clark" <[EMAIL PROTECTED]> wrote: > I'm going to try taking a different approach by using a GUI Automation > tool like WATSUP [1] or pywinauto[2] next. This works: AutoIT [1] code (compiled to an executable): Run(@ComSpec & ' /k

Re: Segmentation faults using threads

2007-02-13 Thread Daniel Nogradi
re the problem might lie? Hi, it would be helpful if you posted a minimalistic code snippet which showed the problem you describe. Daniel -- http://mail.python.org/mailman/listinfo/python-list

builtin set literal

2007-02-14 Thread Schüle Daniel
Hello, lst = list((1,2,3)) lst = [1,2,3] t = tupel((1,2,3)) t = (1,2,3) s = set((1,2,3)) s = ... it would be nice feature to have builtin literal for set type maybe in P3 .. what about? s = <1,2,3> Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: builtin set literal

2007-02-15 Thread Schüle Daniel
faulkner schrieb: > On Feb 14, 11:55 am, Schüle Daniel <[EMAIL PROTECTED]> wrote: >> Hello, >> >> lst = list((1,2,3)) >> lst = [1,2,3] >> >> t = tupel((1,2,3)) >> t = (1,2,3) >> >> s = set((1,2,3)) >> s = ... >> >

Re: builtin set literal

2007-02-15 Thread Schüle Daniel
Steven Bethard schrieb: > Schüle Daniel wrote: >> Hello, >> >> lst = list((1,2,3)) >> lst = [1,2,3] >> >> t = tupel((1,2,3)) >> t = (1,2,3) >> >> s = set((1,2,3)) >> s = ... >> >> it would be nice feature to have builti

Re: builtin set literal

2007-02-15 Thread Schüle Daniel
ack of any ':' > characters is a pretty quick clue-in. there is one a bigger disadvantage though {} empty set clashes with empty dict {} set() still must be used to generate the empty set or a hack like s = {None}.clear() I think something like {-} as the substitution for empty

Re: KeyboardInterrupt not caught

2007-02-16 Thread Daniel Nogradi
> why is KeyboardInterrupt not caught (xp)? > import sys > try: > inp = sys.stdin.read() > except (KeyboardInterrupt, SystemExit): > print "kbd-interr,SystemExit" > except EOFError: > print "eof encountered" > except: > print "caught all" > self.showtraceback() > print "normal e

Re: Approaches of interprocess communication

2007-02-16 Thread Daniel Nogradi
ufficiently light then pylinda might be an easy-to-use solution: http://www-users.cs.york.ac.uk/~aw/pylinda/ A simple example is here: http://www-users.cs.york.ac.uk/~aw/pylinda/beginner.html HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: builtin set literal

2007-02-16 Thread Schüle Daniel
> {:} for empty dict and {} for empty set don't look too much atrocious > to me. this looks consistent to me -- http://mail.python.org/mailman/listinfo/python-list

Re: Approaches of interprocess communication

2007-02-16 Thread Daniel Nogradi
> About "Linda": Am I right that it looks very similar to "JavaSpaces"? > If yes, are there any funcdamental differences between those two? Yes, they are both linda implementations, but I have no idea what so ever how they compare. A local java expert maybe? -- http://mail.python.org/mailman/list

Re: Reg Google Web Toolkit and Python

2007-02-17 Thread Daniel Nogradi
> > Hi , > > We have a project where I need to read files store > > them in database in the backend.We have done this in > > python.Now we decided to use Ajax technique for user > > interface.For that we found that GWT is one of the > > best toolkits.Now I got a doubt can I interface GWT > > with p

Re: conver string to dictionary

2007-02-18 Thread Daniel Nogradi
"SalutationName":["",255,0,None],"isDefault":["tinyint",1,1,None]} > > please help me what is the best solution(faster solution) for this? If you have simplejson ( http://cheeseshop.python.org/pypi/simplejson ) installed you can do mydict = simple

Re: Getting a class name

2007-02-18 Thread Daniel Klein
On 18 Feb 2007 04:24:47 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: >On Feb 17, 8:33 pm, deelan <[EMAIL PROTECTED]> wrote: >> Harlin Seritt wrote: >> > Hi, >> >> > How does one get the name of a class from within the class code? I >> > tried something like this as a guess: >> >> > self.__name__ >

pylab, integral of sinc function

2007-02-19 Thread Schüle Daniel
better way to do numerical integration in pylab? Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: pylab, integral of sinc function

2007-02-19 Thread Schüle Daniel
my fault In [31]: simple_integral(lambda x:sinc(x/pi), -1000, 1000) Out[31]: 3.14046624406611 -- http://mail.python.org/mailman/listinfo/python-list

Re: pylab, integral of sinc function

2007-02-19 Thread Schüle Daniel
[...] >> In [19]: def simple_integral(func,a,b,dx = 0.001): >> : return sum(map(lambda x:dx*x, func(arange(a,b,dx > > Do you mean > > def simple_integral(func,a,b,dx = 0.001): > return dx * sum(map(func, arange(a,b,dx))) > yes, this should be faster :) -- http://mail.pyth

Re: JIT (just-in-tme accelerator) for Python - exists or no?

2007-02-22 Thread Daniel Nogradi
> Or is any progress going on now? > > The JIT in MATLAB or Java seems to be very effective. This document describes the JIT situation in pypy: http://codespeak.net/pypy/dist/pypy/doc/jit.txt -- http://mail.python.org/mailman/listinfo/python-list

Re: Endianness conversion

2007-02-24 Thread Daniel Harding
n I could use in the standard library, or do I have to > write my own C extension? Try the using the array module. array objects provide a byteswap method which reverses endianness. -Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Help on Dict

2007-02-25 Thread Daniel Nogradi
ject.c?rev=53911&view=markup for the actual implementation. HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

[OT] python notation in new NVIDIA architecture

2007-02-26 Thread Daniel Nogradi
Something funny: The new programming model of NVIDIA GPU's is called CUDA and I've noticed that they use the same __special__ notation for certain things as does python. For instance their modified C language has identifiers such as __device__, __global__, __shared__, etc. Is it a coincidence? Pro

Re: [OT] python notation in new NVIDIA architecture

2007-02-26 Thread Daniel Nogradi
> > Something funny: > > > > The new programming model of NVIDIA GPU's is called CUDA and I've > > noticed that they use the same __special__ notation for certain things > > as does python. For instance their modified C language has identifiers > > such as __device__, __global__, __shared__, etc. I

Re: I don't quite understand this error...

2007-02-26 Thread Daniel Nogradi
t(select.curselection()[0]) raises the exception so your tuple select.curselection() doesn't have a 0th entry which means it's empty. HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: gmpy moving to code.google.com

2007-02-26 Thread Daniel Nogradi
_test__.newdiv 4 tests in gmpy_test_mpz.factorize 1 tests in gmpy_test_rnd 25 tests in gmpy_test_rnd.__test__.rand ** 1 items had failures: 2 of 132 in gmpy_test_mpz.__test__.number 1119 tests in 38 items. 1117 passed and 2 failed. ***Test Failed*** 2 failures. HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: gmpy moving to code.google.com

2007-02-27 Thread Daniel Nogradi
t__.newdiv 134 tests in gmpy_test_mpz.__test__.number 4 tests in gmpy_test_mpz.factorize 1 tests in gmpy_test_rnd 25 tests in gmpy_test_rnd.__test__.rand ** 1 items had failures: 6 of 15 in gmpy_test_dec.__test__.elemop 1107 tests in 37 items. 1101 passed and 6 failed. ***Test Failed*** 6 failures. HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: gmpy moving to code.google.com

2007-02-27 Thread Daniel Nogradi
' if the full unittesting passes or fails respectively. Fedora 3 python 2.5 passpass Fedora 3 python 2.4passfail Fedora 3 python 2.3.4 fail pass Suse 9.3 python 2.4passfail Suse 10 python 2.4.1 passpass Suse 10.2(64bit) python 2.5 passfail The output from each test is zipped and you can grab it from here: http://lorentz.leidenuniv.nl/~nogradi/gmpy_test.zip HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Curious UnboundLocalError Behavior

2007-02-28 Thread Daniel Nogradi
> SOMEGLOBAL = 0 > > print globals() > print "SOMEGLOBAL:",SOMEGLOBAL > > print os.uname() > print sys.version > foo() > Try: import os,sys SOMEGLOBAL=1 def foo(): global SOMEGLOBAL dome=False if dome: SOMEGLOBAL = 0

Re: Question about raise and exceptions.

2007-02-28 Thread Daniel Klein
On Wed, 28 Feb 2007 13:48:54 -0500 (EST), "Steven W. Orr" <[EMAIL PROTECTED]> wrote: >When I run it I get this: > >884 > ./t_fsm.py >Traceback (most recent call last): > File "./t_fsm.py", line 3, in ? > from fsm import * > File "/home/boston/VIASAT/sorr/py/fsm/fsm.py", line 76 > raise

Re: gmpy moving to code.google.com

2007-02-28 Thread Daniel Nogradi
> Could you please tell me, on that 64-bit build, what happens with: > > >>> import gmpy, sys, operator > >>> sys.maxint > ??? > >>> gmpy.mpz(sys.maxint) > ??? > >>> operator.index(gmpy.mpz(sys.maxint)) > ??? > >>> sys.maxint+1 > ??? > >>> gmpy.mpz(sys.maxint+1) > ??? > >>> operator.index(gmpy.mpz(

Re: Question about raise and exceptions.

2007-02-28 Thread Daniel Klein
On Wed, 28 Feb 2007 22:03:13 +0100, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Daniel Klein a écrit : >> The arguments for TransitionError must be a tuple, > >Err... > >> eg: >> >> msg = "Going to error state %d from state %d" % (self.cu

Fwd: gmpy moving to code.google.com

2007-03-01 Thread Daniel Nogradi
> > Could you please tell me, on that 64-bit build, what happens with: > > > >>> importgmpy, sys, operator > > >>> sys.maxint > > ??? > > >>>gmpy.mpz(sys.maxint) > > ??? > > >>> operator.index(gmpy.mpz(sys.maxint)) > > ??? > > >>> sys.maxint+1 > > ??? > > >>>gmpy.mpz(sys.maxint+1) > > ??? > > >>> o

Re: Writing an interpreter for language similar to python!!

2007-03-02 Thread Daniel Nogradi
> I am new to python and working on a project that involves designing a > new language. The grammar of the language is very much inspired from > python as in is supports nearly all the statements and expressions > that are supported by python. Since my project is in initial stage, so > I think it w

Re: why there is no pythonscript insine web browsers?

2007-11-12 Thread Daniel Fetchinson
ortant_file' )". If you want to write your browser client code nevertheless in python you can use pypy [1] to translate it into javascript. This is also what I do and it works pretty well in conjunction with MochiKit [2]. HTH, Daniel [1] http://codespeak.net/pypy/dist/pypy/doc/news.html

Python Nmap Scour sP script for linux

2007-11-27 Thread Daniel Folkes
I made this script for fun. you need to have Nmap installed on your linux computer and it will find all the computers on the network and then run Nmap on it. Hope you enjoy! import os fn = 'i.result' ip = '192.168.1.1-255' ip1 = ip[:3] ips = [] os.system("nmap -sP 192.168.1.1-255 > "+fn) f = o

Python Nmap script linux version

2007-11-28 Thread Daniel Folkes
I made this script for fun. you need to have Nmap installed on your linux computer and it will find all the computers on the network and then run Nmap on it. Hope you enjoy! import os fn = 'i.result' ip = '192.168.1.1-255' ip1 = ip[:3] ips = [] os.system("nmap -sP 192.168.1.1-255 > "+fn) f = ope

setters and getters in python 2.6 and 3.0

2007-11-29 Thread Daniel Fetchinson
Hi list, I've been following a discussion on a new way of defining getters and setters on python-dev and just can't understand what the purpose is. Everybody agreed on the dev list that this is a good idea so I guess it must be right :) The whole thing started with this post of Guido: http://mail

Re: setters and getters in python 2.6 and 3.0

2007-11-29 Thread Daniel Fetchinson
ion. > > > Other, more complex recipes to do the same look like this and are much > harder to grasp: > > > @apply > def my_property() > def fget(self): > return self._value > def fset(self, value): > self._value = value > return property(**locals()) > > So the proposed propset-decorator certainly makes things clearer. > > Diez Aha :) Makes sense indeed. Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Announcing Apydia

2007-11-30 Thread Daniel Fetchinson
formation visit Apydia's web site at http://apydia.ematia.de > and the Apydia Google Group at http://groups.google.com/group/apydia. You might want to fix the typo in the title tag of the webpage. Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Announcing Apydia

2007-11-30 Thread Daniel Haus
http://groups.google.com/group/apydia. -- Daniel Haus http://ematia.de -- http://mail.python.org/mailman/listinfo/python-list

[OT] minimalist web server

2007-12-01 Thread Daniel Fetchinson
e web server should return always the same html document. What would be the best choice for this? The goal is of course to minimize system resources in terms of memory, cpu, etc, etc. Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] minimalist web server

2007-12-01 Thread Daniel Fetchinson
> > I'm looking for the most minimalist web server ever that does nothing > > else than return a fixed static page for every request. Regardless of > > what the request is, it just needs to be an HTTP request to port 80, > > the web server should return always the same html document. What would > >

Re: [OT] minimalist web server

2007-12-01 Thread Daniel Fetchinson
Maybe I found what I'm looking for: cheetah, a web server that is 600 lines of C code and that's it :) http://freshmeat.net/projects/cheetahd/ On 12/1/07, Daniel Fetchinson <[EMAIL PROTECTED]> wrote: > > > I'm looking for the most minimalist web server ever tha

Re: [OT] minimalist web server

2007-12-02 Thread Daniel Fetchinson
> > The reason I need this is that my current best strategy to avoid ads in > > web pages is putting all ad server names into /etc/hosts and stick my > > local ip number next to them (127.0.0.1) so every ad request goes to my > > machine. I run apache which has an empty page for 404 errors so I'll

Re: Announcing Apydia

2007-12-03 Thread Daniel Haus
On 30 Nov., 19:46, "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > You might want to fix the typo in the title tag of the webpage. > > Cheers, > Daniel That one was really hard to find, now I fixed it. Thank you, Daniel! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Daniel Fetchinson
> > Well we Python folks are spoiled but for most people C++ counts as a > > high level language > > Well, some parts are high-level, but it's full of very > deep elevator shafts for you to accidentally fall > into... > > A truly high-level language also *doesn't* have low > level parts (or at leas

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Daniel Fetchinson
On 12/4/07, Daniel Fetchinson <[EMAIL PROTECTED]> wrote: > > > Well we Python folks are spoiled but for most people C++ counts as a > > > high level language > > > > Well, some parts are high-level, but it's full of very > > deep elevator shafts for

Re: contributing to an open source project

2007-12-05 Thread Daniel Fetchinson
anyone can suggest any open source projects python projects that > would be suitable for a beginner, and where mentoring might be an > option, please let me know. Hi, please look at http://wiki.python.org/moin/CodingProjectIdeas Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: How protect proprietary Python code? (bytecode obfuscation?, what better?)

2006-04-18 Thread Daniel Nogradi
> #include > > char code[] = "print 'hello moshe'"; > > void main(...) > { > Py_ExecString(code); > } I don't get this, with python 2.4 there is no function called Py_ExecString in any of the header files. I found something that might do the job PyRun_SimpleString( ) in pythonrun.h, but could

Re: How protect proprietary Python code? (bytecode obfuscation?, what better?)

2006-04-18 Thread Daniel Nogradi
> #include > > char secret_code[] = "print 'moshe'"; > > int main() > { > return PyRun_SimpleString(secret_code); > } > > and you need to link with python24.lib or whatever the object file is > for your platform. Are you sure? On a linux platform I tried linking with libpython2.4.so (I assume

Re: How protect proprietary Python code? (bytecode obfuscation?, what better?)

2006-04-18 Thread Daniel Nogradi
> >> char secret_code[] = "print 'moshe'"; > >> > >> int main() > >> { > >> return PyRun_SimpleString(secret_code); > >> } > >> > >> and you need to link with python24.lib or whatever the object file is > >> for your platform. > > > > Are you sure? On a linux platform I tried linking with libpy

Re: items in an array

2006-04-19 Thread Daniel Nogradi
> I am working on a project in which I generate an array of values > (list_array). I need to use the values in this array to create list > similar to the one below: > > list_array = [] > list = item1,item2,itemN... > > I am having difficulty in getting the values out of the original array. >

Re: Confused by Python and nested scoping (2.4.3)

2006-04-19 Thread Schüle Daniel
y it you can do it for global namespace or local but not inbetween val = 0 def outer(): val = 10 def inner(): global val val = 30 inner() print val outer() 10 # outer val is not changed print val # global is modified 30 hth, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: how to transfer a python object to other computer?

2006-04-20 Thread Daniel Nogradi
> Hey, all.Now I wanna to transfer a object to other computer, Maybe I > could serialize the object to a file by pickle moudle, then send the file > and get it from the file.But I think the efficency is awful, because the > disk io is very slow. > Someone could do me a favor to give me som

Re: Python IDE for linux

2006-04-20 Thread Daniel Nogradi
On 4/20/06, Fulvio <[EMAIL PROTECTED]> wrote: > Alle 09:43, giovedì 20 aprile 2006, Neil Isaac ha scritto: > > At this point I'm thinking that I would like to start using a real IDE. > Idle, shipped with Python :-) > > F > -- > http://mail.python.org/mailman/listinfo/python-list > And there is als

Re: python application ideas.

2006-04-25 Thread Daniel Nogradi
> Hello, I know this isn't really a python centric question, but I'm seeking > help from my fellow python programmers. I've been learning python for the > past year and a half, and I still haven't written anything substantial nor > have I found an existing project which blows my hair back. Python i

can someone explain why ..

2006-04-25 Thread Schüle Daniel
I don't understand what is the difference between commented lines 1 and 2 with 1 uncommented and 2 commented it works as expected with 1 commented and 2 uncommented the picture doesn't appear here is my code #!/usr/bin/env python from Tkinter import * from Tkconstants import * root = None cla

Re: can someone explain why ..

2006-04-25 Thread Schüle Daniel
Farshid Lashkari schrieb: > Schüle Daniel wrote: >> I don't understand what is the difference between commented lines >> 1 and 2 >> >> with 1 uncommented and 2 commented it works as expected >> with 1 commented and 2 uncommented the picture doesn't appear

Re: can someone explain why ..

2006-04-25 Thread Schüle Daniel
[..] > These are the only lines of code that reference "imageLabel": > > imageLabel = Label(master = frame1, image = image) > imageLabel.pack() > > > Unless the constructor of Label adds a reference of itself to frame1, > imageLabel will also become garbage collected at the end of the > const

can this be done without eval/exec?

2006-04-26 Thread Schüle Daniel
da:i) ... >>> lst[0]() 9 >>> i 9 >>> I think I understand where the problem comes from lambda:i seems not to be fully evalutated it just binds object with name i and not the value of i thus lst[0]() is not 0 are there other solutions to this problem without use of eval or exec? Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: can this be done without eval/exec?

2006-04-26 Thread Schüle Daniel
>>> def a(): ... global cnt ... tmp = cnt ... def b(): ... return tmp ... cnt += 1 ... return b ... >>> lst=[] >>> for i in range(10): ... lst.append(a()) ... >>> lst[0]() 0 >>> lst[1]() 1 >>> Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: can this be done without eval/exec?

2006-04-27 Thread Schüle Daniel
Kent Johnson schrieb: > Schüle Daniel wrote: >> and now the obvious one (as I thought at first) >> >> >>> lst=[] >> >>> for i in range(10): >> ... lst.append(lambda:i) >> ... >> >>> lst[0]() >> 9 >> &g

Re: setting file permissions on a web server

2006-04-30 Thread Daniel Nogradi
> I always read about how you need to set certain file permissions (for > cgi files, for example), but it's never been clear to me *how* you do > this. I know you can run the line > > chmod 755 scriptname.py > > but *where* do you run this? Is this done on your personal system, or on > the server?

Re: Converting tuple to String

2006-04-30 Thread Daniel Nogradi
> Is their a command to convert a tuple to string? e.g. > > xyz = "Hello", "There" > print xyz > > Is their any way of getting print to see xyz as being one string i.e. > "Hello There" rather than "Hello" and "There", despite "Hello" and > "There" being, in reality, seperate? Try one_big_string =

Re: setting file permissions on a web server

2006-04-30 Thread Daniel Nogradi
> > In short, chmod refers to local files so wherever you run it it will > > refer to files on that machine. You run it simply by typing it in a > > shell as a user who has privilage to perform the operatation, which > > can mean you have to be an owner of the file but if you are root you > > can d

[ANN] markup.py 1.3 - an HTML and XML writer

2006-05-01 Thread Daniel Nogradi
The new 1.3 release of markup.py is available from http://markup.sourceforge.net/ The markup module attempts to make it easier to output HTML or XML from a python program without cluttering your code with tags in a simple and flexible way. Changes * improved documentation * function added t

Re: [ANN] markup.py 1.3 - an HTML and XML writer

2006-05-01 Thread Daniel Nogradi
> The new 1.3 release of markup.py is available from > > http://markup.sourceforge.net/ > > The markup module attempts to make it easier to output HTML or XML > from a python program without cluttering your code with tags in a > simple and flexible way. > > Changes > > * improved documentation >

Re: how to do with the multi-frame GIF

2006-05-01 Thread Daniel Nogradi
> how to do with the multi-frame GIF, I used the PIL ,but it seems not > support? The source distribution of the 1.1.4 version comes with a Scripts directory where you can find player.py, gifmaker.py and explode.py which all deal with animated gif. I don't know if they work with version 1.1.5 thou

Re: How do I take a directory name from a given dir?

2006-05-01 Thread Daniel Nogradi
> Hi, > > I am trying to write a script to backup all my company's server configs > weekly. The script will run in a cronjob, on whatever I set it. > > The issue I am currently having isto "extract" the directory name from > a given directory string. For example: from the string > "/home/testuser/p

[ANN] markup.py 1.4 - bugfix

2006-05-01 Thread Daniel Nogradi
I'm terribly sorry but there was a crucial bug left in the 1.3 release announced today. Thanks to a user now it's fixed, and the new 1.4 release is available on http://markup.sourceforge.net/ which should be okay. Sorry for the inconvenience :) -- http://mail.python.org/mailman/listinfo/python-li

Re: Mod_python.publisher behavior - sending .py file tobrowser not processing it in pyton

2006-05-04 Thread Daniel Nogradi
> > As Graham pointed out SetHandler and AddHandler should not be used at > > the same time. "SetHandler mod_python" causes all files to be served > > by mod_python and when you refer to them in your browser you don't > > need to specify any extension such as .py and "AddHandler mod_python > > .py"

Re: Tuple assignment and generators?

2006-05-05 Thread Daniel Nogradi
> > Given this though, what other such beauties are lurking in the > > interpreter, under the name of 'implementation accidents'? One of the > > things that drew me to python is the claimed consistency and > > orthogonality of both language and implementation, not sacrificing > > clarity for perfor

Re: Tuple assignment and generators?

2006-05-05 Thread Daniel Nogradi
> > I was just at a point when I thought I learned something but got > > confused again after trying the following and unfortunately didn't > > find an answer in the docs. > > > a = 10 > b = 10 > id(a) > > 134536516 > id(b) > > 134536516 > > > > So the two memory addesses are th

Re: pythoncode in matlab

2006-05-12 Thread Daniel Klünder
Hi Sven, I don't have Matlab on my computer so the following is just a wild guess: As far as I know you can include C code into Matlab or at least into Simulink. Maybe you could try to execute your Python script in that C code? Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: How to tell if function was passed a list or a string?

2006-05-18 Thread Daniel Nogradi
> > >>> import types > > >>> type("") is types.ListType > > False > > >>> type("") is types.StringType > > True > > >>> type([]) is types.StringType > > False > > >>> type([]) is types.ListType > > True > > This is even worse than an 'isinstance' check; it refuses even > subclasses of the types you

getattr for modules not classes

2006-05-21 Thread Daniel Nogradi
Is there something analogous to __getattr__ for modules? I know how to create a class that has attributes from a list and nothing else by overloading __getattr__ and making sure that the accessed attribute appears in my list. Now I would like to do the same with a module, say x.py, in which I have

Re: getattr for modules not classes

2006-05-22 Thread Daniel Nogradi
> > Is there something analogous to __getattr__ for modules? > > > > I know how to create a class that has attributes from a list and > > nothing else by overloading __getattr__ and making sure that the > > accessed attribute appears in my list. Now I would like to do the same > > with a module, sa

Re: [OT] minimalist web server

2007-12-31 Thread Daniel Fetchinson
e to minimize system > > resources in terms of memory, cpu, etc, etc. > > > > Cheers, > > Daniel I've written a *really* minimalistic web server that only serves blank pages. It's not python but C, if anyone interested: http://code.google.com/p/kwakd Happy new year to every python lover! -- http://mail.python.org/mailman/listinfo/python-list

Pickle problem

2008-01-02 Thread Daniel Cuschieri
rth can I solve this!? Rebuilding the tree every time is dumb! I'm sure there is a work around somehow, but I honestly don't have a clue as to what this might be! Any ideas please!? I'm totally lost and stuck! Thanks! Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Python web aps - A matter of security

2008-01-05 Thread Daniel Fetchinson
Python modules? Are there other > security issues I should heed? > > Many thanks, > > Lloyd Are you using any of the many available web frameworks like turbogears, django, etc? If so your best option is probably to use the authentication/authorization capabilities of these framework

Re: Newbie question: Classes

2008-01-08 Thread Daniel Fetchinson
> Basically, I have created a program using tkinter without using any class > structure, simply creating widgets and functions (and finding ways around > passing variables from function to function, using global variables etc). > The program has become rather large ( lines?) I am trying to now put

user friendly datetime features

2008-01-08 Thread Daniel Fetchinson
Many times a more user friendly date format is convenient than the pure date and time. For example for a date that is yesterday I would like to see "yesterday" instead of the date itself. And for a date that was 2 days ago I would like to see "2 days ago" but for something that was 4 days ago I wou

Re: Natural-language datetime parsing and display (was: user friendly datetime features)

2008-01-09 Thread Daniel Fetchinson
#x27;ll take a look at roundup. Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Natural-language datetime parsing and display

2008-01-09 Thread Daniel Fetchinson
ning in my original post too. Actually it looks like the one included in roundup is a stand alone library for display (but not parsing). It's released under the same license as python itself maybe they can be convinced to release it as a stand alone module to the cheeseshop. Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess "handle is invalid" error

2008-01-10 Thread Daniel Serodio
Thomas Heller-2 wrote: > > Grant Edwards schrieb: > > [snip] > >> >> Traceback (most recent call last): >> File "surfedit.py", line 28, in ? >> File "Gnuplot\_Gnuplot.pyc", line 178, in __init__ >> File "Gnuplot\gp_win32.pyc", line 117, in __init__ >> File "subprocess.pyc",

Re: __init__ explanation please

2008-01-12 Thread Daniel Fetchinson
st And you would use your class like so, p1 = Person( 'John', 'Smith' ) p2 = Person( "Some long fake name that you don't really want to except, I don't know if it's really longer than 50 but let's assume it is", "Smith" ) # This last one

Re: __init__ explanation please

2008-01-13 Thread Daniel Fetchinson
n't know if it's really longer than 50 but let's assume it > > is", "Smith" ) > > # This last one would raise an exception so you know that something is not > > okay > > > > HTH, > > Daniel > > Is not the code run when I creat

What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Daniel Folkes
Thanks in advance for the help. -Daniel Folkes -- http://mail.python.org/mailman/listinfo/python-list

Re: Why the HELL has nobody answered my question !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2008-01-30 Thread Daniel Fetchinson
> I do not understand why no one has answered the following question: > > Has anybody worked with Gene Expression Programming Hm, maybe because nobody did? Just a thought. It can also be that everyone worked with it but everyone is part of a big conspiracy not to answer any of your emails

Re: Has Anyone Worked with Gene Expression Programming ???????????????????????????

2008-01-30 Thread Daniel Fetchinson
>> To Anyone, > > > > > > > > Has anyone worked with Gene Expression Programming??? Specifically, has > > anyone out there worked with pygep software package??? I have a few > > questions > > > > > > David Blubaugh > > -- Actually, it turns out I might say I'm a world known expert of Gene

dict comprehension

2008-01-31 Thread Daniel Fetchinson
Hi folks, There is a withdrawn PEP about a new syntax for dict comprehension: http://www.python.org/dev/peps/pep-0274/ which says: "Substantially all of its benefits were subsumed by generator expressions coupled with the dict() constructor." What does the author mean here? What's the Preferably

Re: dict comprehension

2008-01-31 Thread Daniel Fetchinson
> > Hi folks, > > > > There is a withdrawn PEP about a new syntax for dict comprehension: > > http://www.python.org/dev/peps/pep-0274/ which says: > > > > "Substantially all of its benefits were subsumed by generator > > expressions coupled with the dict() constructor." > > > > What does the author

Re: Python Standardization: Wikipedia entry

2008-02-01 Thread Daniel Fetchinson
> Depends entirely on the operative meaning of standardized. Formal > standards body? Obviously no. > > Specified in a standard-setting document? Yes. In fact, in someways, > Python is better standardized that C, for instance, in that the Python > standard usefully standardizes some things that t

GUI definition for web and desktop

2008-02-02 Thread Daniel Fetchinson
rom a text file. But it should be cross platform between linux and windows. What would be the best way to do this? Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI definition for web and desktop

2008-02-03 Thread Daniel Fetchinson
> >> >> > I'm looking for a simple text based GUI definition format and > >> > >> [...] > >> > I believe Glade produces XML descriptions of its interfaces, so wxGlade > >> >> would be one possible starting-point. > >> >> > >> > > >> > Glade does, but dont confuse it with wxGlade. wxGlad

Re: GUI definition for web and desktop

2008-02-03 Thread Daniel Fetchinson
dow? If this was possible then maybe this would solve all my problems. Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI definition for web and desktop

2008-02-03 Thread Daniel Fetchinson
> > I'm looking for a simple text based GUI definition format and > > associated python modules to work with it that is capable of defining > > simple GUI's for *both* the web and the desktop. I have an application > > that is accessible through the web and also through desktop > > applications and

Re: GUI definition for web and desktop

2008-02-03 Thread Daniel Fetchinson
> http://docs.python.org/lib/module-webbrowser.html > > > > is there a GUI toolkit library for python which can render html? > > At least GTK comes with libgtkhtml, but I bet there are others, too. > > http://www.fcoutant.freesurf.fr/python-gtkhtml.html Thanks a lot! Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

<    6   7   8   9   10   11   12   13   14   15   >