think about this. I don't know what
>these processors are compatible with at the binary level.
Binary compatibility isn't so important. Python can be built from source.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
he exe in D:\ and did not create a Python25 directory.
Where did you get the installer? I've installed Python on Windows many,
many times, and have never seen this issue.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ation of Excel spreadsheets and
>> Word documents, interract with Access data bases, and so forth.
>>
>You might download and install Mark Hammond's PythonWin.
(Ummm, win32com.client is PART of Mark Hammond's PythonWin, now called
PyWin32.)
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
bsolutely invaluable for
those occasions.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
On 25/10/2007, A.T.Hofkamp <[EMAIL PROTECTED]> wrote:
> On 2007-10-25, Pete Bartonly <[EMAIL PROTECTED]> wrote:
> >
> Also, brackets around conditions (in the if) are not needed, and comparing
> against None is usually done with 'is' or 'is not' instead of '==' or '!='.
> The result is then
>
> if
> I want to delete all now allowed characters in my text.
> I use this function:
>
> def clear(s1=""):
> if s1:
> allowed =
> [u'+',u'0',u'1',u'2',u'3',u'4',u'5',u'6',u'7',u'8',u'9',u' ', u'Ş',
> u'ş', u'Ö', u'ö', u'Ü', u'ü', u'Ç', u'ç', u'İ', u'ı', u'Ğ', u'ğ', 'A',
> 'C', 'B', 'E', 'D
sic, but I tried installing
cElementTree, but while I could compile with setup.py build, I didn't end up
with a cElementTree.py file anywhere. The directory structure on my system
(HPux, but no root access) doesn't work well with setup.py install.
thanks,
--Tim Arnold
--
http://mail.python.org/mailman/listinfo/python-list
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 25 Oct 2007 17:15:36 -0400, Tim Arnold wrote:
>
>> Hi, I'm getting the by-now-familiar error:
>> return codecs.charmap_decode(input,errors,decodin
rivers if the source code
lives in a path with spaces.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
> Even clearer is not to allow octal literals :) Is there *any* use for
> them?
+1
I find that anything I have even the remotest inkling of using
octal for can be done just as easily with hex.
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
>> Even clearer is not to allow octal literals :) Is there *any* use for
>> them?
>
> The mode argument to os.chmod.
You mean instead of
import this
os.chmod(filename, os.R_OK | os.W_OK | os.X_OK)
which explicitly (rather than implicitly) spells it out?
-tkc
--
http://mail.python.org/m
> have carry out a process a>b then i should print the line and if b>c then i
> should print the line and c>d then i should print... like this i have to
> continue.say for eg: 43<387 so the first row is omitted, 387 is greater then
> 98 so i can print the line second row...
> my code:
> fh = o
3_oct : constant := 8#27#;
x23_dec : constant := 10#23#;
x23_hex : constant := 16#17#;
The opportunities for obfuscated coding by writing all constants in base 7
boggle the mind.
I'm not convinced you need delimiters on both ends; I think 16'fffe_3777
would be just as good.
Alth
t amongst the Brits who cut their teeth on 24 bit ICT/ICL
>equipment...
As a long-time Control Data employee, I know that 60-bit words and 18-bit
addresses meant that I could do octal arithmetic nearly as fast as decimal.
On the other hand, Python doesn't run on the 6000s...
--
Tim Rober
>>
>> While we're at it, you should avoid using builtin's names for
>> identifiers - here, using 'object' as the arg name shadows the builtin
>> 'object' class).
>>
>
> I think you are being a little bit unfair here: help(len) says:
>
> len(...)
> len(object) -> integer
>
> Retur
>I have a two file,
> file 1:
> 17097
> 17186
> 1723
> 17895
> 17906
> 18295
> 18311
> 1880
> 19160
> 19629
>
> file 2:
> 17097
> 17186
> 1723
> 17895
> 17906
> 18295
> 18311
> 1880
> 19160
> 19629
> h
> Is the behavior below expected?
> If so, why is the exception not caught?
> Thanks,
> Alan Isaac
>
x,y='',''
try: x/y
> ... except TypeError: print 'oops'
> ...
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: unsupported operand type(s) for /: 'str' and 'str'
"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Tim Arnold wrote:
>> On a related note, I have another question--where/how can I get the
>> cElementTree.py module? Sorry for something so basic, but I tried
>> installing
>&
> Is this the best way to test every item in a list?
>
> def alltrue(f,l):
> return reduce(bool.__and__,map(f,l))
>
> def onetrue(f,l):
> return reduce(bool.__or__,map(f,l))
>
alltrue(lambda x:x>1,[1,2,3])
> False
alltrue(lambda x:x>=1,[1,2,3])
> True
As of Python2.5, there's
> i have a file :
> file 1:
> 1
> 2
> 3
> 4
> 5
> 6
>
> file2:
> a
> b
> c
> d
> e
> f
> how do i make the two files into list like this =
> [1,a,2,b,3,c,4,d,5,e,6,f]
from itertools import cycle
def serialize(*sources):
while True:
for source in sources:
yield
>A B C D E
[snipped yet another column of random data]
> I need to append the column D and E into a list:
> in such a way that the list should have
> [D,E,D,E,D,E]
> How do i do it.
You start by writ
> I have used Python for a couple of projects last year and
> I found it extremely useful. I could write two middle size
> projects in 2-3 months (part time). Right now I am a bit
> rusty and trying to catch up again with Python.
>
> I am now appearing for Job Interviews these days and I am
>> Good luck with your interviewing and hope this helped,
>>
>> -tkc
>
> Well, I was looking exactly for this. Many thanks to you Tim. After
> going through your list I came to know that I know nothing in Python
> and have to catch up a whole lot.
It was certainly
ythonwin? If so, then what you are looking at
is not a "shell screen" in any way. It's a simulation, and I don't know of
any way to clear it.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
lly, I chose Python (and wxPython), and both the client and
I are quite happy with the result.
(Actually, I did a Tcl binding for them as well, and just writing the text
scripts reinforced my dislike for it...)
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
> if I check a string for for a substring, and this substring isn't found,
> should't the .find method return 0 rather than -1?
> this breaks the
>
> if check.find('something'):
> do(somethingElse)
>
> idiom, which is a bit of a pity I think.
That idiom is spelled:
if 'something' in ch
> Well, I this is another idiom in itself, right?
> Your checking if something is part of an iterable.
> I'm checking truth before entering a conditional expression.
I'm not sure I follow. I simply replaced your
if check.find('something')
with
if 'something' in check:
which (1) is more
> D:\>python
> 'python' is not recognized as an internal or external command,
> operable program or batch file.
[snip]
> For some strange reason, python is not recognized at the command
> prompt.
Sounds like your path isn't set correctly. See the first section
here[1] on "Finding python.exe"
-t
>> [1]http://www.imladris.com/Scripts/PythonForWindows.html
>
> I set the pythonpath to where the python interpreter is located C:
> \Python24
> However I still get the same error message. Is there something else
> that must be configured?
Make sure you're setting your PATH, not your PYTHONPATH v
dent that I wasn't being serious.
>
>Ooh, now I'm curious.
Seriously? You didn't know that $#x in perl returns the length of the
array @x, minus 1?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ked it enough that they've asked for another.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
be relative if the symbolic link is relative, and absolute if the
symbolic link is absolute.
ln -s ../../over/there here1
ln -s /home/timr/spot here2
"here1" is a relative link. "here2" is an absolute link.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
gert wrote:
> On Nov 2, 12:27 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
>> gert wrote:
>>> class Test(object):
>>> def execute(self,v):
>>> return v
>>> def escape(v):
>>> return v
>>> if __name__ == '__main__':
>>> gert = Test()
>>> print gert.m1('1')
>>> pri
Neil Cerutti wrote:
> On 2007-11-01, Chris Mellon <[EMAIL PROTECTED]> wrote:
>> On Nov 1, 2007 3:01 PM, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>>> On 2007-11-01, Lee Capps <[EMAIL PROTECTED]> wrote:
On Nov 1, 2007, at 1:45 PM, braver wrote:
> Greetings -- as a long time user of both Pytho
Windows.
Ctl 1-5: FreeBSD, Cygwin/X (local or connected to FreeBSD), Windows - i.e.
Does not seem to work anywhere.
Ideas anyone?
--
Tim Daneliuk [EMAIL PROTECTED]
PGP Key: http://www.tundraware.com
[Tim Peters]
...
>> Huh. I don't read it that way. If it said "numbers can be ..." I
>> might, but reading that way seems to requires effort to overlook the
>> "decimal" in "decimal numbers can be ...".
[Nick Maclaren]
> I wouldn'
n by "used during a lot of trials and errors"? sys.path is
recreated from scratch every time Python starts. It doesn't accumulate
over time, other than from new packages that you install.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
I clean before a compile.
The exe contains all the modules (pyc) listed in the trace back message
(linecache, zipextimporter, and optparse), except boot_common.py. Should
that be in the exe?
I'm trying to build on Windows XP using Python 2.4.4 and py2exe 0.6.5
Thanks.
--
Tim Wise
-Ori
On 12 Jan 2007 09:16:51 -0800, CSUIDL PROGRAMMEr <[EMAIL PROTECTED]> wrote:
> I have a filename
> cairo-2.3.4.src.rpm
> Is there any way i can only get 2.3.4 from this file name
Is this a one off, or do you have to process multiple files with similar names?
--
Tim Wi
ngs\User\My Documents\My Python files\wxDemos'. And AnalogClock.py
>does work when residing in that directory.
wxDemos contains the demos. The "wx" module lives in
site-packages\wx-2.8-msw-ansi. Did you leave that in?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Thierry Lam wrote:
> I'm using the WMI library for python and I was able to connect to
> another computer on the network with the following line:
>
> c = wmi.WMI(computer="the-network-computer", user="hello",
> password="hello")
>
> Is there a way to write information to a file on that computer?
>
On 13 Jan 2007 02:01:11 -0800, Tim Golden <[EMAIL PROTECTED]> wrote:
> Thierry Lam wrote:
> > I'm using the WMI library for python and I was able to connect to
> > another computer on the network with the following line:
> >
> > c = wmi.WMI(comput
[Nick Maclaren]
>> ...
>> Yes, but that wasn't their point. It was that in (say) iterative
>> algorithms, the error builds up by a factor of the base at every
>> step. If it wasn't for the fact that errors build up, almost all
>> programs could ignore numerical analysis and still get reliable
>> a
utation twice, once to
compute the minimum, once to compute the maximum. When you're done, you
can be confident that the true answer lies within the interval.
For people just getting into it, it can be shocking to realize just how
wide the interval can become after some computations.
--
Tim R
On 15 Jan 2007 00:52:33 -0800, Torabisu <[EMAIL PROTECTED]> wrote:
>
> Duncan Smith wrote:
> > Hello,
> > I find myself in the, for me, unusual (and at the moment unique)
> > position of having to write a web application. I have quite a lot of
> > existing Python code that will form part of t
abcd wrote:
> I have a class such as...
[... ]
> And I am storing them in a Queue.Queue...
>
> import Queue
> q = Queue.Queue()
> q.put(Foo('blah'))
> q.put(Foo('hello world'))
> q.put(Foo('test'))
>
> how can I search "q" for an instance of Foo which has 'id' equal to say
> 2? Typically a queue
On 16/01/07, Ralf Schönian <[EMAIL PROTECTED]> wrote:
>
> I would also like to vote for Karrigell.
>
> BTW: Does anyone knows how to avoid stopping/starting of the webserver
> after changing external libraries? I have some own modules under
> /opt/local/python/lib and import them by extending the
awel wrote:
> I'm new in python and I would like to know if it's possible to check if
> a specific windows service is present and if it's possible how can I
> do?
This is one way:
http://tgolden.sc.sabren.com/python/wmi_cookbook.html#automatic_services
You'd have to change that example slightly
On 16/01/07, gandalf gold <[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> I was trying out smtplib and found out that I can email to anyone in my
> domain but not to an email address not in the domain. From browsing on the
> web, it seems that this has to do with the configuration of the mail serve
awel wrote:
> Sorry, but could you give me an example with a real service 'cause I've
> tried this script but nothings happened, no error, nothings ; even if I
> launch it in cmd prompt.
Well, as that example said, it was designed to show
automatic services which are not running. If you don't
have
On 17 Jan 2007 04:50:33 -0800, Will McGugan <[EMAIL PROTECTED]> wrote:
>
> Will McGugan wrote:
>
> > Hi,
> >
> > I'd like a generator that takes a sequence and yields tuples containing
> > n items of the sqeuence, but ignoring the 'odd' items. For example
>
> Forgot to add, for my purposes I will a
peed of light actually was in
furlongs per fortnight.
Now I need to figure out how to work that into a cocktail party
conversation. "Hey, the deficit isn't the only thing that is approaching
1.8 trillion..."
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ice. You either need to switch to a one of the web
frameworks (like CherryPy or Django or WebWare or one of the hundreds of
others), or move to PHP.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
"Lad" <[EMAIL PROTECTED]> wrote:
>
>What is a good way to read binary data from HUGE file and write it
>to another file?
How huge? I regularly process 100-megabyte MPEG files in Python, both by
reading the whole thing in as a string, and by using "mmap" t
27;] = 'hello'
>py> os.popen('echo $asdfasdf').read()
>'hello\n'
For completeness, let us anticipate the followup question and point out
that "permanent" here means "for this process and any processes that it
spawns". Once the Python session ends, the "asdfasdf" will be lost.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
>
>http://docs.python.org/ref/Booleans.html
>
>In 'expression' rule - what does 'if', 'else' mean? I guess 'if' and
>'else' must be keywords, not non-terminals.
Yes, those refer to literal keywords.
I'd judge both of those as erro
On 24/01/07, py <[EMAIL PROTECTED]> wrote:
> I would love for anybody to comment on this code with regard to
> redundancy/efficiency/wordiness or whatever else.
> for instance, do i understand correctly that i cant have a try: else: without
> an intervening except:?
> -dave
>
> stdout.wri
On 24/01/07, BJ Swope <[EMAIL PROTECTED]> wrote:
>
>
>
> On 1/24/07, Tim Williams <[EMAIL PROTECTED]> wrote:
> >
> > On 24/01/07, py <[EMAIL PROTECTED]> wrote:
> > > I would love for anybody to comment on this code with regard to
> redun
; But note that 'in' performs a substring search and therefore "yn" and ""
> > would be accepted as valid answers, too.
>
> Mmm, right. Thanks for the correction.
>
> =>
>while not usrinp.lower() in ['y', 'n']:
or better still
while usrinp.lower() not in ['y', 'n']:
:):)
--
Tim Williams
--
http://mail.python.org/mailman/listinfo/python-list
[Stuart D. Gathman]
> I am trying to create a doctest test case for the following:
>
> def quote_value(s):
> """Quote the value for a key-value pair in Received-SPF header
> field if needed. No quoting needed for a dot-atom value.
>
> >>> quote_value(r'abc\def')
> '"abcdef"
> Does anyone have any experience having python deal with sleep mode? I'd
> love to run something that would hear a sleep event coming and pickle
> some data before sleep, then after coming out of sleep, unpickle...
It should, in theory, be possibly by trapping the WMI
Win32_PowerManagementEvent
Dongsheng Ruan wrote:
> I remember that in python there is some kind of dummy statement that just
> holds space and does nothing.
>
> I want it to hold the place after a something like if a>b: do nothing
>
> I can't just leave the space blank after if statement because there will be
> error mes
>Here is a prove:-
>>>> import win32com
>
>Traceback (most recent call last):
> File "", line 1, in
>import win32com
>ImportError: No module named win32com
>>>>
>
>you try in your computer
It works just fine in my computer, because I
ating different GUIDs every time you register the thing. If
so, you need to unregister the old version before you register a new one.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Lance Hoffmeyer wrote:
> I ran makepy.py and loaded Microsoft Excel Object Library 11.0
> I have imported:
>
> import win32com.client
> from win32com.client import constants
> import re
> import codecs,win32com.client
> import time
> import datetime
> import win32com.client.dynamic
>
>
> using t
s Driver (*.mdb)};DBQ=x.mdb" )
cmd = win32com.client.Dispatch('ADODB.Command')
cmd.ActiveConnection = conn
cmd.CommandText = "SELECT firstname,lastname FROM users;"
rs = cmd.Execute()[0]
while not rs.EOF:
# Use elements of rs
rs.MoveNext()
There are samples on
billie wrote:
> Hi there,
> I would like to submit a username/password pair to a Windows NT
> workstation and find out if it's valid.
> Moreover I would like to get the user's home directory given the
> username.
> Does it is possible to do that by using pywin32 extension?
http://timgolden.me.uk/p
billie wrote:
> Do you got any idea about how getting user's home directory?
The answer to that is unfortunately slightly complicated,
because Windows has no such thing as a "user's home directory"
or, if you prefer, it has several such things.
If you want, you can let Python make the decision,
billie wrote:
> Another question, I'm sorry.
> Do you got any idea about how to get permissions of a file/directory
> given the username?
> For example: I would like to know if C:\my_file.ext is readable/
> writable by user 'x' or not.
This is an unfortunately messy question. The easiest
answer --
Tim Golden wrote:
> billie wrote:
>> Another question, I'm sorry.
>> Do you got any idea about how to get permissions of a file/directory
>> given the username?
>> For example: I would like to know if C:\my_file.ext is readable/
>> writable by user 'x
[EMAIL PROTECTED] wrote:
> Here is my current setup:
>
> [... BSD ...]
> - Windows XP machine with folder share (What packet is sent over the
> network to remotely shutdown a Windows XP machine?)
>
> My hope is to have a script then when you start it will list all your
> remote computers/servers
Youth work in Ealing).
Tim Golden
--
http://mail.python.org/mailman/listinfo/python-list
Endless Story wrote:
> On Feb 16, 9:56 am, "Jim" <[EMAIL PROTECTED]> wrote:
>> On Feb 16, 5:52 am, "Endless Story" <[EMAIL PROTECTED]> wrote:
>> Are you talking about the Environment Variables-->System Variable-->path?
>> You may want to right click on My Computer-->System Properties-->Advanced-->
Kooch54 wrote:
>> Thanks for your response and Uwe I apologize if I misunderstood
>> and misinterpreted your comments. I am sorry.
>> I have tried Tim's module called active_directory and it works really
>> well. But I can't figure out how to connect to a specific group is I
>> know the comm
On 20/02/07, Wolfgang Draxinger <[EMAIL PROTECTED]> wrote:
> H folks,
>
> I got, hmm not really a problem, more a question of elegance:
>
> In a current project I have to read in some files in a given
> directory in chronological order, so that I can concatenate the
> contents in those files into a
[EMAIL PROTECTED] wrote:
> Hello All,
>
> I'm a newbie to Python!
>
> I am trying to develop a program that monitors the performance of an
> application. The kind of information I am interested in is the CPU/
> Process/Thread and memory performance. Specifically, I would like to
> track the foll
[EMAIL PROTECTED] wrote:
> The phone reference is actually because the target device is WM 5.0.
> I've found a python port Pyce that will run on this platform. We have
> a target application that runs on this platform which we would like to
> develop some automated tests for. The application is w
Philipp Pagel wrote:
> David C. Ullrich <[EMAIL PROTECTED]> wrote:
>> Is there a csvlib out there somewhere?
>
> How about csv in the standard library?
>
>> (Um: Believe it or not I'm _still_ using
>> python 1.5.7.
>
> I have no idea if csv was part of the standard library backin those
> days...
"Peter Bengtsson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Feb 23, 2:38 pm, [EMAIL PROTECTED] wrote:
>> Hi,
>>
>> I'm updating my program to Python 2.5, but I keep running into
>> encoding problems. I have no ecodings defined at the start of any of
>> my scripts. What I'd l
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In <[EMAIL PROTECTED]>, Tim Arnold wrote:
>
> Untested:
>
> import os, sys, codecs
>
> def checkfile(filename):
>f = codecs.open(filename
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In <[EMAIL PROTECTED]>, Tim Arnold wrote:
>
>> Here's what I do (I need to know the line number).
>>
>> import os,sys,codecs
>> def c
Nader Emami wrote:
> L.S.,
>
> I have installed locally Python-2.4.4 without any problem. Then I would
> install the "ez_setup.py" to be able using of "easy_install" tool, but I
> get the next error:
>
> %python ez_setup.py
> Traceback (most recent call last):
>File "ez_setup.py", line 223,
Nader Emami wrote:
> Tim Golden wrote:
>> Nader Emami wrote:
>>> L.S.,
>>>
>>> I have installed locally Python-2.4.4 without any problem. Then I
>>> would install the "ez_setup.py" to be able using of "easy_install"
>>>
Nader Emami wrote:
>>> How can do the second solution, (take off the home from Python path)?
>>
>> Depends on your setup. Since you're on *nix, I can't
>> test whether $HOME is automatically on sys.path (it
>> isn't on Win32). Are you running *in* /usr/people/emami?
>> If so, go somewhere else bef
Nader Emami wrote:
> Tim Golden wrote:
>> Nader Emami wrote:
>>
>>>>> How can do the second solution, (take off the home from Python path)?
>>>>
>>>> Depends on your setup. Since you're on *nix, I can't
>>>> test whether
Nader Emami wrote:
> Tim Golden wrote:
>> Nader Emami wrote:
>>> Tim Golden wrote:
>>>> Nader Emami wrote:
>>>>
>>>>>>> How can do the second solution, (take off the home from Python
>>>>>>> path)?
>>>
OK. He's solved it. For the historical record...
Tim Golden wrote:
> Nader Emami wrote:
>> Tim Golden wrote:
>>> Nader Emami wrote:
>>>> Tim Golden wrote:
>>>>> Nader Emami wrote:
>>>>>
>>>>>&
Phoe6 wrote:
> Hi all,
> I am trying to disable the NIC card (and other cards) enabled in my
> machine to test diagnostics on that card.
> I am trying to disable it programmatic using python. I checked python
> wmi and i could not find ways to disable/enable, (listing is however,
> possible).
Sinc
[EMAIL PROTECTED] wrote:
> The problem I have is that since I import WMI, it takes a long time
> and we have users complaining about it. So I stuck the import
> statement into a separate thread and set it to a daemon so it could do
> its thing in the background and the rest of the script would fin
guage has identifiers
>such as __device__, __global__, __shared__, etc. Is it a coincidence?
>Probably it is. :)
Well, identifiers starting with an underline are reserved for
implementation use in ISO standard C++, so the chicken and egg question is
an interesting one..
--
Tim Roberts,
[EMAIL PROTECTED] wrote:
> On Feb 27, 3:32 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> The problem I have is that since I import WMI, it takes a long time
>>> and we have users complaining about it. So I stuck the import
>>> s
[... re getting free disk space ...]
Sick Monkey wrote:
> Here you are:
>
> >>> from win32com.client import GetObject
wmiObj = GetObject("winmgmts:MGW01641\\root\\cimv2")
diskinfo = wmiObj.ExecQuery("Select * from Win32_LogicalDisk")
for disk in diskinfo:
> ...print disk.N
kevinliu23 wrote:
> Thanks so much for the help guys. I got the code Sick Monkey provided
> to work on my computer. Now I"m more confused than ever though. :) I
> thought the only standard modules provided by Python are listed here:
>
> http://docs.python.org/modindex.html
>
> But it appears that
kevinliu23 wrote:
> Just tried your solution Tim, worked like a charm. :)
>
> It's great because I don't even have to worry about the computer name.
> A question regarding the rootPath parameter...how would I be passing
> it? Would I be passing it as...
>
>tu
[EMAIL PROTECTED] wrote:
> HI,
>
> I am new to Python and wanted to know how to check for the remaining
> disk space on my Windows machine using Python? I was thinking of using
> the command line "dir" and trying to extract the output from there.
> But I'm not sure how to extract command line stri
Pablo was Paolo wrote:
> [EMAIL PROTECTED] ha scritto:
>> If you want to work directly with the files why not just use Python's csv
>> module?
>
> Now, with Java, I use the same class to read several databases and csv
> files (with SQL instructions).
> I'd like to find a library for using the sam
Sick Monkey wrote:
> I am trying to build a python program that will reset a user's account
> (password) on a windows machine. I have been working with win32
> objects and was wondering if this functionality was already built in.
I'm going to assume that "win32 objects" is the stuff in the
pywin32
", and
that DOES require registering the .py extension and adding .py to the
PATHEXT environment variable.
A very useful thing to do, by the way. I have many command line tools for
which I have forgotten whether they are batch files, small executables, or
Python scripts. And that's
loial wrote:
> I am writing a file in python with writelines
>
> f = open('/home/john/myfile',"w")
> f.writelines("line1\n")
> f.writelines("line2\n")
> f.close()
>
> But whenever I try to do anything with the file in python it finds no
> data. I am trying ftp, copying the file...the resultant f
not an expert here ;-)
Yes, that's strictly for COM. And the "App Paths" registry key you
mentioned is only for Explorer things, like the Start menu's "Run" box. It
doesn't apply to the command line. Try typing "wordpad" in a cmd shell,
then try it
4301 - 4400 of 7638 matches
Mail list logo