Re: Is there a way to use .NET DLL from Python

2008-02-06 Thread Shane Geiger
instead of from C#. Thanks, Huayang -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

Re: smtplib gnupg

2008-02-20 Thread Shane Geiger
sample code? Regards Bernd -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

Re: for-else

2008-03-04 Thread Shane Geiger
, } a = 1 # example of normal usage if a in do_task.keys(): do_task[a]() else: do_default_task() # example of testing for i in range(len(do_task.keys)): if a in do_task.keys(): do_task[a]() else: do_default_task() -- Shane Geiger IT Director National Council on Economic Education [EMAIL

Re: image matching algorithms

2008-03-10 Thread Shane Geiger
else: print motion NOT detected detect() #import glob #analyze_thresholds(glob.glob('/Applications/photo-*') -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic

Re: How to factor using Python?

2008-03-11 Thread Shane Geiger
/Factorial http://en.wikipedia.org/wiki/Gamma_function -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

Re: List Combinations

2008-03-12 Thread Shane Geiger
in lists[%d] % (i, i) for i in range(len(lists))]) return eval('[ ' + out + comp + ' ]') a,b,c = [1,2,3],[4,5,6],[7,8,9] print gen([a, b, c]) -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign

Re: Monitoring SSHd and web servers?

2008-03-14 Thread Shane Geiger
. At a higher level, see if you can get a page or see if you can login as a specific person. At a higher level, you may want to check what is on the page or what happens when you log in. It's all up to you. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED

Re: Thousand Seperator

2008-03-14 Thread Shane Geiger
module. If you're producing the numbers yourself then they get printed in that format otherwise you can convert them to numbers first. Eddie -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign

Re: Checking processes running under Windows

2008-03-27 Thread Shane Geiger
). The method I'm using is: process_list = os.popen('TASKLIST').read() However, XP Home doesn't have the tasklist.exe tool so, this is kind of useless in that OS. Do you have any other methods I can use for this? Thanks! -- Shane Geiger IT Director National Council on Economic Education [EMAIL

Re: Converting a tuple to a list

2008-04-08 Thread Shane Geiger
-- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

Re: hw to program on python

2008-04-15 Thread Shane Geiger
comfortable! Diez -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

Re: Capture Keystrokes from a USB Wireless Keyboard.

2009-02-27 Thread Shane Geiger
://mail.python.org/mailman/listinfo/python-list -- Shane Geiger, IT Director Council For Economic Education / www.councilforeconed.org sgei...@councilforeconed.org / 402-438-8958 Teaching Opportunity -- http://mail.python.org/mailman/listinfo/python-list

Re: Email Program

2009-02-28 Thread Shane Geiger
, as it makes many of the annoying things about programs non-issues. -- Shane Geiger, IT Director Council For Economic Education / www.councilforeconed.org sgei...@councilforeconed.org / 402-438-8958 Teaching Opportunity -- http://mail.python.org/mailman/listinfo/python-list

Re: OTish: convince the team to drop VBScript

2009-02-28 Thread Shane Geiger
[citation needed]. -- http://mail.python.org/mailman/listinfo/python-list -- Shane Geiger, IT Director Council For Economic Education / www.councilforeconed.org sgei...@councilforeconed.org / 402-438-8958 Teaching Opportunity -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create Standalone PYC File

2009-03-04 Thread Shane Geiger
independent , something called embedded into one file only ? thank you in anticipation . Rohan. -- http://mail.python.org/mailman/listinfo/python-list -- Shane Geiger, IT Director Council For Economic Education

Re: Building a Python app with Mozilla

2007-07-05 Thread Shane Geiger
to blame. I'm using wxPython for instance and use the sizers and placeholders there, so this is possible with Qt also. So, perhaps (which I don't know) Aqua buttons simply don't permit absolute stuff ? Or the Aqua programmers read the user interface guidelines carefully ? -- Shane Geiger

Re: finding dir of main .py file

2007-12-11 Thread Shane Geiger
the environment tools. app_path = os.getenv('HOME') + /your_sub_dir resources_path = os.getenv('HOME') + /your_sub_dir/resources If there's another way, someone else will jump in. rd -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http

Re: Loading an exe icon into a pixmap/bitmap

2007-12-11 Thread Shane Geiger
-- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

Re: Is anyone happy with csv module?

2007-12-12 Thread Shane Geiger
print - = * 20 for key,val in itmz: print key.upper()+: \t\t,splitjoin(val) # Note: splitjoin() allows a record to contain fields with newline characters -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958

Re: Finding overlapping times...

2007-12-13 Thread Shane Geiger
of these overlap each other. So, in this case, tuple 1 overlaps with tuples 2 and 3. Tuple 2 overlaps with 1. Tuple 3 overlaps with tuple 1. In my scenario I would have hundreds, if not thousands of these ranges. Any nice pythonic way to do this? Thanks. -- Shane Geiger IT Director National

Re: How to generate pdf file from an html page??

2007-12-16 Thread Shane Geiger
python. If yes then which library and functions are required and if no then reasons why it cant be done. Thank you All -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic

Re: Problem untaring python2.5

2007-12-20 Thread Shane Geiger
2003, python2.5.1 and version 1.16 of tar and as per disk full issues i dont think that my systems hard disk is full -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic

Re: getting n items at a time from a generator

2007-12-27 Thread Shane Geiger
else: break Steven, I really like your version since I've managed to understand it in one pass. Paul's version works but is too obscure to read for me :) Thanks a lot again. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438

Re: Dynamic DNS with a python script

2007-12-27 Thread Shane Geiger
]:/root$ [EMAIL PROTECTED]:/nu/mine/myothername$ sudo crontab -l 15 10 * * * /usr/sbin/ipcheck.py -l -r checkip.dyndns.org:8245 shanerg asdfasdf sgeiger.mine.nu,sgeigerbot.mine.nu,myothername.mine.nu --acctfile /root/ipcheck.dat [EMAIL PROTECTED]:/nu/mine/myothername$ -- Shane Geiger

Re: Understanding tempfile.TemporaryFile

2007-12-27 Thread Shane Geiger
() print x open file 'fdopen', mode 'w+b' at 0xab364968 print x.read() print len(x.read()) 0 x.write(1234) print len(x.read()) 0 x.flush() print len(x.read()) 0 -- Shane Geiger IT Director National Council on Economic

Re: Understanding tempfile.TemporaryFile

2007-12-27 Thread Shane Geiger
: '/tmp/tmpZkS0Gj' You might like to read help(tempfile.mktemp). (By the way... the whole point of using tempfile is to avoid needing to delete the file by hand afterwards.) -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http

Re: how to connect to a remote machine using python........

2007-12-30 Thread Shane Geiger
://in.messenger.yahoo.com/webmessengerpromo.php -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

SVGDraw is where?

2008-01-01 Thread Shane Geiger
Does someone know where SVGDraw has gone? It used to be here: http://www2.sfk.nl/svg/ Googling hasn't helped me locate it. :-\ -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic

Re: linecache and glob

2008-01-03 Thread Shane Geiger
) doens't work is there any better methods??? thank you very much in advance jo3c -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http

Re: getting n items at a time from a generator

2008-01-10 Thread Shane Geiger
a,b,c = generator.next(3,'PadValue'): ... print a,b,c ... This Is A Sentence With PadValue -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http

Re: what does **kw mean?

2008-01-11 Thread Shane Geiger
Does this help? def foobar(first_name,last_name, *args, **kwargs): print first_name print last_name print Tuple:,args print Dict:,kwargs x = has y = demonstrated foobar('Shane','Geiger', x, y, adjective='useful', thing='PYTHON trick known as extended call syntax', adverb

Re: Recieving emails in python

2008-01-13 Thread Shane Geiger
, poplib M = poplib.POP3(host) #M.user(getpass.getuser()) #M.pass_(getpass.getpass()) M.user(account) M.pass_(password) numMessages = len(M.list()[1]) for i in range(numMessages): for j in M.retr(i+1)[1]: print j -- Shane Geiger IT Director National Council on Economic Education [EMAIL

Re: Is there some Python function that searches sys.path for a module?

2008-01-14 Thread Shane Geiger
, but not to the starting module named on the Python command line. Is that correct? Thanks. John Nagle -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic

Re: Why the HELL has nobody answered my question !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2008-01-30 Thread Shane Geiger
software wants that I've implemented in Python...so yes, I guess I've done some Gene Expression Programming... ;-P -tkc -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic

Re: confused on calculating date difference in days.

2007-10-16 Thread Shane Geiger
created by datetime.now(). is that right? if yes then please explain me how I can get the delta object to give me results in days. regards, Krishnakant. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading

Re: Pull Last 3 Months

2007-10-17 Thread Shane Geiger
d.strftime('%b') y,m = d.year, d.month if m 1: m -= 1 else: m = 12 y -= 1 d = datetime.date(y,m,1) Use whichever you prefer. -tkc -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438

Re: calling a function from string

2007-10-22 Thread Shane Geiger
do that? the string could might include name of the module. for example a_string = 'datetime.' + 'today()' how could I call a_string as function? Thanks james -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http

Re: How to best send email to a low volume list?

2007-10-24 Thread Shane Geiger
addressing will prevent your recipients from being able to see all the other recipient addresses. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy

Re: Proposal: Decimal literals in Python.

2007-10-26 Thread Shane Geiger
? Or for that matter, enum http://www.python.org/dev/peps/pep-0354/ *wink* -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane

Re: 911 was a hoax!

2007-11-12 Thread Shane Geiger
. Please verify for yourself that some problems exist. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane org:National Council

Re: why there is no pythonscript insine web browsers?

2007-11-13 Thread Shane Geiger
to contain an import module with ability to access the local file system. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger

Re: Creating Installer or Executable in Python

2007-11-14 Thread Shane Geiger
was wondering how can I make an executable or some kind of installer, so that end user doesn't need to compile and worry if he/ she has Python installed or not ? Every help is greatly appreciated. Thanks, -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402

Re: Add speller to Python application

2007-11-26 Thread Shane Geiger
http://pyenchant.sourceforge.net/ helzer wrote: I need to add spell checking to my Python application (for Windows). Any ideas on where to start? Thanks, Helzer -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http

Re: Rss Feed Creator

2007-11-26 Thread Shane Geiger
=Movado+Watches http://www.goldwatches.com/coupons http://www.jewelerslounge.com -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org

Re: Rss Feed Creator

2007-11-26 Thread Shane Geiger
I think this is what you need to make the output readable: tidy -asxml output.xml James Matthews wrote: Thank You Shane, However that is using PyRss2Gen which doesn't put newlines in the XML. So it's a little out of the picture! On Nov 27, 2007 1:57 AM, Shane Geiger [EMAIL PROTECTED

Re: Lib for audio?

2007-11-29 Thread Shane Geiger
This should do the trick: http://www.libsdl.org/ Dave wrote: I need to read microphone input and determine frequency. Is there a lib for that? Thanks, Dave -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net

Re: Outbound HTML Authentication

2007-11-29 Thread Shane Geiger
to either use the info in my AD account or enter in my user/pass automatically. Anyone know how to do this? Thanks -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic

audiodev problem

2007-12-02 Thread Shane Geiger
with every .aiff file I try: i += 1 #import sys; sys.exit() player.wait() -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman

Die, thread! Die! (Was Re: Python is not a good name)

2007-12-04 Thread Shane Geiger
/photos/kirstywombat/1862165664/ -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

Re: Tool for translating Matlab to Python?

2007-12-04 Thread Shane Geiger
/using_matlab_from_python.html Calling Matlab from Python Rolf Wester wrote: Hi, is there a tool to automatically translate Matlab source to Python/numpy code? Regards Rolf -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http

Re: Standalone USB Web Server and Python Interpeter

2007-12-05 Thread Shane Geiger
, PORT httpd.serve_forever() -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy signature.asc Description: OpenPGP digital signature -- http://mail.python.org

Re: which configparse?

2007-12-06 Thread Shane Geiger
code) I've looked at configparse, cfgparse, iniparse. configparse looks like what I want, but it seems last commit was 2years ago. What is the best choice? -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net

Re: [NEWB] Dictionary instantiation?

2007-12-07 Thread Shane Geiger
but please be gentle! -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy signature.asc Description: OpenPGP digital signature -- http://mail.python.org

Re: Calculate an age

2007-12-08 Thread Shane Geiger
, Marc 'BlackJack' Rintsch -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy signature.asc Description: OpenPGP digital signature -- http://mail.python.org

ipython environment question

2007-05-08 Thread Shane Geiger
create() ### I even tried to put all my ipshell() # this call anywhere in your program will start IPython -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy

Re: A best approach to a creating specified http post body

2007-05-18 Thread Shane Geiger
text files is not possible. I'm not completely understanding your problems here. Can you explain why urllib.urlencode wouldn't work? (http://docs.python.org/lib/module-urllib.html) Thanks, -Dave -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402

Re: Creating a distro of python... What would you include in it?

2007-05-30 Thread Shane Geiger
. Something you could point a newbie to and they would be able to create real applications with, without needing to download hundreds of dependencies. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign

Re: Off Topic: What is the good book to learn Python ?

2007-05-30 Thread Shane Geiger
or in x (hours/days) books. They can be decent introductory material, but unless you are really really new to programming, you probably wouldn't be getting enough information to justify the cost of the book (and a lot of times they have a lot of bad practices in them) Good luck! -- Shane Geiger

Re: list comprehension help

2007-03-18 Thread Shane Geiger
that list comprehension can fast up things. Can you point out how to do it in this case? thanks a lot! f = open('file.txt','r') for line in f: db[line.split(' ')[0]] = line.split(' ')[-1] db.sync() -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED

Re: check if files are the same on Windows

2007-03-19 Thread Shane Geiger
comparing two files after the first difference is detected. How should one check that files are the same in Python? The files are plain text. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign

Re: using regexp

2007-03-19 Thread Shane Geiger
. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane org:National Council on Economic Education (NCEE) adr:Suite 215;;201

Re: using regexp

2007-03-19 Thread Shane Geiger
import re line = '123456789123456789' print re.findall('([0-9]{3})', line) Shane Geiger wrote: You don't even need regex. def split_seq(seq,size): # this is sort

Re: Anything available that can read Microsoft .MDB files from Python?

2007-03-20 Thread Shane Geiger
. The one that comes with ubuntu edgy. Just apt-get install mdbtools or something, that's it. I don't want to start a distro war here - but I always found the RPM-based distros lacking, to say the least. Diez -- Shane Geiger IT Director National Council on Economic Education [EMAIL

Re: Pycron for windows - please help

2007-03-20 Thread Shane Geiger
, or here in groups. Does anyone know how to troubleshhot this? Thanks in advance. Contacting the author? -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial

Re: flattening/rolling up/aggregating a large sorted text file

2007-03-21 Thread Shane Geiger
-- 001,0,4,11,0 002 ... -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy

Re: Create new processes over telnet in XP

2007-03-23 Thread Shane Geiger
and waiting for requests on a port (or Pyro object or Corba object...). No need for telnet/ssh connection, no logout problem. Just care of possible security problems :-) -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http

Re: Join strings - very simple Q.

2007-03-24 Thread Shane Geiger
, and the delimiter is the string whose method is being called. To further demonstrate (because I got a weird email that seemed to think that my code didn't work): import string l = ['a','b','c'] string.join(l,',') 'a,b,c' ','.join(l) 'a,b,c' -- Shane Geiger

Re: Removing Python 2.4.4 on OSX

2007-03-24 Thread Shane Geiger
to test with. Mike -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane org:National Council on Economic Education (NCEE

Re: List comprehension returning subclassed list type?

2007-03-24 Thread Shane Geiger
and write a static method in ZList which takes a plain list of Z objects and returns a ZList. Anyway, my question is whether or not this can be done more elegantly via list comprehension? -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http

Re: Using remote source code

2007-03-25 Thread Shane Geiger
) import foo print foo.foo() Alex Thanks for your help, now I can continue building my source code generator. :) -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial

Re: enumerating processes

2007-03-26 Thread Shane Geiger
for any guidance. -- li xianmin [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger

Re: enumerating processes

2007-03-27 Thread Shane Geiger
the current running processes , or how to obtain a specific process by its name or process id. I know I can do this in many programming languages , but how in python? any one know? Thanks for any guidance. -- li xianmin [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- Shane Geiger

Re: Auto execute python in USB flash disk

2007-03-27 Thread Shane Geiger
. It is also an ideal launcher for IronPython. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane org:National Council

Re: A nice way to use regex for complicate parsing

2007-03-29 Thread Shane Geiger
domain=%(domain)s esmtp_parameters=%(esmtp_parameters)s' % match.groupdict() else: print 'DONT match', t -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic

Re: clean up html document created by Word

2007-03-30 Thread Shane Geiger
in there, rather than making valid HTML out of invalid HTML. Again, IIUC, HTMLtidy does not do this. If Beautiful Soup does, then I'm intererested! jon N -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign

Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Shane Geiger
OMG, I was starting to reconsider Ruby. Maƫl Benjamin Mettler wrote: Is this supposed to be a joke? First of April? Likely. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign

Re: Measureing memory used by a subprocess

2007-04-01 Thread Shane Geiger
://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303339 But I don't see any obvious way to get the process id of the spawned subprocess. - Andrew -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign

Re: How can i compare a string which is non null and empty

2007-04-01 Thread Shane Geiger
this: if (str != null) (!str.equals()) how can i do that in python? If you want to litterally do that, it's if (str != None) and (str != ): whatever However, the standard idiom for doing that in Python is if str: whatever -- Shane Geiger IT Director National

Re: How can I import functions from another python file

2007-04-09 Thread Shane Geiger
' -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane org:National Council on Economic Education (NCEE) adr:Suite 215;;201 N

Re: bittorent

2007-04-11 Thread Shane Geiger
day. (Well, let's hope.) -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane org:National Council on Economic

Re: Newbie help with array handling

2007-04-12 Thread Shane Geiger
for Development of Advanced Computing(C-DAC) Pune University Campus,Ganesh Khind Road Pune-Maharastra -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard

Re: script for seconds in given month?

2007-04-16 Thread Shane Geiger
,1,0,0,0,0,0,-1)) Matt s2 = mktime((year,month+1,1,0,0,0,0,0,-1)) Matt return s2-s1 Probably won't work if month==12. ;-) Skip -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign

Re: Mocking OpenOffice in python?

2007-03-14 Thread Shane Geiger
. -Carsten -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane org:National Council on Economic Education (NCEE

Re: number generator

2007-03-14 Thread Shane Geiger
] import random print random.choice(list(genpool(n=4, m=20))) -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger;Shane

Re: dict.items() vs dict.iteritems and similar questions

2007-03-14 Thread Shane Geiger
range() vs xrange(). From my understanding, xrange() essentially gives you an iterator across a range, so it should be used when iterating. Should you only use range() when want to physically store the range as a list? Thanks, Drew -- Shane Geiger IT Director National Council on Economic

Re: distributing python software in jar like fashion

2007-03-14 Thread Shane Geiger
Hi, I have a small app which consist of a few .py files. Is there any way to distribute it in jar like fashion as a single file I can just run python on. I obviously look for platform independent solution. Thx in advance, A. Author: Shane Geiger [EMAIL PROTECTED] Wed Mar 14 21:55

Re: How to get the previous line in a file?

2007-03-16 Thread Shane Geiger
it out. http://us.rd.yahoo.com/evt=49937/*http://tools.search.yahoo.com/toolbar/features/mail/ -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane

Re:

2007-03-17 Thread Shane Geiger
! http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy begin:vcard fn:Shane Geiger n:Geiger

Re: where function

2007-03-18 Thread Shane Geiger
, bearophile Thank you both, a little more cumbersome than I expected, but it does the job! Thanks! -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy

Re: generating a liste of characters

2008-12-03 Thread Shane Geiger
/mailman/listinfo/python-list -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list

Re: Text parsing via regex

2008-12-08 Thread Shane Geiger
is #2. Any help, or suggestions would be great, anything to get me thinking differently is helpful. -- http://mail.python.org/mailman/listinfo/python-list -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading

Re: Flattening lists

2009-02-05 Thread Shane Geiger
-- Shane Geiger, IT Director Council For Economic Education / www.councilforeconed.org sgei...@councilforeconed.org / 402-438-8958 Teaching Opportunity -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension question

2009-05-01 Thread Shane Geiger
if not impossible to do as a comprehension. Here's another approach: b = list(itertools.chain.from_iterable(a)) And without using a library function: b = [] for pair in a: for item in pair: b.append(item) Cheers, Chris -- Shane Geiger, IT Director Council For Economic Education