Re: HTTP headers problem

2002-05-05 Thread Markus Daniel
Please add an "Content-Length" entry in front of the "Content-Type" entry. Sukram - Original Message - From: "Jeremy Aiyadurai" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 03, 2002 4:18 AM Subject: HTTP headers problem > hi all > > here is a barebone webserver. I a

Re: Conversion from GFA Basic to Python for SpeedTest

2002-04-09 Thread Markus Daniel
Please replace my line R = [[0]*(7+1)]*(8145060+1) with R = [[None]*(7+1) for x in xrange(8145060+1)] Else you get an list with 8145061 references of one (!) inner list. sorry. Markus ___ ActivePython mailing list [EMAIL PROTECTED] To unsubscribe:

Re: Conversion from GFA Basic to Python for SpeedTest

2002-04-09 Thread Markus Daniel
Hi Ed, I transformed the programm 1:1 to Python without to use special Numeric-Extensions. My K6-2 with 400 MHz show this result: starting time Tue Apr 09 12:27:33 2002 finished time Tue Apr 09 12:30:13 2002 i = 8145060 8145060 40 41 42 43 44 45 import time print "starting time" print tim

Re: How to set printer's paper bins?

2001-10-19 Thread Markus Daniel
Hello, If Python do not support an API-Call directly you can choose one of this ways: 1.) use the search-engine from Python.org and ActiveState.com to find a module with your spezific capabilities. 2.) write a Python-Extension in C 3.) write an COM-Object in VBA or C++ (MFC or ATL) 4.) use

Re: COM server implementing given Interface

2001-10-18 Thread Markus Daniel
Sorry, I wrote "expose" but I meant "extend". And to use the bandwidth useful, I will make a workaround for Kári Harðarson public. He got problems to profile the IIS via import profile profile.run() One easy solution for IIS, WSH or IE is this: # --- IIS-Code def test(): do_anything_u

Re: COM server implementing given Interface

2001-10-18 Thread Markus Daniel
Volker Siepmann wrote: > I'm unfortunately not a COM expert at all, so please keep it simple! ;-) But for your task you should! For example it is absolutely not allowed to expose or change an existing interface. And the IDispatch-Interface is based on COM-technologie but part of the OLE2-techn

Re: Using the python profiler from an ASP Python page

2001-10-12 Thread Markus Daniel
a quite different scope and there is no easy way to fix it. Markus - Original Message - From: "Kári Harðarson" <[EMAIL PROTECTED]> To: "'Markus Daniel'" <[EMAIL PROTECTED]> Sent: Friday, October 12, 2001 6:07 PM Subject: RE: Using the p

Re: VB sample for setting autoincrement property for a column

2001-10-12 Thread Markus Daniel
> Note that for some reason adKeyPrimary didn't get exported by COM with > the rest of the constants. Maybe the documentation has a misspelling in > the name. Run the "COM Makepy utility" for "Microsoft ADO Ext. 2.x for DLL and Security". This will make known the constants for the "ADOX.Key" -

Re: DNS module or how to ... ?

2001-10-08 Thread Markus Daniel
> Or is there a method how I can , from my python program, find out > an email server for a particular domain? There is an free ax-object: http://www.internext.co.za/stefan/aspmx/ Markus ___ ActivePython mailing list [EMAIL PROTECTED] http://listse

Re: startup script

2001-10-08 Thread Markus Daniel
Henry wrote: > How do I make the python interpreter run a script upon startup? Check the manual about environment variable "PYTHONSTARTUP". Markus ___ ActivePython mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/act

Re: SMTPLIB module - how to add subject ?

2001-09-16 Thread Markus Daniel
import smtplib fromaddr = '"MD-A" <[EMAIL PROTECTED]>' toaddrs = '"MD-E" <[EMAIL PROTECTED]>' subject = "HI" msg = """ HI xxx, have a nice day! yyy. """ server = smtplib.SMTP('mail.bbb.com') m = "From: %s\r\nTo: %s\r\nSubject: %s\r\nX-Mailer: My-Mail\r\n\r\n" % (fromaddr, toaddrs, subject) ser

