Re: Database recommendations for Windows app

2005-06-22 Thread Dan
Take a look at Firebird. It can be run in embedded mode. It might be overkill for your needs though... On 6/22/2005 10:37 AM, Gregory Piñero wrote: > I always figured a problem with using MySQL was distribution. Would > you have to tell your users to install MySQL and then to leave the > servi

Re: Database recommendations for Windows app

2005-06-22 Thread Dan
On 6/22/2005 11:38 AM, Thomas Bartkus wrote: > Will McGugan" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Hi, >> >>I'd like to write a windows app that accesses a locally stored database. >>There are a number of tables, the largest of which has 455,905 records. >> >>Can anyone

Re: Database recommendations for Windows app

2005-06-22 Thread Dan
On 6/22/2005 1:14 PM, Dave Cook wrote: > On 2005-06-22, Cameron Laird <[EMAIL PROTECTED]> wrote: > > >>Are you saying that Python-based applications are particularly >>vulnerable in this all-too-common scenario? If so, I'm not >>getting it; why is the architecture described more fragile than >>m

Re: create a pdf file

2005-06-22 Thread Dan
On 6/22/2005 1:58 PM, Alberto Vera wrote: > Hello: > > I found a script that convert a file to PDF format , but it was made in PHP > > Do you know any script using Python? > > Regards See http://www.reportlab.org/rl_toolkit.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Database recommendations for Windows app

2005-06-23 Thread Dan
On 6/22/2005 3:08 PM, Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, Dan <[EMAIL PROTECTED]> wrote: > >>On 6/22/2005 1:14 PM, Dave Cook wrote: >> >>>On 2005-06-22, Cameron Laird <[EMAIL PROTECTED]> wrote: >>> >>> >>

Re: Database recommendations for Windows app

2005-06-23 Thread Dan
On 6/22/2005 9:51 PM, Peter Hansen wrote: > Will McGugan wrote: > >> Thanks for the replies. I think I'm going to go with sqllite for now. > > > Your list didn't mention a few things that might be critical. > Referential integrity? Type checking? SQLite currently supports > neither. Just ma

Re: How do you program in Python?

2005-07-06 Thread Dan
On 7/6/2005 5:38 AM, Jorgen Grahn wrote: > On Sun, 03 Jul 2005 17:35:16 +0100, anthonyberet <[EMAIL PROTECTED]> wrote: > ... > >>What I would really like is something like an old-style BASIC >>interpreter, in which I could list, modify and test-run sections of > You probably want to check out

import Help Needed - Newbie

2005-07-07 Thread Dan
ort odbchelper Traceback (most recent call last): File "", line 1, in ImportError: No module named odbchelper I am thinking this has something to do with the PATH that Python traverses to find code to load as a module. I would greatly appreciate it if you could help me get t

Re: import Help Needed - Newbie

2005-07-08 Thread Dan
code on a network drive so is this why I can't import it as a module? Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Packages and modules

2005-07-26 Thread Dan
> > no executable code in > > __init__.py is executed, even though "import test" seems to succeed. I've discovered that "import test" *does* cause executable code in the package to be executed. However, I can't execute it on the command line using "python test". Is there a way to do this? > There

Re: [OT] Problems with permissions etc

2005-07-27 Thread Dan
> 2. I am using wxPython, which was compiled from source. Maybe you had a good reason to install from source. But if you didn't, I suggest using a sys-admin's convenience tool, such as "apt". Both will probably succeed, a sys-admin tool will manage dependencies for you and will be easier to upgrad

Re: Create a variable "on the fly"

2005-07-27 Thread Dan
> make_variable('OSCAR', 'the grouch'); > print OSCAR; Try using "setattr". (It's in __builtins__; you don't have to import anything.) >>> print setattr.__doc__ setattr(object, name, value) Set a named attribute on an object; setattr(x, 'y', v) is equivalent to ``x.y = v''. -- If builders b

MESSAGE NOT DELIVERED: Returned mail: Data format error

2005-07-27 Thread dan
Your message could not be delivered. The User is out of space. Please try to send your message again at a later time. -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing arguments to function - (The fundamentals are confusing me)

2005-08-09 Thread Dan
> Does that mean Python functions aren't always byref, > but are sometimes byval for nonmutables? Don't think of it as byref or byval (as they are used in Visual Basic). All parameters are passed the same way: by reference instead of by copy. It's a little difficult to get your head around, but

Re: What are modules really for?

2005-08-10 Thread Dan
> Functions existing in a module? Surely if "everything is an object" (OK > thats Java-talk but supposedly Python will eventually follow this too) > then there should be nothing in a module thats not part of a class. No, it's a bit the other way around. In Python, functions are objects: >>> d

Re: searching a list of dictionaries for an element in a list.

2005-08-10 Thread Dan
> I want to search list1, and the result should be all dictionaries where > primarycolor is in input. I can do this using a double for-loop, but is > there a more efficent way? Of course.:-) L = [dict for dict in list1 if dict['primarycolor'] in input] In older versions of Python, we would u

Re: Regular expression to match a #

2005-08-11 Thread Dan
> My (probably to naive) approach is: p = re.compile(r'\b#include\b) I think your problem is the \b at the beginning. \b matches a word break (defined as \w\W or \W\w). There would only be a word break before the # if the preceding character were a \w (that is, [A-Za-z0-9_], and maybe some other c

Re: Writing a small battleship game server in Python

2005-08-11 Thread Dan
> The server should accept connections from new players and be able to handle > multiple games concurrently. Multiple threads would be the way to go for a real application. But if you want to avoid the complexity involved in threading and synchronization in this exercize, you can avoid threads by

Re: __getattribute__ for class object

2005-08-12 Thread Dan
> > but if i want to have a __getattribute__ for class attributes > > Read something on metaclasses. Depending on what you want to do, it might be better to use properties instead: class Meta(type): x = property(lambda klass: 'Called for '+str(klass)) class Foo(object): __metaclass

Re: __del__ pattern?

2005-08-16 Thread Dan
> What does "default" mean, and is that definition in conflict with what I > said? The docs say it means INADDR_ANY. someSocket.bind(('', somePort)) means accept connections from any machine. (We use INADDR_ANY instead of '' in C.) someSocket.bind(('localhost', somePort)) means accept only conne

String functions deprication

2005-08-16 Thread Dan
> http://www.python.org/doc/2.4.1/lib/node110.html > > These methods are being deprecated. What are they being replaced > with? They're being made methods of the string class itself. For example: >>> s = 'any old string' >>> string.split(s, ' ') # Old way ['any', 'old', 'string'] >>>

PyXML and xml.dom

2005-08-17 Thread Dan
I'm writing a Python program that does some XML parsing, though nothing heavy, and I want to avoid requiring the user to install additional libraries like PyXML. The documentation for my version of Python (2.3.5) mentions PyXML as an additional library while discussing the DOM module

Re: strptime() doesn't recognize BST as a valid timezone

2005-09-16 Thread Dan
> I get: "ValueError: time data did not match format: ..." I'm running Linux in London, and I don't get that error. Python 2.3.5 (#2, May 29 2005, 00:34:43) [GCC 3.3.6 (Debian 1:3.3.6-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> date_str

Re: are variables local only to try/except blocks?

2005-09-20 Thread Dan
> try: >try: > doSomething1 > excp = 0 >except: > excp = 1 >#endTry Note that you can use "else" after "except" for precisely this purpose: try: foo() except: print 'Exception raised' else: print 'No exception raised' -- Optimism is the faith that leads

Re: Python GUIs

2005-09-21 Thread Dan
> B='\x12','\x32' > B[0]='\x12' > > I cannot get this to work, "B" is a tuple, which means it can't be assigned to. Try this: B=['\x12','\x32'] -- Do I know what's in this bill? Are you kidding? Only God knows... - U.S. Senator Robert Byrd, when asked if he knew the contents of

Re: best solution to for loop

2005-09-22 Thread Dan
> Hi, I have several apps which connect to a database, fetch some data > an put this into a gtk.TreeStore, but if the result set is 1500 row > long, the app response slowly The first thing to test is whether it's Python or the database that's the bottleneck. 1500 rows isn't all that much for a da

Re: How to tell if an exception has been caught ( from inside the exception )?

2005-09-22 Thread Dan
If the exception isn't caught, it is printed to standard error. This means that either __str__ or __repr__ is called (to convert it to a displayable string). If the exception is caught, those methods *probably* won't be called. -- Where you are is not as important as where you are going.

Re: Open PDF

2005-09-22 Thread Dan
> I would like to know how to open a PDF document from a python script You mean open it and display it to the user? Under Windows you may be able to get away with just "executing" the file (as though it were an executable): import os os.system("c:/path/to/file.pdf") Under Linux you can proba

Re: Redirecting ./configure --prefix

2004-12-13 Thread Dan
Dave Reed wrote: LD_LIBRARY_PATH=/some/private/dir/lib; export LD_LIBRARY_PATH LD_LIBRARY_PATH does the trick, and sys.path seems okay by default. Thanks! /Dan -- dedded att verizon dott net -- http://mail.python.org/mailman/listinfo/python-list

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-14 Thread Dan
real2m44.131s 2.3.3: real2m29.865s /Dan -- dedded att verizon dott net -- http://mail.python.org/mailman/listinfo/python-list

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-15 Thread Dan
Skip Montanaro wrote: Dan> I also see an 8-10% speed decrease in 2.4 (I built) from 2.3.3 Dan> (shipped w/Fedora2) in the program I'm writing (best of 3 trials Dan> each). Memory use seems to be about the same. How do you how the compiler flags were the same if you didn&

Re: Python vs. Perl

2004-12-15 Thread Dan
with. I'm not a programmer, I'm an engineer who infrequently needs to write a small program. So, I write something, and then find that I need to modify it or write something new six months later. I invariably forget everything I know about Perl in six months. I've been "learn

Redirecting ./configure --prefix

2004-12-14 Thread Dan
at directory is not being searched. So, I have these questions: - Can I get Python to search /some/private/dir/lib for library files? - Will sys.path be okay? How can I make it okay? - Is there anything else I need to worry about? Any help would be appreciated. Thanks, Dan -- ded

Re: BASIC vs Python

2004-12-17 Thread Dan
so it must have been added between then and 1985 when I encountered it. /Dan -- dedded att verizon dott net -- http://mail.python.org/mailman/listinfo/python-list

Sockets

2005-04-07 Thread Dan
nt to tell it the length, it stops when it gets the end of string character (null). The only way I can see around it is to encode the data, but this is really just an inelegant hack. Any suggestions? Python is still new to me and I can't say that I've mastered all its nua

Re: Sockets

2005-04-07 Thread Dan
a Python string. Is there an easy way to convert it? Thanks Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Sockets

2005-04-07 Thread Dan
On Fri, 08 Apr 2005 03:06:38 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >Nope. You're thinking of C strings. Python strings aren't >terminated with a null. Yes, that make sense. Thanks for the input, and the note on struct. Dan -- http://mail.python.org/mailman/listinfo/python-list

Can't Stop Process On Windows

2005-04-11 Thread Dan
board interrupt. Is there some way around this? Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't Stop Process On Windows

2005-04-13 Thread Dan
m no timeout to one second. Thanks Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Compute pi to base 12 using Python?

2005-04-13 Thread Dan
On 13 Apr 2005 12:06:26 -0400, [EMAIL PROTECTED] (Roy Smith) wrote: >Scott David Daniels <[EMAIL PROTECTED]> wrote: >>If you think those are fun, try base (1j - 1) > >Get real. I can't imagine using anything so complex. Well said. :-) Dan -- http://mail.python.o

Re: Compute pi to base 12 using Python?

2005-04-13 Thread Dan
s of pi to the base 12? Dan -- http://mail.python.org/mailman/listinfo/python-list

Inelegant

2005-04-14 Thread Dan
() if SomeCondition: MyString = """ The quick brown fox """ print MyString But that's just ugly. It seems to me that the string should be interpreted with the edge along the indentation line, not from the start of the line. But that would probably create other problems. Dan -- http://mail.python.org/mailman/listinfo/python-list

Apache mod_python

2005-04-17 Thread Dan
. I've also noted that there's still work being done on it. Thanks. Dan -- http://mail.python.org/mailman/listinfo/python-list

Strings

2005-04-21 Thread Dan
g. I'm sure what I'm doing is long and convoluted. Any suggestions would be appreciated. Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: New line

2005-04-21 Thread Dan
On Thu, 21 Apr 2005 21:34:03 +0100, "ionic" <[EMAIL PROTECTED]> wrote: Open a text editor and write your code. Save the file with a .py extension, i.e., myprogram.py. From the command line type 'python myfile.py' Dan > >Ok sorry guys, > >using the pytho

Re: Strings

2005-04-21 Thread Dan
On Thu, 21 Apr 2005 10:09:59 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: Thanks, that's exactly what I wanted. Easy when you know how. Dan >Dan wrote: >> I've having trouble coming to grip with Python strings. >> >> I need to send binary data over

re: how to stop python

2006-07-30 Thread Dan
fh = file("myfile.txt") If the file doesn't exist, and you don't catch the exception, you get something like this: $ ./foo.py Traceback (most recent call last): File "./foo.py", line 3, in ? fh = file("myfile.txt") IOError: [Errno 2] No such file or directory: 'myfile.txt' /Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs. Linux

2006-07-31 Thread Dan
n (that I could find) that ran on VMS was V1.4. I decided to stick with Perl, which provides excellent support for VMS. Now that I no longer need to worry about VMS, I prefer Python. Quite a bit. /Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs. Linux

2006-08-01 Thread Dan
Edmond Dantes wrote: > Dan wrote: > >> But taken out of that context, I'll challenge it. I was first exposed >> to Python about five or six years ago--my boss asked me to consider it. >> What I found was that the current version of Python was V2.2, but newest >&g

md5 question

2006-08-03 Thread Dan
611296a827abf8c47804d7', and later create a new md5 object such that when I did md5_w.update(" world") it would then have the hex value '3e25960a79dbc69b674cd4ec67a72c62'. Is that possible? I've looked for initialization options in the documentation and searched c.l.p., but no luck. -Dan -- http://mail.python.org/mailman/listinfo/python-list

Question on try/except

2006-08-07 Thread Dan
exception and immediately re-raising it? Why catch it at all? /Dan -- dedded att verizon dott net -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter module not found

2006-08-08 Thread Dan
e you mentioned Gentoo, which builds from source, maybe you have a similar issue. Although you'd think there'd be some dependency checking in your package system that would catch it. Like I said, this is just a wild guess. /Dan -- dedded att verizon dott net -- http://mail.python.org/mailman/listinfo/python-list

Re: Global Objects...

2006-08-16 Thread Dan
KraftDiner wrote: > I have a question.. > > myGlobalDictionary = dictionary() > > > class someClass: >def __init__(self): > self.x = 0; >def getValue(self, v) > myGlobalDictionary.getVal(v) > > > myGlobalDictionary doesn't seem to be visible to my someClass methods. > Why?

Re: capture video from camera

2006-06-08 Thread dan
of his knowledge. He does himself, and the group in general, an injustice by the intolerance of his response. With best wishes, Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: capture video from camera

2006-06-09 Thread dan
K.S.Sreeram wrote: > dan wrote: > > I hope you won't be deterred from posting further questions to the > > group by Fredrik's somewhat terse and unfriendly reply. > > > > comp.lang.python is a forum generally noted for its pleasing admixture > >

Allowing ref counting to close file items bad style?

2006-08-29 Thread Dan
my data safer if I explicitly close, like this?: fileptr = open("the.file", "w") foo_obj.write(fileptr) fileptr.close() I understand that the upcoming 'with' statement will obviate this question, but how about without 'with'? /Dan -- dedded a

Re: Allowing ref counting to close file items bad style?

2006-08-29 Thread Dan
Paul Rubin wrote: > Dan <[EMAIL PROTECTED]> writes: >> Is this discouraged?: >> >> for line in open(filename): >> > > Yes. Well, not what I wanted to hear, but what I expected. Thanks, Dan -- dedded att verizon dott net -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing ref counting to close file items bad style?

2006-08-31 Thread Dan
BJörn Lindqvist wrote: > On 8/30/06, Dan <[EMAIL PROTECTED]> wrote: >> Is my data safer if I explicitly close, like this?: >> fileptr = open("the.file", "w") >> foo_obj.write(fileptr) >> fileptr.close() > > Have you ever ex

Re: utf - string translation

2006-11-22 Thread Dan
Thank you for your answers. In fact, I'm getting start with Python. I was looking for transform a text through elementary cryptographic processes (Vigenère). The initial text is in a file, and my system is under UTF-8 by default (Ubuntu) -- http://mail.python.org/mailman/listinfo/python-list

Re: utf - string translation

2006-11-26 Thread Dan
On 22 nov, 22:59, "John Machin" <[EMAIL PROTECTED]> wrote: > > processes (Vigenère) > So why do you want to strip off accents? The history of communication > has several examples of significant difference in meaning caused by > minute differences in punctuation or accents including one of which yo

Re: Some general questions about using "stdin","stdout"....

2006-02-16 Thread Dan
Hello. If you're new to Python, then input/output isn't the best place to start. Begin with the tutorial: http://docs.python.org/tut/tut.html Other documentation is also linked to from there. However, I will briefly answer your questions. > print "hello"|sys.stdin.read() In Python the | ope

Creating Files

2005-05-04 Thread Dan
I know how to open a system file with Python, but is there some way to create one if it's not there? Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Mod_python

2005-05-04 Thread Dan
rkill. With cherrypy you can build a web application with a built in web server. It might be worth a look, it's reasonably easy to use. Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating Files

2005-05-04 Thread Dan
On Wed, 04 May 2005 10:24:23 +0200, bruno modulix <[EMAIL PROTECTED]> wrote: >As in any other language I know : just open it in write mode !-) Easy when you know how. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Sockets

2005-05-05 Thread Dan
e on the right track. Any solution that I use should be applicable on Linux and Windows platforms. Thanks Dan -- http://mail.python.org/mailman/listinfo/python-list

Controlling source IP address within urllib2

2005-06-03 Thread Dan
because there will be redirects and other HTTP-type functions to implement. It would be nice if I could create (and bind) sockets myself and then tell the urllib functions to use those sockets. Perhaps there is some sort of "back-door" way of doing this??? Any hints are appreciated! -Dan

Re: Controlling source IP address within urllib2

2005-06-06 Thread Dan
again for your help. -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling source IP address within urllib2

2005-06-08 Thread Dan
don't get to use the source IP address I wanted to use. I'll keep trying and let you know what I find. -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling source IP address within urllib2

2005-06-09 Thread Dan
d() function to nail down the source IP address of the client.) Of course, I had to weave in some code that allowed me to pass the client IP address through the URLopener class in the urllib library. Everything seems to work so far. John, thanks again for your help. You pointed me in the ri

Callback scoping

2007-07-05 Thread Dan
0>, at 0x00C28730>, at 0x00C286F0>, at 0x00C287F0>] >>> x[0]() 9 >>> x[5]() 9 >>> x[9]() 9 >>> ind 9 >>> ind = 2 >>> x[0]() 2 >>> But, I'm wondering what is the easiest (and/or most pythonic) way to get the behavior I want

re compiled object result caching?

2007-08-29 Thread Dan
ntation I think you would either have to do the search even if unlikely_condition is False, or you would have to do an annoying nested if. Is there another way to achieve this that I'm not thinking of? -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-01 Thread dan
dvances in computer science you describe are legally derivative of someone's function that adds 42 to its argument, your legal system is fucked. Redo from start. -dan -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-03 Thread dan
portion of scripture containing mystical potentialities." Perhaps the young people you're referring to are not the same young people that I know, because I've never even heard of a religion whose object of reverence is meta-level analysis of language. Tell me, do you know what "

Re: using regular express to analyze lisp code

2007-10-04 Thread Dan
cal context-sensitive algorithm. Now, many regex libraries have *some* not-purely-regular features, but I doubt your going to find anything to match parens in a single regex. If you want to go all out you can use a parser generator (for python parser generators, see http://python.fyxm.net/topics/par

Re: How can Python print the value of an attribute but complain it does not exist?

2007-10-10 Thread Dan
/beMH > > I'm using Python 2.4 on Debian GNU/Linux. > > Any ideas about how to fix this error message? > > Regards, > > -- > Emre Sevinc This is a bit of a guess, but prehaps the file has a blank line, so the first url is fine, but the second (non-existant) url doesn't have a title. You can test this by doing: > for feedurl in file('feedlist1-2.txt'): >if feedurl.strip(): > title = getwordcounts(feedurl) -Dan -- http://mail.python.org/mailman/listinfo/python-list

optparse help output

2007-10-24 Thread Dan
ow what you're doing. exp_cmd -- add an experiment for strataman. Is there any way to get the formatting I want? -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse help output

2007-10-24 Thread Dan
-tkc Thanks, Tim! That was incredibly helpful. I did alter it to format paragraphs, but maintain the double newlines. Also, I made a few changes to work with the 2.3 version of optparse. Posted below for anyone who might want it. (Also to work as a standalone .py file) -Dan # From Tim Chase v

Re: renice

2007-10-26 Thread Dan
e Python - python-list mailing list archive at Nabble.com. On UNIX: >>> import os >>> os.system("renice -n %d %d" % ( new_nice, os.getpid() ) ) (untested) I don't know if windows has the concept of renice... -Dan -- http://mail.python.org/mailman/listinfo/python-list

xml.dom.minidom memory usage

2007-02-01 Thread Dan
ing all my 90% of my memory, and the system ends up thrashing (Linux, P4, 1G ram, python 2.4.3) . So, my questions are (1) am I doing something dumb in the script that stops python from collecting temp garbage? (2) If not, is there another reasonable module to generate xml (as opposed to parsing it), or

Re: xml.dom.minidom memory usage

2007-02-01 Thread Dan
On Feb 1, 3:12 pm, Jonathan Curran <[EMAIL PROTECTED]> wrote: > Dan, > The DOM (Document Object Model) is such that it loads all the > elements of the > XML document into memory before you can do anything with it. With your file > containing millions of child node

Re: How do I change elements in a list?

2007-11-06 Thread Dan
>>> first = [1,2] >>> second = first >>> for i in range(len(first)): first[i] += 1 >>> first [2, 3] >>> second [2, 3] -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: is it possible to install 2 Python versions on windows XP ?

2007-12-17 Thread Dan
Stef Mientki I'm currently running 2.3 and 2.5 on the same XP system with no problems. As I remember the installs didn't effect each other at all. -Dan -- http://mail.python.org/mailman/listinfo/python-list

sybase open client 15_0

2006-05-25 Thread Dan
I have compiled and installed sybase-.037 , the module to add sybase to python. However, when I try to use it I get Import error: /usr/local/lib/python2.3/site-packages/sybasect.so undefined symbol: cs_dt_info I've seen some posts on the internet with other people having this issue. But nothi

Re: sybase open client 15_0

2006-05-25 Thread Dan
I'm running SLES 9.3 on Tyan with 2 single core 64-bit Opteron & 8 GB of memory and SWAP. OCS-15_0 sybperl-2.18 python 2.3.5 "Dan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have compiled and installed sybase-.037 , the module to add sybase t

Re: Interesting Thread Gotcha

2008-01-15 Thread Dan
The unblock is a routine that unblocks a port using fcntl - it > is not the problem. In case you don't believe me, here it is: > > def unblock(f): > """Given file 'f', sets its unblock flag to true.""" > > fcntl.fcntl(f.fil

Re: Interesting Thread Gotcha

2008-01-16 Thread Dan
On Jan 16, 11:06 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Dan" wrote: > > >> >>> keyboard_thread = thread.start_new_thread(kbd_driver (port_q,kbd_q)) > > >> Needs to be > >

Re: Interesting Thread Gotcha

2008-01-16 Thread Dan
On Jan 16, 1:33 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Dan schrieb: > > > > > On Jan 16, 11:06 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> Hendrik van Rooyen wrote: > >>> "Dan" wr

Re: How to manipulate elements of a list in a single line of code?

2008-02-25 Thread Dan
7;a', 'b', 'c'] > 2 list2 = [] > 3 for item in list1: list2.append(item + 'foo') > > Is there a way to express lines 2-3 sort-of ilke this: > > list2 = [ for item in list1: item + 'foo' ] > > Any ideas? > > Thanks, > --Steve You're so close. >>> list2 = [ item+"foo" for item in list1 ] -Dan -- http://mail.python.org/mailman/listinfo/python-list

Python 3 and my Mac (Leopard)

2008-12-24 Thread Dan
Are there any resources out there? Is the python community just not interested in Macs? I've tried googling and the usual search strategies. Any help would be appreciated. DAN -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any way to find out the definition of a function in a file of C language?

2009-04-16 Thread Dan
you rule, just for your sig... Zork in all forms ftw namekuseijin wrote: Jebel escreveu: Hi ,everyone. I have the name of a function of C language, and have the source file which the function is defined in. And I want to find out the type and name of the parameters. If I need to analyze the fi

Re: ask for a RE pattern to match TABLE in html

2008-06-27 Thread Dan
en if you could, it would be highly impractical to match parentheses using those. So, yeah, to match arbitrary nested delimiters, you need a real context free parser. > > -- > David C. Ullrich -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: For_loops hurt my brain.

2008-07-16 Thread Dan
r key,value in zip_dict.items(): zFile = zipfile.ZipFile("c:/%s.zip" % key, 'w') for fname in value: zFile.write(fname, os.path.basename(files), zipfile.ZIP_DEFLATED) zFile.close() # End untested code. This implicitly maps thing with the key foo to the zip file c:/ foo.zip, but if you want to be more general, I would suggest thinking about making a class. -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: interpreter vs. compiled

2008-07-18 Thread Dan
instructions (bytecode) of the virtual machine are generally more high-level than real machine instructions, and the semantics of the bytecode are implemented by the interpreter, usually in a sort-of high level language like C. This means the interpreter can run without detailed knowledge of the machine as long as a C compiler exists. However, the trade off is that the interpreter semantics are not optimized for that machine. This all gets a little more hairy when you start talking about JITs, runtime optimizations, and the like. For a real in-depth look at the general topic of interpretation and virtual machines, I'd recommend Virtual Machines by Smith and Nair (ISBN:1-55860910-5). -Dan -- http://mail.python.org/mailman/listinfo/python-list

Regex on a huge text

2008-08-22 Thread Dan
I'm looking on how to apply a regex on a pretty huge input text (a file that's a couple of gigabytes). I found finditer which would return results iteratively which is good but it looks like I still need to send a string which would be bigger than my RAM. Is there a way to apply a regex directly on

Re: Python one-liner??

2008-08-22 Thread Dan
On Fri, Aug 22, 2008 at 4:13 PM, Wojtek Walczak <[EMAIL PROTECTED]> wrote: > -c? > -- > http://mail.python.org/mailman/listinfo/python-list > Yup. Stands for command python -c "print 'Hello World!'" Hello World! -- http://mail.python.org/mailman/listinfo/python-list

Should Python raise a warning for mutable default arguments?

2008-08-22 Thread Dan
> Further, the tutorial is the first link on the python for programmers page, > and on the non-programmers page it's the last link, so presumably any > non-programmer continuing on is pointed to the next step. > > ... so as to emphasized enough, how more? > > Emile In my experience, the problem i

Re: Is there no end to Python?

2006-03-18 Thread dan
...unless you are relying on a library or module that uses them...;-) cheers, Dan -- http://mail.python.org/mailman/listinfo/python-list

COM Client / Server creation?

2006-03-22 Thread Dan
implemented to receive the events. Each new client that calls register should be tracked in the server so that all of the clients receive the event. I have done this very easiliy with traditional programming languages but don't reall know where to start here. Dan -- http://mail.python.org/mailman/lis

Re: COM Client / Server creation?

2006-03-22 Thread Dan
Ive got the chapter from the net on COM. It looks pretty old, 2000. Also the very first example in the chapter on COM doesn't seem to work. Is what I am wanting to do possible with Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: COM Client / Server creation?

2006-03-23 Thread Dan
ill do not know if it will be sufficient to my purposes. It looks like a very powerful scripting language. Dan -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >