Re: import cx_Oracle fails!

2005-05-25 Thread Daniel
Hi Bernard My system is a PA 8K series with 4096 MB and 2 processors, running 64 bit mode OS. I only created the recipe above after 1 week of mistakes :-), but I don't know if it will work with your branch of patches @ 11.23 version. I really hate HP-UX -(, god bless BSD!!! :-D --

Changing entities

2005-06-08 Thread Daniel
Hello all I need to build a program that check the sintax in a line: SIZE (1 BYTE) and change the correct number of bytes to the following format: SIZE(1) without the BYTE word. But, the number of bytes can be over 3 digits, and the entitie can't have spaces but the correct number of bytes in

Re: Changing entities

2005-06-09 Thread Daniel
Hi Kent Thanks for your help, it worked sucessfully. I have another question, I think it is a stupid and simple but... I need match a regular expression, change it erasing the other strings after this. Just like: a = I'm going send to out of space, find another race And I want to match space

Re: Changing entities

2005-06-10 Thread Daniel
Hi Kent This isn't work with the following line: FieldGraphic56::= GraphicString EBCDIC BC= SIZE (56 BYTES) byter = re.compile(r'SIZE \((\d+) BYTE\)') s = 'SIZE (1 BYTE)' byter.sub(r'SIZE(\1)', s) 'SIZE(1)' byter.sub(r'SIZE(\1)', line) 'FieldGraphic56::= GraphicString

import cx_Oracle fails!

2005-05-18 Thread Daniel
Hello from Brazil :-) I'm trying to bring cx_Oracle alive on my Python 2.4.1 @ HP-UX 11 (suckz) and Oracle 10.1.0 64bits without success I've already tryied the suggestions from Bernard Delmée and Martin v. Löwis (topic Python 2.3b1 + cx_oracle 3.0 on HP-UX), but it didn't work, even when I

Re: import cx_Oracle fails!

2005-05-19 Thread Daniel
Yes dude, it worked! :-) Thank you very much (Muito obrigado!!!) -- http://mail.python.org/mailman/listinfo/python-list

Re: import cx_Oracle fails!

2005-05-19 Thread Daniel
And, completing my answer, I'm sending you all how I finally got the Python 2.4.1 and cx_Oracle-4.1 running on my HP-UX (sukz) box: Box: HP-UX B.11.11 Compiling Python 2.4.1 with gcc 3.4.3 = ./configure --with-libs='-lcl' Added Makefile options: CC=

Parsing tuple from string?

2008-04-23 Thread Daniel
(\(['\](.*)['\], ['\](.*)['\]\), string) which works well enough for my purposes (even though I know it's far from proper), except that it only captures as 2-tuples, and I need to be able to capture n-tuples. Can someone help point me to the correct re or a better way to solve this? Thanks in advance, Daniel

Re: Parsing tuple from string?

2008-04-23 Thread Daniel
On Apr 23, 4:22 pm, George Sakkis [EMAIL PROTECTED] wrote: On Apr 23, 6:24 pm, Daniel [EMAIL PROTECTED] wrote: I have a list of strings, which I need to convert into tuples. If the string is not in python tuple format (i.e. ('one', 'two'), (one, 'two'), etc.), then I can just make it a 1

Re: starting a Python 2.5 executable without the DOS window

2009-02-27 Thread Daniel
On Feb 27, 8:19 am, Vlastimil Brom vlastimil.b...@gmail.com wrote: 2009/2/27 Greg Miller et1ssgmil...@gmail.com: I am working on a program that controls a piece of equipment.  The GUI/ control software is written with Python2.5/wxPython.  I would like to know if there is a way of

problem with ImportError: No module named... and sockets

2008-09-30 Thread Daniel
Hello, I'm trying to build a very simple IPC system. What I have done is create Data Transfer Objects (DTO) for each item I'd like to send across the wire. I am serializing these using cPickle. I've also tried using pickle (instead of cPickle), but I get the same response. Below is the code.

Re: problem with ImportError: No module named... and sockets

2008-09-30 Thread Daniel
On Sep 30, 4:17 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 30 Sep 2008 18:38:19 -0300, Daniel [EMAIL PROTECTED]   escribió: [BEGIN CODE] #!/usr/bin/python import SocketServer import os, sys newpath = os.path.normpath( os.path.join( __file__, ../../.. )) sys.path.insert

Re: problem with ImportError: No module named... and sockets

2008-10-01 Thread Daniel
On Sep 30, 5:49 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 30 Sep 2008 19:44:51 -0300, Daniel [EMAIL PROTECTED]   escribió: On Sep 30, 4:17 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 30 Sep 2008 18:38:19 -0300, Daniel [EMAIL PROTECTED]   escribió: [BEGIN

problem with sockets code

2008-10-02 Thread Daniel
Hello, I can't seem to get my sockets code to work right. Here is what I have inside my RequestHandler handle() function: total_data=[] data = True logger_server.debug(self.__class__.__name__ + ' set data = True') while data:

Re: windows help files ?

2008-10-02 Thread Daniel
the same mechanism on all platforms. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Sample code required to validate a xml file against XSD

2008-10-02 Thread Daniel
it helps. Daniel -- http://mail.python.org/mailman/listinfo/python-list

How to send Data Transfer Objects across the network?

2008-10-02 Thread Daniel
the transaction. Thanks in advance... Daniel -- http://mail.python.org/mailman/listinfo/python-list

Python syntax question

2008-10-08 Thread Daniel
I hope this question is OK for this list. I've downloaded Rpyc and placed it in my site packages dir. On some machines it works fine, on others not so much. Here is one error I get when I try to import it: import Rpyc Traceback (most recent call last): File stdin, line 1, in module File

Re: Python syntax question

2008-10-08 Thread Daniel
On Oct 8, 12:07 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Wed, 08 Oct 2008 11:02:49 -0700, Daniel wrote: Here is one error I get when I try to import it: import Rpyc Traceback (most recent call last):   File stdin, line 1, in module   File C:\Python25\lib\site-packages

Re: Python syntax question

2008-10-13 Thread Daniel
- From: Daniel [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 08, 2008 3:11 PM To: [EMAIL PROTECTED] Subject: Re: Python syntax question On Oct 8, 12:07 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Wed, 08 Oct 2008 11:02:49 -0700, Daniel wrote: Here is one error I get when I try

Python logging and ThreadingTCPServer

2008-10-17 Thread Daniel
strange characters and space. Sometimes it seems that the first process never is able to write to the log file after the second process starts writing. Is this a known issue/bug? Are there any known workarounds? Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Interface to Matlab

2008-10-17 Thread Daniel
Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Interface to Matlab

2008-10-22 Thread Daniel
On Oct 17, 2:26 pm, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], Daniel wrote: Have you looked at http://www.scipy.org/ andhttp://matplotlib.sourceforge.net/ They do an awful lot of what matlab does. This one http

Re: Pretty Printing Like Tidy for HTML

2007-07-07 Thread Daniel
On Sat, 07 Jul 2007 21:35:40 +0300, David [EMAIL PROTECTED] wrote: All, Is there a pretty printing utility for Python, something like Tidy for HTML? That will change: xp=self.uleft[0]+percentx*(self.xwidth) To: xp = self.uleft[0] + percentx * (self.xwidth) And

Re: What is the most efficient way to test for False in a list?

2007-07-08 Thread Daniel
On Mon, 09 Jul 2007 06:21:31 +0300, Simon Forman [EMAIL PROTECTED] wrote: On Jul 8, 7:43 pm, lex [EMAIL PROTECTED] wrote: Of course there is the always the iteration method: list = [1, True, True, False, False, True] status = True for each in list: status = status and each but

Re: bool behavior in Python 3000?

2007-07-10 Thread Daniel
Do you care to explain what is broken? My preference would be for the arithmetic operations *,+,- to be given the standard interpretation for a two element boolean algebra: http://en.wikipedia.org/wiki/Two-element_Boolean_algebra If I understand this right, the biggest difference from

Re: Getting values out of a CSV

2007-07-12 Thread Daniel
On Fri, 13 Jul 2007 05:59:53 +0300, [EMAIL PROTECTED] wrote: How do I access the value in the second row in the first position of a CSV? Or the 3rd row, in the fifth position? a,b,c,d,e,f,g,h,i j,k,l,m,n,o,p,q,r r,s,t,v,w,x,y,z I'd want to get at j and w. I know I can do import csv

Re: Getting values out of a CSV

2007-07-13 Thread Daniel
On Fri, 13 Jul 2007 08:51:25 +0300, Gabriel Genellina [EMAIL PROTECTED] wrote: data = [row for row in csv.reader(open('some.csv', 'rb')) Note that every time you see [x for x in ...] with no condition, you can write list(...) instead - more clear, and faster. data =

Re: Getting values out of a CSV

2007-07-13 Thread Daniel
Note that every time you see [x for x in ...] with no condition, you can write list(...) instead - more clear, and faster. data = list(csv.reader(open('some.csv', 'rb'))) Faster? No. List Comprehensions are faster. [EMAIL PROTECTED] pdfps $ python -m timeit -c 'data =

Re: Getting values out of a CSV

2007-07-13 Thread Daniel
On Fri, 13 Jul 2007 16:18:38 +0300, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: $ python -m timeit -c 'import csv; data = list(csv.reader(open(some.csv, rb)))' 1 loops, best of 3: 44 usec per loop $ python -m timeit -c 'import csv; data = [row for row in

Re: NoneType object not iterable

2007-07-13 Thread Daniel
On Fri, 13 Jul 2007 20:44:13 +0300, [EMAIL PROTECTED] wrote: Hi! My code is db = {} def display(): keyList = db.keys() sortedList = keyList.sort() for name in sortedList: line = 'Name: %s, Number: %s' % (name, db[name]) print line.replace('\r', '')

Re: NoneType object not iterable

2007-07-13 Thread Daniel
On Fri, 13 Jul 2007 21:13:20 +0300, Bjoern Schliessmann [EMAIL PROTECTED] wrote: Daniel wrote: db is out of scope, you have to pass it to the function: What's wrong about module attributes? I made a mistake -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic method

2007-07-16 Thread Daniel
(object): ... def __call__(self, inst): ... print self, inst ... class Foo(object): ... pass ... fun = MyCallable() f = Foo() f.fun = types.MethodType(fun, f, Foo) f.fun() __main__.MyCallable object at 0x648d0 __main__.Foo object at 0x64810 ~ Daniel -- http://mail.python.org

Re: a=0100; print a ; 64 how to reverse this?

2007-07-17 Thread Daniel
On Tue, 17 Jul 2007 14:09:35 +0300, mosi [EMAIL PROTECTED] wrote: Problem: how to get binary from integer and vice versa? The simplest way I know is: a = 0100 a 64 but: a = 100 (I want binary number) does not work that way. a.__hex__ exists a.__oct__ exists but where is

Re: a=0100; print a ; 64 how to reverse this?

2007-07-17 Thread Daniel
On Tue, 17 Jul 2007 14:09:35 +0300, mosi [EMAIL PROTECTED] wrote: Problem: how to get binary from integer and vice versa? The simplest way I know is: a = 0100 a 64 Also that is not binary - that is octal, binary would be: '0100' (denoted as a string, since 0100 in octal is

Re: a=0100; print a ; 64 how to reverse this?

2007-07-17 Thread Daniel
On Tue, 17 Jul 2007 21:22:03 +0300, Wildemar Wildenburger [EMAIL PROTECTED] wrote: Bruno Desthuilliers wrote: mosi a écrit : Problem: how to get binary from integer and vice versa? [snip] What`s the simplest way to do this? [EMAIL PROTECTED]:~$ python Python 2.5.1 (r251:54863, May

Re: accessing javascript variables within psp code

2007-07-17 Thread Daniel
On Wed, 18 Jul 2007 04:29:27 +0300, BAnderton [EMAIL PROTECTED] wrote: Hello all, Question: Is there any way to access a javascript variable from within psp code? I'm aware of how to do the reverse of this (js_var='%=psp_var%'). Here's a non-working example of what I'm trying to do:

Re: Sort lines in a text file

2007-07-22 Thread Daniel
On Sun, 22 Jul 2007 06:03:17 +0300, leegold [EMAIL PROTECTED] wrote: say I have a text file: zz3 uaa4a ss 7 uu zz 3 66 ppazz9 a0zz0 I want to sort the text file. I want the key to be the number after the two zz. Or I guess a string of two zz then a numberSo that's

Re: Sort lines in a text file

2007-07-22 Thread Daniel
On Sun, 22 Jul 2007 06:03:17 +0300, leegold [EMAIL PROTECTED] wrote: say I have a text file: zz3 uaa4a ss 7 uu zz 3 66 ppazz9 a0zz0 I want to sort the text file. I want the key to be the number after the two zz. Or I guess a string of two zz then a numberSo that's

Re: Why PHP is so much more popular for web-development

2007-07-25 Thread Daniel
On Wed, 25 Jul 2007 20:42:54 +0300, walterbyrd [EMAIL PROTECTED] wrote: I'm fairly new to web-development, and I'm trying out different technologies. Some people wonder why PHP is so popular, when the language is flawed in so many ways. To me, it's obvious: it's because it's much easier to

How to simulate packages?

2008-08-21 Thread Daniel
(os.path.dirname(__file__).split('\\') [:len(os.path.dirname(__file__).split('\\'))-1]) + \\ + dir) Any and all suggestions appreciated. Thanks in advance. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: How to simulate packages?

2008-08-21 Thread Daniel
On Aug 21, 12:26 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 21 Aug 2008 13:04:51 -0300, Daniel [EMAIL PROTECTED]   escribi : I have a project that I've decided to split into packages in order to organize my code better.  So what I have looks something like this src

Re: How to simulate packages?

2008-08-21 Thread Daniel
On Aug 21, 2:22 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Daniel a écrit : Hello, I have a project that I've decided to split into packages in order to organize my code better.  So what I have looks something like this src   -module1     -mod1_file.py   -module2

Enhanced property decorator

2008-08-25 Thread Daniel
namespace. (3) doc string appears in a more natural place, before getter/setter/ delter logic, as in classes and functions. Cons: difficult to implement? Of course, more error checking would be necessary if any these enhancements were added to the standard library. Thoughts? ~ Daniel -- http

Re: Enhanced property decorator

2008-08-25 Thread Daniel
Hmm, interesting. I wonder if it suppports setting the doc-string in a similar way? I'll have to look into that. Thanks for pointing this out. ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

Python and database unittests

2008-08-26 Thread Daniel
have found http://qualitylabs.org/pdbseed/, which helps with unittests for a live database. This isn't what I'm after. Does anyone know about a module that acts as a database stub for python unittests? Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and database unittests

2008-08-26 Thread Daniel
with the MySQL database is different than the sqlite portion. Thanks again, Daniel On Aug 26, 4:12 pm, gordyt [EMAIL PROTECTED] wrote: Daniel I don't know if it would work for your situation or not, but if you are using Python 2.5, you could use the now built-in sqlite3 module.  If you didn't even

problem with packages and path

2008-08-27 Thread Daniel
, sys newpath = os.path.normpath( os.path.join( __file__, ../../ )) sys.path.append(newpath) I still get the same error. Can someone please point me in the right direction? Thanks in advance: Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with packages and path

2008-08-27 Thread Daniel
On Aug 27, 11:00 am, Paul Boddie [EMAIL PROTECTED] wrote: On 27 Aug, 18:44, Daniel [EMAIL PROTECTED] wrote: I'm writing some unit tests for my python software which uses packages.  Here is the basic structure: mypackage [...]   unittests     __init__.py     alltests.py

Re: problem with packages and path

2008-08-27 Thread Daniel
On Aug 27, 11:00 am, Paul Boddie [EMAIL PROTECTED] wrote: On 27 Aug, 18:44, Daniel [EMAIL PROTECTED] wrote: I'm writing some unit tests for my python software which uses packages.  Here is the basic structure: mypackage [...]   unittests     __init__.py     alltests.py

Re: problem with packages and path

2008-08-29 Thread Daniel
On Aug 28, 2:28 am, Marco Bizzarri [EMAIL PROTECTED] wrote: On Wed, Aug 27, 2008 at 6:44 PM, Daniel [EMAIL PROTECTED] wrote: Hello, I'm writing some unit tests for my python software which uses packages.  Here is the basic structure: mypackage  __init__.py  module1    __init__.py

Re: When to use try and except?

2008-08-29 Thread Daniel
On Aug 29, 11:23 am, cnb [EMAIL PROTECTED] wrote: If I get zero division error it is obv a poor solution to do try and except since it can be solved with an if-clause. However if a program runs out of memory I should just let it crash right? Because if not then I'd have to write exceptions

Re: problem with packages and path

2008-08-29 Thread Daniel
On Aug 29, 1:15 pm, Paul Boddie [EMAIL PROTECTED] wrote: On 29 Aug, 19:08, Daniel [EMAIL PROTECTED] wrote: I have tried running both commands above from the mypackage directory and unittests directory.  I get the following response universtally. C:\mypackagedir  Volume in drive C

Re: IEC - cannot find button

2007-10-29 Thread daniel
of the button or the button caption? Let me know what you think. Daniel -- http://mail.python.org/mailman/listinfo/python-list

trouble with PAMIE

2007-10-29 Thread daniel
I'm using PAMIE to automate some web browsing. My problem is with the buttonClick() method. It seems to work unless the button is supposed to open a new window, in which case nothing happens. There is no error message. Any ideas? Daniel -- http://mail.python.org/mailman/listinfo/python-list

trouble with PAMIE

2007-10-29 Thread daniel
I'm trying to use PAMIE to automate some web browsing. My problem is with the buttonClick() method; it seems to work unless the button is supposed to open a new window. Specifically, the button is supposed to open a PDF Preview in a new window. Any ideas? Daniel -- http://mail.python.org

trouble with PAMIE

2007-10-29 Thread daniel
I'm trying to use PAMIE to automate some web browsing. My problem is with the buttonClick() method; it doesn't seem to work when the button is supposed to open a new window. For example, I can use it to submit a username and password and advance to the next page but it fails on a button that opens

using Mac OS X CoreGraphics via ctypes

2007-06-14 Thread Daniel
://developer.apple.com/graphicsimaging/ pythonandquartz.html Thanks in advance for any hints you can provide. ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: using Mac OS X CoreGraphics via ctypes

2007-06-15 Thread Daniel
a constant: GCS_RGB = cglib.kCGColorSpaceGenericRGB cs = cglib.CGColorSpaceCreateWithName(GCS_RGB) I get a segfault too. ctypes said kCGColorSpaceGenericRGB was a function pointer, so I thought maybe I needed to call it to get the value (not very good reasoning, I know). ~ Daniel -- http

Re: using Mac OS X CoreGraphics via ctypes

2007-06-18 Thread Daniel
On Jun 18, 6:07 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: Daniel wrote: # the next line causes a segfault - what's the right way to do this? #GCS_RGB = cglib.kCGColorSpaceGenericRGB() Usually, things in the OSX lib that start with k* are a constant - not a function

decimal by default

2006-06-28 Thread Daniel
Decimal context for the expressions (not sure if that matters or not). Is there a way to do what I want without rolling my own parser and/or interpreter? Is there some other alternative that would solve my problem? Thanks, ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: decimal by default

2006-06-29 Thread Daniel
! I had no hope that it would be this simple. I always wondered what compile() was useful for and now I know at least one thing. I'll try it out tomorrow. Thanks a lot Alex! ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

what is the keyword is for?

2006-08-15 Thread daniel
I'm so confused by the keyword is and == equal sign, it seems they could be exchanged in some contexts, but not in others, what's the difference between them in terms of comparation? thanks... daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the keyword is for?

2006-08-15 Thread daniel
(dictionary for instance) behave in this way. however, when list is replaced with other built-in types like integers : a = b = 3 changing one of them cause the two objects differ... best regards. daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the keyword is for?

2006-08-15 Thread daniel
Martin v. Löwis wrote: daniel wrote: when I tried to check the stuff out, found sth interesting that if you define variables in a style like this: a = b = ['a', 'b'] changing one list affects the other, and they still refer to same object. in fact, seems all compound types (dictionary

Re: defaultdict of arbitrary depth

2007-08-21 Thread Daniel
Any reason why this wouldn't work? from collections import defaultdict def rdict(*args, **kw): ... return defaultdict(rdict, *args, **kw) ... d = rdict() d[1][2][3][4][5] # ... defaultdict(function rdict at 0x61370, {}) ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Libraries in python

2006-09-02 Thread Daniel
and library dependencies. In my opinion it's one of the few things that Java got right that Python didn't. ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

python threading

2006-09-13 Thread daniel
can someone give me a good threading tutorial thx -- http://mail.python.org/mailman/listinfo/python-list

ImportError: Don't know how to import XYZ (type code 3)

2006-09-19 Thread daniel
Trying to load a C++ module that is wrapped with boost_python and get the error ImportError: Don't know how to import XYZ (type code 3) I think type code 3 is means that it is a C++ wrapped .pyd. I have know idea what that means or how to fix it. Any ideas? D. --

Python Threading

2006-09-20 Thread daniel
Hello, Can anyone explain the main points in working with threads in Python. Why use threading and not Thread.I have read an article that i have to subclass the Thread class and override some function. -- http://mail.python.org/mailman/listinfo/python-list

anybody using python 2.5 that raises error while importing?

2006-09-22 Thread daniel
there's a dll extension used to be imported with no error under version 2.4.3, but the new python complains that the name of the module can't be found. seems not mentioned in the official documentation, any work around to fix the issue without switching back to the old version? tks.. daniel

Re: anybody using python 2.5 that raises error while importing?

2006-09-23 Thread daniel
John Machin wrote: daniel wrote: there's a dll extension used to be imported with no error under version 2.4.3, but the new python complains that the name of the module can't be found. seems not mentioned in the official documentation, any work around to fix the issue without switching

Re: anybody using python 2.5 that raises error while importing?

2006-09-23 Thread daniel
my work done. thanks again.. daniel -- http://mail.python.org/mailman/listinfo/python-list

where the hell is the run command of PyPe editor?

2006-09-24 Thread daniel
I'm trying to use PyPe, but I just got so frustrated when attempting to run a script, this is the very first feature I would use for an editor, OMG. I browsed through every single menu item and gave up... any help would be appreciated, (the most silly question ever, sounds like a new computer

where the hell is the run command of PyPe editor?

2006-09-24 Thread daniel
user. ;--() tks daniel -- http://mail.python.org/mailman/listinfo/python-list

why logging re-raise my exception and can't be caught?

2006-09-30 Thread daniel
module behave as I expected? tks in advance. daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: why logging re-raise my exception and can't be caught?

2006-09-30 Thread daniel
for your help.. I do appreciate it. daniel -- http://mail.python.org/mailman/listinfo/python-list

always raise syntax error!

2006-10-13 Thread daniel
in vim to all my tabs and trailing spaces visible, make sure they are used consistently, but python still raise syntax error, no further description, and just make no sense to me. anyone heard of such issue or the like before? many thanks daniel -- http://mail.python.org/mailman/listinfo

Re: always raise syntax error!

2006-10-13 Thread daniel
; or ( not matching...etc. tks again.. daniel -- http://mail.python.org/mailman/listinfo/python-list

is it possible to send raw data through ftp?

2006-10-19 Thread daniel
have to use socketobj.makefile() to do that, how can I stop and resume that transfer then? the abort() generates lots of wierd and unexpected behavior, I guess if there is a way to upload raw data buffer, the restart action should be implemented more easily. thanks. daniel -- http

Re: is it possible to send raw data through ftp?

2006-10-19 Thread daniel
On Oct 20, 1:10 pm, Fredrik Lundh [EMAIL PROTECTED] wrote: daniel wrote: well, I'm trying to use ftplib to upload data that received from socket, and the application is required to restart the transfer at a specific interval so as to generate a different target file on the server

Network Simulator in Python

2006-10-23 Thread Daniel
Hi, I was wondering if anybody can give me pointers on an existing network simulator in Python somthing like ns2 which would model all the real world internet dynamics including TCP stacks, congestion, flow control etc. Every help is appreciated, Thanks --

Re: Network Simulator in Python

2006-10-24 Thread Daniel
Any help ? Daniel wrote: Hi, I was wondering if anybody can give me pointers on an existing network simulator in Python somthing like ns2 which would model all the real world internet dynamics including TCP stacks, congestion, flow control etc. Every help is appreciated, Thanks

Help on writing P2P Streaming client

2006-11-02 Thread Daniel
I want to write a P2P streaming client where ine user broadcasts and many users receive the streaming content and forward like BitTorrent. Can anybody provide pointers for starting in Python. I have done couple of small projects in Python but I need to get this done. Every help is appreciated.

what is the difference between tuple and list?

2006-05-16 Thread daniel
is there any typical usage that shows their difference? thanks daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the difference between tuple and list?

2006-05-16 Thread daniel
thank you all for replying, I'm new to python, and just reading the python tutorial now. I did not expect the FAQ to contain any relevant topics, so thanks Simon... your comments did make sense, I should have read the tutorial more thoroughly, It's not a good question, I admit. ;-) English is

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Daniel
. There seems to be a lot of documentation available for PyQt4. 3. PyQt4 seems to be easier to learn. 4. My programs does not need to support Linux or Unix. Or am I wrong? Flame people, for the love of God, flame!! :) -Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop with or? Please help!

2007-01-25 Thread Daniel
2007-01-25 11:26:09 [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED] Hmm, my while loop with or doesn't seem to work as I want it to... How do I tell the while loop to only accept Y or y or N or n input from the str(raw_input)? Thank's in advance! Snippet of code: import os

Re: running applications in python

2007-01-25 Thread Daniel
2007-01-25 18:28:44 lee [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED] how can i run or open a windows application from the python prompt?for e.g.mediaplayer opening,folder acess etc Here's another way of doing it: import os TheCommandIwantTorun = 'C:\Program\Windows Media

boolean flag vs threading.Event

2007-02-27 Thread Daniel
(such as my boolean 'terminated' flag). If that is the case, why bother using threading.Event for this purpose? Thanks, ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: boolean flag vs threading.Event

2007-02-27 Thread Daniel
But what are you gaining, really [by using a boolean flag instead of an Event]? I agree Chris, the Event is better and it certainly does not add much if any overhead. Thanks for the response. ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

Sync paramstyle between sqlite and mysql

2008-11-10 Thread Daniel
Hello, I'm developing an application that accesses both a MySQL and an SQLite database. I would like to have named parameters in my SQL and have found the following: For MySQL my named parameters need to look like this: %(paramname)s For SQLite my named parameters need to look like this:

Re: Remote control of firefox (mozilla) from a python program

2008-11-10 Thread Daniel
On Nov 10, 9:23 am, Scott [EMAIL PROTECTED] wrote: I have a requirement to control a firefox web browser from an external python program.  The python program running under linux from a command shell needs to first find all open firefox web browser windows read the URL currently displayed in

Re: Sync paramstyle between sqlite and mysql

2008-11-11 Thread Daniel
On Nov 10, 11:00 am, Daniel [EMAIL PROTECTED] wrote: Hello, I'm developing an application that accesses both a MySQL and an SQLite database.  I would like to have named parameters in my SQL and have found the following: For MySQL my named parameters need to look like this: %(paramname)s

how to acces the block inside of a context manager as sourcecode

2008-11-18 Thread Daniel
() print f[0] def __enter__(self): pass def __exit__(self,type,value,traceback): if type is not None: print 'exception' pass Any ideas? Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: how to acces the block inside of a context manager as sourcecode

2008-11-19 Thread Daniel
(it contains many parameters that need to be well documented), so I print the source code, cut it out and glue it into my lab notebook. Now I want to automate this process, i.e. the dataStore should print the sourcecode. Daniel There isn't a solution in the general case, because strings can

Re: how to acces the block inside of a context manager as sourcecode

2008-11-20 Thread Daniel
part of the report. Thank you for your ideas Daniel class CM( object ): def __enter__(self): self.startline= inspect.stack( )[ 1 ][ 0 ].f_lineno print 'startline',self.startline filename = inspect.stack( )[-1][1] def getIndentation(line): # TODO

logging multiple messages

2009-01-15 Thread Daniel
I was fighting with a problem all day that was producing multiple messages in my logging output. The problem was related to the fact that I was defining logging handlers multiple times. I found the following posting from a few years ago that related to my problem:

where is handle_timeout in SocketServer

2009-02-11 Thread Daniel
I've just been reading the docs to help me with a SocketServer issue. I found in the docs (http://docs.python.org/library/socketserver.html) a reference to a member attribute timeout and a member function handle_timeout() is made. I am using python 2.5 and there's no indication that these were

Re: where is handle_timeout in SocketServer

2009-02-11 Thread Daniel
On Feb 11, 4:01 pm, Daniel daniel.watr...@gmail.com wrote: I've just been reading the docs to help me with a SocketServer issue. I found in the docs (http://docs.python.org/library/socketserver.html) a reference to a member attribute timeout and a member function handle_timeout() is made.  I

  1   2   3   4   5   6   7   8   9   10   >