Re: Py2exe and wxPython

2001-08-28 Thread Markus Daniel
> Does anyone have any experience with Py2exe converting python > source into exe if there is wxPython used in source? There are not any problem, for more information see http://starship.python.net/crew/theller/py2exe/ Markus ___ ActivePython mailin

Re: trapping all key and mouse events

2001-08-09 Thread Markus Daniel
> I'm writing is supposes to prevent the user from using > the system until they have pressed a button. Once this > button is pressed the "client" sends a message to a > "server". The "server" then replies and tells the client > to unlock. The user can then use the windows machine, > browse the

Re: trapping all key and mouse events

2001-08-09 Thread Markus Daniel
# > Does anyone know how I could get one window # > with a button on it, to handle all mouse and # > keyboard events. Thus preventing a user from # > doing anything else but clicking on the button? # First, there are modal and unmodal -dialogs. A modal # dialog locks the GUI-thread and prevent

Re: LDAP library to script administration operations for e.g. Netscape Directory Server

2001-05-16 Thread Markus Daniel
You can use (under Windows) the ASDI-Components. http://www.microsoft.com/windows2000/techinfo/howitworks/activedirectory/adsilinks.asp It is a very easy *generic* LDAP-API with Interfaces for C++ and Script-Programmers. Markus Daniel - Original Message - From: <[EMAIL PROTECTED]&

Re: NT Services

2001-05-15 Thread Markus Daniel
aw_input("Aborded by User. Exit.") sys.exit() else: raw_input("Invalid number. Exit.") sys.exit() else: raw_input("No Number. Exit.") sys.exit() try: adsComputer.Delete("service", lstServices[intChoose]) raw_input("Service deleted. Exit.&

Re: some ADO-COM-Problem

2001-05-15 Thread Markus Daniel
I found an other way. Now it works with Python too: >>> from win32com.client import Dispatch >>> adoCon = Dispatch("ADODB.Connection") >>> adoCon.Provider = "ADSDSOObject" >>> adoCon.Open("", "cn=Administrator;cn=Users,dc=strebig,dc=de","AdminsPW") >>> adoRec = Dispatch("ADODB.Recordset") >>> ado

3 problems with v210

2001-04-27 Thread Markus Daniel
Bug 1: Pythonwin.exe (Build 210, Win2k, no seperate TCL installation) crashes when typing this: >>> import sys >>> sys.modules Bug 2: Installer installed "Advanced Developmend" - pack ,without permission. Bug 3: Python is not as an AX-Scripting-Language registered.

(no subject)

2001-03-10 Thread Markus Daniel
In the reality, I used on a apache this php-script to show all of the transmitted VARs: >> >>POST-Vars: >>>while (list($key, $val) = each($HTTP_POST_VARS)) >> echo ("$key: $val \n"); >>?> >> >> >>GET-Vars: >>>while (list($key, $val) = each($HTTP_GET_

HTTP - POST-Method do not work

2001-03-09 Thread Markus Daniel
Hi guys, I tested the HTTP-POST-Example from the reference-manual: import httplib, urllib params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) h = httplib.HTTP("www.musi-cal.com:80") h.putrequest("POST", "/cgi-bin/query") h.putheader("Content-length", "%d" % len(params)) h.putheader('Ac

Re: using an "untrusted dynamic module" from Active Scripting

2000-12-06 Thread Markus Daniel
Hello! First what you need is the MS-ScriptControl: http://msdn.microsoft.com/scripting/scriptcontrol/default.htm then this code is running without limitations: 01: 02: 03: sc=new ActiveXObject("ScriptControl"); 04: sc.Language="Python"; 05: sc.AddCode("from win32com.client import Dispatch\nd