From davidgshi at yahoo.co.uk Tue Nov 4 12:30:11 2008 From: davidgshi at yahoo.co.uk (David Shi) Date: Tue, 4 Nov 2008 11:30:11 +0000 (GMT) Subject: [Python.NET] Seeking for advice on user, session and user folder management Message-ID: <403096.34501.qm@web26303.mail.ukl.yahoo.com> Looking for Python script to do the following. ? Can?anyone point me to right direction to implementing automatic registration, authentication similar to most modern web services?? I wish to obtain similar script to customise and further develop to add automatic allocation of folders by using their log-in username, automatically setting permissions to these folders, setting a time (say 5 days) before the content of these folders to be flushed out and folder to be deleted if the activity of accessing the folder is dormant. ? Regards, ? David -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidgshi at yahoo.co.uk Wed Nov 5 16:03:57 2008 From: davidgshi at yahoo.co.uk (David Shi) Date: Wed, 5 Nov 2008 15:03:57 +0000 (GMT) Subject: [Python.NET] Looking for Python script to upload large data files over the internet Message-ID: <535942.92304.qm@web26306.mail.ukl.yahoo.com> Can anyone help? ? I am looking for Python scripts to upload large data files over the internet. ? Sincerely, ? David ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidgshi at yahoo.co.uk Thu Nov 6 18:52:11 2008 From: davidgshi at yahoo.co.uk (David Shi) Date: Thu, 6 Nov 2008 17:52:11 +0000 (GMT) Subject: [Python.NET] Looking for a nitty-gritty Python Ajax middleware script to fire off a number of processors Message-ID: <728656.4729.qm@web26302.mail.ukl.yahoo.com> Dear All, ? I am looking for a nitty-gritty Python Ajax script to fire off a number of processing programmes, periodically checking their operations, sending messages back to an HTML div form by sending back the links of generated data files, to be downloaded by end users. ? I am using .NET IIS 6.0 and Windows Server. ? Regards. ? David -------------- next part -------------- An HTML attachment was scrubbed... URL: From mandeep.singh at credit-suisse.com Tue Nov 11 04:56:12 2008 From: mandeep.singh at credit-suisse.com (Singh, Mandeep) Date: Tue, 11 Nov 2008 11:56:12 +0800 Subject: [Python.NET] C# components for script Message-ID: <477A7EBE70716343A8088C9FAC788D7A043D3F61@ESNG17P32001A.csfb.cs-group.com> Hi, I have written c# components to be used by Python. I note that those components need to be placed in the Pythonnet installation directory because its like private assemblies being loaded. Is there a way I can place them in separate location? Thanks & regards, Mandeep Singh Equity IT > Credit Suisse > Tel: (+65) 6212 8755 > > ============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ============================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandrohardy at web.de Tue Nov 11 12:37:49 2008 From: sandrohardy at web.de (Sandro Hardy) Date: Tue, 11 Nov 2008 12:37:49 +0100 Subject: [Python.NET] C# components for script In-Reply-To: <477A7EBE70716343A8088C9FAC788D7A043D3F61@ESNG17P32001A.csfb.cs-group.com> References: <477A7EBE70716343A8088C9FAC788D7A043D3F61@ESNG17P32001A.csfb.cs-group.com> Message-ID: <49196E8D.5030108@web.de> Hi, you can place them in your AppDir, i did so. Maybe somewhere else, perhaps in your dll path, but I dont know. Try it. Singh, Mandeep schrieb: > Hi, > I have written c# components to be used by Python. I note that > those components need to be placed in the Pythonnet installation > directory because its like private assemblies being loaded. Is there a > way I can place them in separate location? > > Thanks & regards, > /Mandeep Singh**/****** > *Equity IT* > *Credit Suisse* > Tel: (+65) 6212 8755 > > > ============================================================================== > Please access the attached hyperlink for an important electronic communications disclaimer: > > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html > ============================================================================== > > > ------------------------------------------------------------------------ > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet From sandrohardy at web.de Tue Nov 11 13:09:35 2008 From: sandrohardy at web.de (Sandro Hardy) Date: Tue, 11 Nov 2008 13:09:35 +0100 Subject: [Python.NET] C# components for script In-Reply-To: <49196E8D.5030108@web.de> References: <477A7EBE70716343A8088C9FAC788D7A043D3F61@ESNG17P32001A.csfb.cs-group.com> <49196E8D.5030108@web.de> Message-ID: <491975FF.2000605@web.de> Hi, sorry, my Fault. My dll ist also in my Pythonnet dir. Sandro Hardy schrieb: > Hi, > > you can place them in your AppDir, i did so. Maybe somewhere else, > perhaps in your dll path, but I dont know. Try it. > > Singh, Mandeep schrieb: >> Hi, >> I have written c# components to be used by Python. I note that >> those components need to be placed in the Pythonnet installation >> directory because its like private assemblies being loaded. Is there a >> way I can place them in separate location? >> >> Thanks & regards, >> /Mandeep Singh**/****** >> *Equity IT* >> *Credit Suisse* >> Tel: (+65) 6212 8755 >> >> >> ============================================================================== >> >> Please access the attached hyperlink for an important electronic >> communications disclaimer: >> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html >> ============================================================================== >> >> >> >> ------------------------------------------------------------------------ >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> http://mail.python.org/mailman/listinfo/pythondotnet > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet > From sandrohardy at web.de Tue Nov 11 15:28:59 2008 From: sandrohardy at web.de (Sandro Hardy) Date: Tue, 11 Nov 2008 15:28:59 +0100 Subject: [Python.NET] C# components for script In-Reply-To: <491975FF.2000605@web.de> References: <477A7EBE70716343A8088C9FAC788D7A043D3F61@ESNG17P32001A.csfb.cs-group.com> <49196E8D.5030108@web.de> <491975FF.2000605@web.de> Message-ID: <491996AB.1070707@web.de> Hi, it works like I wrote in my first mail. Tried it now. So put your dll in your App-Dir. Sandro Hardy schrieb: > Hi, > > sorry, my Fault. My dll ist also in my Pythonnet dir. > > Sandro Hardy schrieb: >> Hi, >> >> you can place them in your AppDir, i did so. Maybe somewhere else, >> perhaps in your dll path, but I dont know. Try it. >> >> Singh, Mandeep schrieb: >>> Hi, >>> I have written c# components to be used by Python. I note >>> that those components need to be placed in the Pythonnet installation >>> directory because its like private assemblies being loaded. Is there >>> a way I can place them in separate location? >>> >>> Thanks & regards, >>> /Mandeep Singh**/****** >>> *Equity IT* >>> *Credit Suisse* >>> Tel: (+65) 6212 8755 >>> >>> >>> ============================================================================== >>> >>> Please access the attached hyperlink for an important electronic >>> communications disclaimer: >>> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html >>> ============================================================================== >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _________________________________________________ >>> Python.NET mailing list - PythonDotNet at python.org >>> http://mail.python.org/mailman/listinfo/pythondotnet >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> http://mail.python.org/mailman/listinfo/pythondotnet >> > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet > From davidgshi at yahoo.co.uk Tue Nov 11 21:30:22 2008 From: davidgshi at yahoo.co.uk (David Shi) Date: Tue, 11 Nov 2008 20:30:22 +0000 (GMT) Subject: [Python.NET] Has anyone tried calling zip.py in feedback.py and print out an innerHTML to provide a download link? Message-ID: <61135.83314.qm@web26307.mail.ukl.yahoo.com> Hello, there. ? Has anyone tried calling zip.py in feedback.py and print out an innerHTML to provide a download link? ? I find difficult to make it work. ? Regards. ? David ?#********************************************************************** # Description: # Zips the contents of a folder. # Parameters: # 0 - Input folder. # 1 - Output zip file. It is assumed that the user added the .zip # extension. #********************************************************************** # Import modules and create the geoprocessor # import sys, zipfile, arcgisscripting, os, traceback gp = arcgisscripting.create() # Function for zipping files. If keep is true, the folder, along with # all its contents, will be written to the zip file. If false, only # the contents of the input folder will be written to the zip file - # the input folder name will not appear in the zip file. # def zipws(path, zip, keep): path = os.path.normpath(path) # os.walk visits every subdirectory, returning a 3-tuple # of directory name, subdirectories in it, and filenames # in it. # for (dirpath, dirnames, filenames) in os.walk(path): # Iterate over every filename # for file in filenames: # Ignore .lock files # if not file.endswith('.lock'): gp.AddMessage("Adding %s..." % os.path.join(path, dirpath, file)) try: if keep: zip.write(os.path.join(dirpath, file), os.path.join(os.path.basename(path), os.path.join(dirpath, file)[len(path)+len(os.sep):])) else: zip.write(os.path.join(dirpath, file), os.path.join(dirpath[len(path):], file)) except Exception, e: gp.AddWarning(" Error adding %s: %s" % (file, e)) return None if __name__ == '__main__': try: # Get the tool parameter values # infolder = gp.GetParameterAsText(0) outfile = gp.GetParameterAsText(1) # Create the zip file for writing compressed data. In some rare # instances, the ZIP_DEFLATED constant may be unavailable and # the ZIP_STORED constant is used instead. When ZIP_STORED is # used, the zip file does not contain compressed data, resulting # in large zip files. # try: zip = zipfile.ZipFile(outfile, 'w', zipfile.ZIP_DEFLATED) zipws(infolder, zip, True) zip.close() except RuntimeError: # Delete zip file if exists # if os.path.exists(outfile): os.unlink(outfile) zip = zipfile.ZipFile(outfile, 'w', zipfile.ZIP_STORED) zipws(infolder, zip, True) zip.close() gp.AddWarning(" Unable to compress zip file contents.") gp.AddMessage("Zip file created successfully") except: # Return any python specific errors as well as any errors from the geoprocessor # tb = sys.exc_info()[2] tbinfo = traceback.format_tb(tb)[0] pymsg = "PYTHON ERRORS:\nTraceback Info:\n" + tbinfo + "\nError Info:\n " + str(sys.exc_type)+ ": " + str(sys.exc_value) + "\n" gp.AddError(pymsg) msgs = "GP ERRORS:\n" + gp.GetMessages(2) + "\n" gp.AddError(msgs) ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sambasivareddy.s at patni.com Wed Nov 12 10:31:45 2008 From: sambasivareddy.s at patni.com (sambasivareddy) Date: Wed, 12 Nov 2008 15:01:45 +0530 Subject: [Python.NET] How to navigate one window to another window through python scripts ? Message-ID: <002101c944a9$7bc15780$750ba8c0@patni.com> Hi all, How to navigate one window to another window through python scripts ? Basically I want to do Automatic testing one windows base c#.net application through python scripts. I am Able to open the executable file with following scripts. Import os Os.system ('abc.exe') But how to navigate from one window to another window? How to set values in that window with python script? if any one have sample code and documents Plz share to me. Your inputs will really helpful and thanks in advance !!!!! Regards, Sambasivareddy.S http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at netadmin at patni.com and delete this mail. _____________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkozyarchuk at hedgeserv.com Tue Nov 11 14:20:27 2008 From: mkozyarchuk at hedgeserv.com (Maksim Kozyarchuk) Date: Tue, 11 Nov 2008 08:20:27 -0500 Subject: [Python.NET] C# components for script In-Reply-To: <49196E8D.5030108@web.de> Message-ID: Mandeep, You have 2 options. * You can use LoadFrom to load the dll from a particular location import clr import System System.Reflection.Assembly.LoadFrom("your.DLL") * If your DLL and Namespace have the same name python.net should be able to find the dll in the PYTHONPATH Maksim Singh, Mandeep schrieb: > Hi, > I have written c# components to be used by Python. I note that > those components need to be placed in the Pythonnet installation > directory because its like private assemblies being loaded. Is there a > way I can place them in separate location? > > Thanks & regards, > /Mandeep Singh**/****** > *Equity IT* > *Credit Suisse* > Tel: (+65) 6212 8755 > > > ============================================================================== > Please access the attached hyperlink for an important electronic communications disclaimer: > > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html > ============================================================================== > > > ------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From btribble at ea.com Tue Nov 11 20:40:18 2008 From: btribble at ea.com (Tribble, Brett) Date: Tue, 11 Nov 2008 11:40:18 -0800 Subject: [Python.NET] C# components for script In-Reply-To: <477A7EBE70716343A8088C9FAC788D7A043D3F61@ESNG17P32001A.csfb.cs-group.com> References: <477A7EBE70716343A8088C9FAC788D7A043D3F61@ESNG17P32001A.csfb.cs-group.com> Message-ID: Yes, they can be anywhere, you just need to write some code to add them to the SYSTEM path for the current running code. Optionally, you can also tell .NET where to look for the assembly's config file. import sys import clr import System loadDir = 'C:/myAssemblyPath/' assemblyName = 'myDLL.dll' configfileName = 'myDLL.ini' # add to system path if not loadDir in sys.path: sys.path.insert(0, loadDir) # tell .NET where to look for the applications config file System.AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", (loadDir + configfileName)) # load it up clr.AddReference(assemblyName) Cheers, Brett From: pythondotnet-bounces+btribble=maxis.com at python.org [mailto:pythondotnet-bounces+btribble=maxis.com at python.org] On Behalf Of Singh, Mandeep Sent: Monday, November 10, 2008 7:56 PM To: pythondotnet at python.org Subject: [Python.NET] C# components for script Hi, I have written c# components to be used by Python. I note that those components need to be placed in the Pythonnet installation directory because its like private assemblies being loaded. Is there a way I can place them in separate location? Thanks & regards, Mandeep Singh Equity IT Credit Suisse Tel: (+65) 6212 8755 ============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ============================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From godson.g at gmail.com Wed Nov 12 11:40:43 2008 From: godson.g at gmail.com (Godson Gera) Date: Wed, 12 Nov 2008 16:10:43 +0530 Subject: [Python.NET] How to navigate one window to another window through python scripts ? In-Reply-To: <002101c944a9$7bc15780$750ba8c0@patni.com> References: <002101c944a9$7bc15780$750ba8c0@patni.com> Message-ID: On Wed, Nov 12, 2008 at 3:01 PM, sambasivareddy wrote: > Hi all, > > > > How to navigate one window to another window through python scripts ? > > > > Basically I want to do Automatic testing one windows base c#.net > application through python scripts. > > > > I am Able to open the executable file with following scripts. > > Import os > > Os.system ('abc.exe') > > > > But how to navigate from one window to another window? > > How to set values in that window with python script? > > > > if any one have sample code and documents Plz share to me. > > Your inputs will really helpful and thanks in advance !!!!! > > > > *Regards**,* > > *Sambasivareddy.S* > You can use pywinauto http://pywinauto.openqa.org/ to automate desktop applications on windows. Thanks & Regards, Godson Gera http://godson.in -------------- next part -------------- An HTML attachment was scrubbed... URL: From helink at sandia.gov Sat Nov 15 02:38:55 2008 From: helink at sandia.gov (Hamilton Link) Date: Fri, 14 Nov 2008 18:38:55 -0700 Subject: [Python.NET] questions from a new PythonNet user Message-ID: <491E282F.4040202@sandia.gov> Hi there, I've just started working with PythonNet and I have a few questions about getting it built and running. Any help would be appreciated, here is my current situation and questions. Sorry for the long email but I figured details can only help you help me. I would like to be able to download and build PythonNet from scratch on Windows XP (32-bit) and on Ubuntu. If I have to build the .net assemblies on XP for use in Ubuntu that's fine. On Ubuntu I have python 2.5.2, gcc 4.3.2, and mono 1.9.1. I have the python dev and mono dev things installed as well, and my /etc/mono/config file is populated with the extra bits from the pythonnet distribution. On Windows I have Visual Studio Pro 2008 and python 2.5.2. On both platforms I have the latest (r100) from svn, and on Ubuntu I also have the pythonnet-2.0-alpha2 distribution. On Ubuntu once I put the svn-retrieved setup.py I was able to rebuild the pythonnet-2.0-alpha2 version of clr.so to be a 64-bit library; once I had done this and set my GAC I was able to use "mono python.exe" (or simply python.exe) and make a .net System.Drawing.Point object and get its field values. Yay... except that starting python and doing "import clr" made a heroic effort and then died. I'm using python2.5-UCS4 because in python, "len(u'\U00010800')" returns 1, is that correct? Anyway, the error text is attached. I can't get very far building the .net components checked out from svn because from what I can tell ilasm2 doesn't like some of the #define and #include and etc. in the code. Is it possible to build everything with Mono or no? On Windows I can build everything with no errors or warnings under VS Pro. Pity mostly I want to use it under unix. I believe the assemblies should work but there's this nasty little bit of .il that ends up 32- or 64-bit specific. So I need to know how to target 64-bit from a 32-bit host and I'm not entirely sure what to configure in this case. I can see how to configure for different python versions and UCS2/4, so that's not a problem. If I can get guidance on targeting 32- or 64- by inclusion of the proper .il file, I think I can build all the different versions I need of the .net stuff and then I just need to be able to build (or possibly just invoke) a working built version of clr.so over on the unix side. I suppose the first question is, Why are there no apparent build instructions in the distribution? It seems that there are more than half a dozen build configurations (python 2.3, 4, 5, and 6, plus UCS2/4 distinctions for 5 and 6, plus clr.so/.dll being built for a 32- or 64-bit system) and a couple of possible build environments (VS or Mono+make), so breaking this all down for first timers would really, really be appreciated. If I've just missed them, I apologize, but the only thing I've been able to find so far is http://feihonghsu.blogspot.com/2008/02/installing-pythonnet-20-alpha-2-on.html and http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html which are _great_ but they are at an unaffiliated web site, are only Visual Studio instructions, and don't cover targeting 32/64 bit. I should also mention that if there really aren't official build instructions I will happily write some up (cribbing somewhat from Mr. Feihong Hsu if he agrees) as soon as I have a clear understanding of the process and can do it successfully, and I'll stick that into svn if I can or post it to the mailing list for a dev to add if I can't. How actively maintained is PythonNet at the moment? It looks like since the project was made to work patches have become infrequent, which I will take to mean that things work reasonably well. But this putative .net SP1 patch ( http://mail.python.org/pipermail/pythondotnet/2008-January/000771.html ) was not apparently folded into SVN, was there a reason for this? The distribution at http://sourceforge.net/project/showfiles.php?group_id=162464 is missing setup.py, is this an oversight (I notice it is in the svn distribution)? Finally, is there active development towards a 2.0 final, or has the project hit a bit of a plateau with 2.0 alpha2? Thank you very much for your time, hamilton -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pythonnetError.txt URL: From brian.d.lloyd at gmail.com Sat Nov 29 04:32:17 2008 From: brian.d.lloyd at gmail.com (Brian Lloyd) Date: Fri, 28 Nov 2008 22:32:17 -0500 Subject: [Python.NET] questions from a new PythonNet user In-Reply-To: <491E282F.4040202@sandia.gov> References: <491E282F.4040202@sandia.gov> Message-ID: <1c0b4a390811281932ka63c15ex24bafa689df499dc@mail.gmail.com> On Fri, Nov 14, 2008 at 8:38 PM, Hamilton Link wrote: > ... > > I suppose the first question is, > Why are there no apparent build instructions in the distribution? > Hi there - unfortunately I think the problem is that it would take a large effort to come up with a build process that works reliably for all possible platforms (mono, win32), python versions, unicode requirements, build toolchains, etc. Consequently, the docs are kind of all over the place. Thus far, while python.net has been useful for some people, I don't think the user community is large enough yet for any group of people to get together to put together anything really comprehensive in terms of distribution tools or docs. > It seems that there are more than half a dozen build configurations (python > 2.3, 4, 5, and 6, plus UCS2/4 distinctions for 5 and 6, plus clr.so/.dll > being built for a 32- or 64-bit system) and a couple of possible build > environments (VS or Mono+make), so breaking this all down for first timers > would really, really be appreciated. If I've just missed them, I apologize, > but the only thing I've been able to find so far is > > http://feihonghsu.blogspot.com/2008/02/installing-pythonnet-20-alpha-2-on.html > and > http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html > which are _great_ but they are at an unaffiliated web site, are only Visual > Studio instructions, and don't cover targeting 32/64 bit. I should also > mention that if there really aren't official build instructions I will > happily write some up (cribbing somewhat from Mr. Feihong Hsu if he agrees) > as soon as I have a clear understanding of the process and can do it > successfully, and I'll stick that into svn if I can or post it to the > mailing list for a dev to add if I can't. If you're willing to write some, I'm willing to give you whatever access you need to get them in svn ;) If anyone thinks a lighter weight tool would help, we could set up a mediawiki instance or something as well... > How actively maintained is PythonNet at the moment? > > It looks like since the project was made to work patches have become > infrequent, which I will take to mean that things work reasonably well. But > this putative .net SP1 patch ( > http://mail.python.org/pipermail/pythondotnet/2008-January/000771.html ) > was not apparently folded into SVN, was there a reason for this? > I can only speak for myself as the original author -- for my part, the project that allowed me to do the original work on this is ancient history. While I have an ongoing geeky interest and have on occasion been able to do small spurts of work, its unlikely I will be able to work on this substantively in the near future. To their credit, many of the folks who have used the system have stepped up to contribute changes when they have run up against problems. I have, and will continue to, give those folks access to sourceforge etc. to improve the platform as they are able. But my impression is that where we are now is a situation where people can "scratch their own itch", but there is no organized effort to track the .NET or mono platform changes going forward. My opinion is that it will take an invested champion to make that happen. FWIW, Resolver and others seem to be using some of the code and concepts from python.net to further use of native extensions with IronPython -- that may also be a good avenue to explore if you're looking for long-term supportability (and I'm sure resolver would welcome the help!) -Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: