Active Directory ADO strange objects returned

2009-12-11 Thread marc wyburn
Hi, I have a script that returns data from active directory using ADO. Everything works except for any fields that use a time value I get an instance of an object returned called . I know it's a time object because if I do object.HighPart or object.LowPart I get a value back. The bit I don't und

Re: gethostbyname blocking

2009-04-24 Thread marc wyburn
On Apr 23, 2:16 pm, Piet van Oostrum wrote: > >>>>> marc wyburn (MW) wrote: > >MW> Hi, I am writing anasynchronousping app to check if 1000s of hosts > >MW> are alive very quickly.  Everything works extremely quickly unless the > >MW> host name d

Re: gethostbyname blocking

2009-04-22 Thread marc wyburn
On Apr 22, 5:19 pm, Jean-Paul Calderone wrote: > On Wed, 22 Apr 2009 08:08:51 -0700 (PDT), marc wyburn > wrote: > >Hi, I am writing an asynchronous ping app to check if 1000s of hosts > >are alive very quickly.  Everything works extremely quickly unless the > >host

gethostbyname blocking

2009-04-22 Thread marc wyburn
Hi, I am writing an asynchronous ping app to check if 1000s of hosts are alive very quickly. Everything works extremely quickly unless the host name doesn't have a DNS record. when calling socket.gethostbyname if there is no record for the host the result seems to block all other threads. As an

Re: pymssql text type

2009-03-12 Thread marc wyburn
On Mar 12, 3:36 pm, a...@pythoncraft.com (Aahz) wrote: > [posted and e-mailed, please reply to group] > > In article <851ed9db-2561-48ad-b54c-95f96a7fa...@q9g2000yqc.googlegroups.com>, > marcwyburn  wrote: > > >Hi, I'm trying to pass a text blob to MS SQL Express 2008 but get the > >follwoing error

pymssql text type

2009-02-20 Thread marc wyburn
Hi, I'm trying to pass a text blob to MS SQL Express 2008 but get the follwoing error. (, OperationalError("SQL Server message 102, severity 15, state 1, line 1:\nIncorrect syntax near 'assigned'.\n",), ) the string it is having an issue with is (\r\n\r\n\tLogon ID:\t\t(0x0,0xE892A8)\r\n\r\n\tLo

Re: confused about classes and tkinter object design

2008-11-27 Thread marc wyburn
On Nov 26, 12:09 pm, Bruno Desthuilliers wrote: > marc wyburn a écrit : > > > Hi, > > > I've created my firstTkinterGUI class which consists of some buttons > > that trigger functions.  I have also created a > > tkFileDialog.askdirectory control to local a

confused about classes and tkinter object design

2008-11-25 Thread marc wyburn
Hi, I've created my first Tkinter GUI class which consists of some buttons that trigger functions. I have also created a tkFileDialog.askdirectory control to local a root folder for log files. I have several file paths that depend on the value of tkFileDialog.askdirectory should I create an obje

Re: variable expansion with sqlite

2008-07-30 Thread marc wyburn
Hi and thanks, I was hoping to avoid having to weld qmarks together but I guess that's why people use things like SQL alchemy instead. It's a good lesson anyway. Thanks, Marc. On Jul 30, 2:24 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > Gerhard Häring wrote: > > My code would probably look very

variable expansion with sqlite

2008-07-30 Thread marc wyburn
Hi I'm using SQlite and the CSV module and trying to create a class that converts data from CSV file into a SQLite table. My script curently uses functions for everything and I'm trying to improve my class programming. The problem I'm having is with variable expansion. self.cursor.executemany('I

CSV variable seems to reset

2008-06-18 Thread marc wyburn
Hi, I'm using the CSV module to parse a file using whitelistCSV_file = open("\\pathtoCSV\\whitelist.csv",'rb') whitelistCSV = csv.reader(whitelistCSV_file) for uname, dname, nname in whitelistCSV: print uname, dname, nname The first time I run the for loop the contents of the file is di

Re: boolian logic

2008-06-13 Thread marc wyburn
On 13 Jun, 10:34, Aidan <[EMAIL PROTECTED]> wrote: > marc wyburn wrote: > > HI all, I'm a bit stuck with how to work outboolianlogic. > > > I'd like to say if A is not equal to B, C or D: > >    do something. > > > I've tried > > > if

boolian logic

2008-06-13 Thread marc wyburn
HI all, I'm a bit stuck with how to work out boolian logic. I'd like to say if A is not equal to B, C or D: do something. I've tried if not var == A or B or C: and various permutations but can't seem to get my head around it. I'm pretty sure I need to know what is calulated first i.e the not

Re: write whitespace/tab to a text file

2007-10-19 Thread marc wyburn
On Oct 19, 3:33 pm, dirkheld <[EMAIL PROTECTED]> wrote: > Hi, > > I would l like to write some data to a text file. I want to write the > data with whitespace or tabs in between so that I create tabular > columns like in a spreadsheet. How can I do this in python. > (btw, I'm new to python) > > nam

Re: Please Help !!!

2007-10-19 Thread marc wyburn
On Oct 17, 10:32 am, Heiko Schlierkamp <[EMAIL PROTECTED] africa.com.na> wrote: > I need to update the virus program every day with the new dat file from > mcafee > I would like to us a Bat file to go to the web page and download the dat > file automatically to a specific Directory, that I have cre

Re: Python for web development ...

2007-08-22 Thread marc wyburn
On Aug 22, 5:13 pm, [EMAIL PROTECTED] wrote: > Hi everyone, > > I have to do a web based application for my final year project. Since, > i am only familiar with basic HTML and Java Script, i am totally new > to this one. My friends are using LAMP (P->PHP). But i want to use > Python. Is it possible

Re: NOOOOB

2007-05-22 Thread marc wyburn
On May 22, 11:29 am, jolly <[EMAIL PROTECTED]> wrote: > Hey guys, > > I want to begin python. Does anyone know where a good starting point > is? > > Thanks, > Jem i went through the tutorials on the main site and then followed up with mark Hammonds book for windows stuff. I got a few other books

Re: sound processing modules in python - anyone?

2006-11-07 Thread marc . wyburn
I've had a brief look at this and there isn't a sound orientated library as such. You can however use numpy to do stuff like FFTs and there are there is a wave module in python that will allow you to create wavs, you can google for importing wav's into numpy arrays. This seemed like a good idea to

Re: sound processing modules in python - anyone?

2006-11-07 Thread marc . wyburn
I've had a brief look at this and there isn't a sound orientated library as such. You can however use numpy to do stuff like FFTs and there are there is a wave module in python that will allow you to create wavs, you can google for importing wav's into numpy arrays. This seemed like a good idea to

Re: Slurping All Content of a File into a Variable

2006-10-27 Thread marc . wyburn
myfile_content is an object and you have only opened the file. Python doesn't yet know whether you want to read it, copy it etc. to read it try text = myfile_content.readlines() print text this should be in most tutorials Wijaya Edward wrote: > Hi, > > How can we slurp content of a single fil

batteries included

2006-10-25 Thread marc . wyburn
Could someone confirm that modules like socket don't use libraries/ dlls on a particular OS, they are completly self contained. Thanks, Marc. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML ElementTree Parse.

2006-10-12 Thread marc . wyburn
Thanks Fredrik, thats got me started but just incase anyone looks there is a slight mistype in your code... or you could do something like > > for dir_elem in tree.findall("dirob"): > for file_elem in dirob.findall("fileob"): > print file_elem.findtext("filesize") > > to l

XML ElementTree Parse.

2006-10-12 Thread marc . wyburn
I'm playing with XML and elementtree and am missing something but I'm not sure what...? I've create an XML file with Elementtree with a root of backup.xml. Attached to the root is a dirob and the dirobj has a fileobj. fileobj has filename and filesize tags. I can open the file in excel and it se

ctypes listing dll functions

2006-09-08 Thread marc . wyburn
hi all and before I start I apologise if I have this completely muddled up but here goes. I'm trying to call functions from a dll file in a python script but I can't work out what functions are available. I'm using ctypes. I've tried using dir(ctypes_object) but the resultant output looks like a

ctypes listing dll functions

2006-09-08 Thread marc . wyburn
hi all and before I start I apologise if I have this completely muddled up but here goes. I'm trying to call functions from a dll file in a python script but I can't work out what functions are available. I'm using ctypes. I've tried using dir(ctypes_object) but the resultant output looks like a

Re: CPU or MB Serial number

2006-07-11 Thread marc . wyburn
Bayazee wrote: > Hi, > How can I get CPU Serial number , or motherboard serial number with > python . I need an idetification of a computer > ThanX > > --- > iranian python community --> www.python.ir If you are on a windows box with WMI (2000

Re: C++ and Python

2006-03-30 Thread marc . wyburn
sorry accidentally hit post. has nyone tried this before? Thanks, Marc. -- http://mail.python.org/mailman/listinfo/python-list

C++ and Python

2006-03-30 Thread marc . wyburn
I've been learning to write VST plugins in C++ and would like to switch back to Python. The first step of writing the plugin is to import the C++ header files from the Steinberg SDK. How can I do this in Python. I've tried looking at SWIG but didn't really understand what it was trying to do.

mod_python, dates, strings and integers

2006-01-26 Thread marc . wyburn
when POSTing a date from an mod_python psp page to another the date is sent as a string. I'm using form.has_key to pull the POST. I can cut the string up,turn the strings into integers and then use datetime.datetime(y,m,d,hr,mn,se) to create a proper datetime. Is there a simpler way of doing this

Re: simple pythonpath query

2006-01-19 Thread marc . wyburn
Cheers Tim, that sorted it. I need to re-read the modules section and namespaces. Everydays a schoolday. MW. -- http://mail.python.org/mailman/listinfo/python-list

simple pythonpath query

2006-01-19 Thread marc . wyburn
I've downloaded the hypertext module and put it in the c:\python24\lib folder. I would have thought that since the lib directory is in the Pythonpath,I would be able to import python scripts from C:\Python24\Lib\HyperText. I also tried including C:\Python24\Lib\HyperText to HKEY_LOCAL_MACHINE\SOF

python create WMI instances

2005-06-10 Thread Marc Wyburn
Hi all, I am struggling with a vb - python code conversion. I'm using WMI to create printers on remote machines using (in VB); set oPrinter = oService.Get("Win32_Printer").SpawnInstance_ oPrinter.DriverName = strDriver oPrinter.PortName = strPort oPrinter.DeviceID = strPrinter oPrinter.Put_(

Re: using variables with modules

2005-05-05 Thread marc . wyburn
thanks runes, that makes sense, time for me to go off and read some more about strip and try: Cheers, MW. -- http://mail.python.org/mailman/listinfo/python-list

using variables with modules

2005-05-05 Thread marc . wyburn
Hi, I am trying to move away from Windows only scripting to Python. I've written a quick script that will pull the product version from the client registry. I can get the IP addresses from a file into a list and then pull each element in the list using the for loop. I am setting each element to a