w
Interesting. If true, that is incorrect behavior.
>And does anyone have a general routine that lets one also have Bcc:
>addresses usign SMTP?
To make a Bcc, all you do is include the address in the RECEIVERS list, but
don't mention it in the body at all.
--
Tim Roberts, [E
LaundroMat wrote:
Hi -
I'm trying to calculate unique hash values for binary files,
independent of their location and filename, and I was wondering
whether I'm going in the right direction.
Basically, the hash values are calculated thusly:
f = open('binaryfile.bin')
import hashlib
h = hashlib.
u trying to DO with the datastore?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ith less sand and more dirt.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Virgil Stokes wrote:
I would appreciate python code for creating *.cab files.
I'm not aware of any existing modules for creating
CABs. I thought there were some MS API calls for
doing that kind of thing but a quick search hasn't
shown anything up.
You may have to roll your own:
http://support
>> time.mktime(t)
>Traceback (most recent call last):
> File "", line 1, in
>OverflowError: mktime argument out of range
What time zone are you in? March 30, 2008, was a Sunday. If that happened
to be the date your country transitioned to summer time, th
Lowell Alleman wrote:
I'm running into this issue on Windows with the follow exception at
the time when the signal handler is called:
Traceback (most recent call last):
...
self.done.wait(30)
File "D:\Python24\lib\threading.py", line 348, in wait
self.__cond.wait(timeout)
File "D:
norseman wrote:
Tim;
Finally got a chance to test your snippet. Thank you for it!
I took the liberty of flushing it out a bit.
#!/---
#
import os
import win32com.client
excel = win32com.client.Dispatch( 'Excel.Application' )
excel.Visible=1#
甜瓜 wrote:
Howdy everyone,
I saw a strange python code in pygame project. What does "while
not(x&528or x in l):" mean? Below code works in python2.5, so "x&528"
is not HTML strings.
Well I can't say I'd format it that way myself,
but it is valid. More conventionally laid out
the expression look
甜瓜 wrote:
Howdy everyone,
I saw a strange python code in pygame project. What does "while
not(x&528or x in l):" mean? Below code works in python2.5, so "x&528"
is not HTML strings.
Well I can't say I'd format it that way myself,
but it is valid. More conventionally laid out
the expression look
> I was wondering what motivated so many people to give so much to the
> Python community.
fear, surprise, ruthless efficiency, an almost fanatical devotion
to the BDFL, and nice red uniforms.
Oh...
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
asonable?
Typically, an FTP server dedicates one thread/process per logged in
session. That process changes to the logged in user's identity as soon as
it gets the username and password, and stays there forever. There is no
need to switch back to root in between. The principle o
ate a clean slate database file
And such gluing is a very bad idea, because it is apparently hiding the
real cause of your problems. Get rid of the try/except/pass sequences
until you understand what is failing.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
0],
>[7, 4, 1],
>[8, 5, 2]])
In [10]: numpy.rot90(a, 3)
Out[10]:
array([[6, 3, 0],
[7, 4, 1],
[8, 5, 2]])
Tim
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> That's not a problem - I'm only interested in Win2k+. Thanks for the
> caveat.
>
> On a similar note, is there a way (preferably using WMI) to get the
> full path to the executable that has a port open (the same thing that
> fport does, just implemented in Python)?
It
, 0, 0],
> [0, 0, 0]])
>
>?
If you don't want changes to D to affect E, then you need to disconnect
them when you create them. If you create D and E so that they contain
references to the same lists, then this kind of thing will happen.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
2bit or 64bit, no mixed ...
>
>Crap, no way to make a 32 bit load, even using the wowexec?
No. In Win64, a process is either entirely 32-bit, or entirely 64-bit. To
do the kind of crossing you seek, you would need to create a separate
process for the 32-bit DLL and use interprocess communication.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
A, B, F => ABEF (or ABCF)
> A, F, C => ABCF
> A, E, D => ABCD
>E
>
> Thanks!
> --Buck
This leaps to mind:
http://en.wikipedia.org/wiki/Kruskal's_algorithm
The implementation details are left to the reader ;)
--
---
a
generic Sudoku solver in a 65-byte executable. Yes, that's 65 BYTES -- not
KB, not MB.
I consider myself an x86 assembler expert, but I remain in awe of that
code.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
haxier wrote:
> I've some experience with Python in desktop apps, but now I'm looking
> to code a tool like Kee-Pass[1] which must have access to some low-
> level primitives in a windows environment: hooks when windows are
> displayed, automatic form fill, and so on in a variety of scenarios
> (de
Paul Boddie wrote:
> ... I've come to realise that most object-relational mappers are
> solving the wrong problems: they pretend that the database is somehow
> the wrong representation whilst being a fast enough black box for
> holding persistent data (although I doubt that many people push the
> b
Marco Mariani wrote:
> Tim Golden wrote:
>
>> I've recently used Elixir and found it very useful for a small-scale
>> database with no more than a dozen tables, well-structured and
>> easily understood. I'd certainly use it again for anything like that
>>
> it seems to me from my results that when i use a while-loop it
> will execute once after the condition is met.
Nope.
> ie the conditions is met the code executes one time more and
> then quits.
Must be that your conditional is wrong, or your conditions are
not updated the way you think they a
> I always do it the first way. It is simpler, and should be faster.
Ditto. Using int() is best. It's clear, it's correct, and it
should be as fast as it gets.
>> if c in '0123456789':
>>print "integer"
>> else:
>>print "char"
>
> Also, the second way will only work on single-digit num
all I know is the Group names and the permissions I
need to allow.
thanks for any pointers,
--Tim Arnold
--
http://mail.python.org/mailman/listinfo/python-list
"Mike Driscoll" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote:
>>
> According to the following thread, you can use os.chmod on Windows:
>
> http://mail.python.org/p
Tim Arnold wrote:
> "Mike Driscoll" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote:
>>>
>
>> According to the following thread, you can use os.chmod
> f = open("/tmp/data.txt", 'w')
>
> will open that file.
>
> You can throw the first line away with
>
> headings = f.next()
>
> Then you can loop over the rest with
>
> for name, aa, topo, access, dssp, stride, z in file:
> #
> # Then process each line here
Small caveat here...Ste
"Tim Golden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Tim Arnold wrote:
>> "Mike Driscoll" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>> On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROT
index that is 1.6-0.4 and one
index that is 0.8+0.4, and the two won't be the same.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
> First question, what sort of 'thing' is the file object, I need to
> know that if I'm to look up ways of using it.
you can always use
type(thing)
to find out what type it is.
> Second question, even if I know what sort of thing a file object
> is, how do I find methods appl
Huayang Xia wrote:
> On Apr 11, 12:15 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> En Thu, 10 Apr 2008 18:45:04 -0300, Huayang Xia <[EMAIL PROTECTED]>
>> escribió:
>>
>>> I am trying to use ctypes to call dll functions. One of the functions
>>> requires argument "struct IDispatch* ". I d
rdahlstrom wrote:
> On Apr 11, 1:45 pm, rdahlstrom <[EMAIL PROTECTED]> wrote:
>> Does anyone know how to determine the window status (Running or Not
>> Responding)? I've tried various methods with no success...
>>
>> This would be on a variety of Windows systems, but all at least XP,
>> and mostly
Mike Driscoll wrote:
> http://www.informit.com/articles/article.aspx?p=19489&seqNum=4
>
> If you're better than I am, you can probably translate this to the
> Python equivalent. Zenoss also has some monitoring software that's
> open source Python code.
I'm afraid that article only allows you to d
Ross Ridge wrote:
> rdahlstrom <[EMAIL PROTECTED]> wrote:
>> Basically, I'm looking for something similar to the Process.Responding
>> property in System.Diagnostics...
>
> You probably want to use IsHungAppWindow():
Brilliant! So simple when you find out. Thanks.
(Added to my list of things I
Malcolm Greene wrote:
> Is there a consolidated list of "from __future__ import" options to
> choose from?
Well, that bit's easy:
import __future__
print __future__.all_feature_names
TJG
--
http://mail.python.org/mailman/listinfo/python-list
't go any faster than your
slowest link.
>Are threads available and as effective in SUSE as they are in Windows?
Threads are available in Linux. There is considerable debate over the
relative performace improvement.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
> new_file = open('filename.txt', 'w')
> params = open('eggs.txt', 'r')
> do all the python stuff here
> new_file.close()
>
> If these files followed a naming convention such as 1.txt and 2.txt I
> can easily see how these could be parsed consecutively in a loop.
> However, they are not and
[EMAIL PROTECTED] wrote:
> I'd like to be able to get the path to the oldest folder in whatever
> directory I'm currently in.
And just because I'm feeling silly:
import os
print os.popen ("dir /b /ad /od /tc c:\python25\lib\site-packages").readline ()
TJG
--
http://mail.python.org/mailma
[EMAIL PROTECTED] wrote:
> I'd like to be able to get the path to the oldest folder in whatever
> directory
> I'm currently in. Is there a simple way to go about this?
> I'd like it to run on both OS X and Windows XP.
> I found this example but was curious if there's a better way to do this?
>> def nsplit(s,p,n):
>> n -= 1
>> l = s.split(p, n)
>> if len(l) < n:
>> l.extend([''] * (n - len(l)))
>> return l
>
> The split() method has a maxsplit parameter that I think does the same
> thing. For example:
>
temp = 'foo,bar,baz'
temp.split(',', 1)
> ['foo'
> I'm new to Python and the notion of lambda, and I'm trying to write a
> function that would have a varying number of nested for loops
> depending on parameter n. This just smells like a job for lambda for
> me, but I can't figure out how to do it. Any hint?
I'm not sure lambda is the tool to use
laptop.
>
>
>
> If I were you I would keep it a secret until a Hollywood producer
> offers big bucks for the film rights.
Who would play Guido, I wonder?
--
Tim Daneliuk [EMAIL PROTECTED]
PGP Key: http://www.tundraware.com/PGP/
--
http://mail.python.org/mailman/listinfo/python-list
MRAB wrote:
> On Apr 17, 5:22 am, Torsten Bronger <[EMAIL PROTECTED]>
> wrote:
>> Hallöchen!
>>
>> Tim Daneliuk writes:
>>> Daniel Fetchinson wrote:
>>>> [...]
>>>>> I just had one moment of exceptional clarity, during whi
Hi,
A quick question:
Is there any way for a python script to know if it's being executed by a
debug build of python (python_d.exe) instead of python?
Thanks
Tim
--
http://mail.python.org/mailman/listinfo/python-list
to include support functions that should not be exposed as web pages.
To do that, you just add an "exposed" attribute to the function:
class MyWebPage:
...
def index( self, ... ):
pass
index.exposed = 1
def notExposed( self, ... ):
pass
def request
Krishna wrote:
> I was trying to delete rows in an existing .xls file using python. How
> do I do that? I was using the following code, it seem to work if I
> type in python window, but if I save it in text editor and drage and
> drop the .py file, it doesnt work. What am I doing wrong here? Thank
SPJ wrote:
> I am writing a script which need's to convert an excel file to
> csv (text) format. For that I am using the following code:
>
> excel = win32com.client.Dispatch("Excel.Application","Quit")
> workbook = excel.Workbooks.Open(xlsfile)
> workbook.SaveAs(csvfile, FileFormat=2
Harishankar wrote:
On Tuesday 22 Apr 2008 18:00:02 Nick Craig-Wood wrote:
There is a recipe in the cookbook
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554
Which I've used and it works.
Thanks. I found that recipe too. I was hoping I could cook up something
similar without ha
John Nagle wrote:
Mike Driscoll wrote:
Ken,
On Tue, Apr 22, 2008 at 1:36 PM, Kenneth McDonald
<[EMAIL PROTECTED]> wrote:
Sadly.
Thanks,
Ken
--
http://mail.python.org/mailman/listinfo/python-list
I've attached the 2.4 version. I also have some Windows binaries for
Beautiful Soup uploade
Jared Grubb wrote:
I want a function that removes values from a list if a predicate
evaluates to True. The best I could come up with is:
Have a look at the itertools module, and the ifilter function
in particular.
TJG
--
http://mail.python.org/mailman/listinfo/python-list
Michael Ströder wrote:
Jason Scheirer wrote:
On Apr 23, 5:16 pm, [EMAIL PROTECTED] wrote:
Hello all, I am trying to integrate TurboGears with our Active
Directory here at the office. TurboGears aside, i cannot get this to
work.
Seems more promising:
http://tgolden.sc.sabren.com/python/activ
to figure out that lookahead stuff.
I'm not sure where to start now; I looked at BeautifulSoup and
BeautifulStoneSoup, but I can't see how to modify the actual tag.
thanks,
--Tim Arnold
--
http://mail.python.org/mailman/listinfo/python-list
"Gary Herron" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Tim Arnold wrote:
>> hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop
>> to create CHM files. That application really hates xhtml, so I need to
>> conv
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Tim Arnold" <[EMAIL PROTECTED]> writes:
>
>> hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop
>> to
>> create CHM files.
xml when I move to RH
linux next month. I've been using hp10.20 and never could get the requisite
libraries to compile. Once I make that move, maybe I won't have as many
markup related questions here!
thanks again to all for the great suggestions.
--Tim Arnold
--
http://mail.python.org/mailman/listinfo/python-list
José Roberto wrote:
Olá KellyK!
I have read your comentary about how to print with python in windows using win32print.
I have trying to use in my problem : print a figure (.jpg, .png...etc) could you help me?
Does this help?
http://timgolden.me.uk/python/win32_how_do_i/print.html#rough_and_re
)
>
>I tried this can got the same result...??
That's not what he meant. He meant:
jsfile = open("../timeline.js", "r")
jscontent = jsfile.readlines()
jsfile.close()
jsfile = open("../timeline.js", "w")
...etc...
You have to decide whether this makes m
, since Python is nearly ubiquitous, I suspect it is not so
important.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Paul Jefferson wrote:
I'm learning this and I'm making a program which takes RSS feeds and
processes them and then outputs them to a HTML file.
The problem I have is that some of the RSS feeds contain chachters which
I think are outside of the ascii range as when I attempt to write the
file con
a
custom driver. For low-bandwidth data sources, USB HID is an excellent way
to provide general-purpose access to a USB device.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Ohad Frand wrote:
I am looking for a way to get a list of all active logical hard drives
of the computer (["c:","d:"..])
You can do this with WMI [*] under Windows:
import wmi
c = wmi.WMI ()
for i in c.Win32_LogicalDisk ():
print i.Caption
If you want only fixed disks (ie exluding externa
Unknown Hero wrote:
Hi everyone!
Well, I have this need for a Python script that will scan through a
selected hive (like HKEY_LOCAL_MACHINE) and replace all strings that
contain word xxx (IE. foo) with yyy (IE. moo). I do not want partial
results, but rather complete strings (no foome or the lik
Unknown Hero wrote:
So basically I am looking for these things:
1) Read one subkey from HKEY_LOCAL_MACHINE at a time (I think
QueryValueEx() is needed here)
2) Check if said subkey contains some predetermined string (like 'foo'
here)
3) If the above applies, change the value into another predete
Unknown Hero wrote:
Tim Golden wrote:
[... snip long example ...]
Correct me if I'm wrong (which I just might be), but doesn't the above
code go through the keys behind HKEY_LOCAL_MACHINE\Software\Timsoft\ ?
Is it possible to use an empty value in:
hTimSoft = _winreg.OpenKe
In a spirit of being helpful... :)
The code below (which I imagine every Windows programmer writes
sometime in their Python life) mimics the os.walk functionality, yielding
the key, subkeys, and values under a particular starting point in the
registry. The "if __name__ == '__main__'" test run at
Mike Driscoll wrote:
On May 7, 4:45 am, Tim Golden <[EMAIL PROTECTED]> wrote:
In a spirit of being helpful... :)
[... snip registry walker ...]
This is pretty cool stuff, Tim. Of course, it would also seriously
screw up some programs if you decided to replace the wrong phrase.
Just
?
I think that's a perfectly reasonable thing to expect. At the risk of
over-generalization, there is no good reason why, by this point in time,
all of the standard library routines that accept strings shouldn't also
accept Unicode strings.
It's the duck typing principle. Unicode strings look, walk, and talk like
regular strings. An error like this is not intuitive.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
En Thu, 08 May 2008 09:55:36 -0300, Colin J. Williams <[EMAIL PROTECTED]>
escribió:
The readme.txt has:
All you need to do is open the workspace
"pcbuild.sln" in Visual Studio,
select the desired combination of
configuration and platform and eventually
build the solut
Florencio Cano wrote:
Hi,
I'm looking for a method of gathering information about the system
hardware and software installed using Python. I would like to do it in
UNIX and in Windows. I think that it would be good in Windows to look
in the registry and be able to parse and search it. Any pointer
Lawrence, Anna K (US SSA) wrote:
I am working on a web application using Pylons .0.9.6, SQLAlchemy 0.4.4,
MySQLdb 1.2.2 and Python 2.4.4.
We want to use utf8 encoding throughout and as far as I can see
everything is set properly between components and I’ve got a
sitecustomize.py in my site-pa
id. The shebang line (#!) must specify a full path. When you
saw the lone word ("perl"), it was probably a /usr/bin/env line, just we
have been discussing.
>I at a windows system now so I can't try it yet.
*IF* you are interested in playing with Linux, most of the dis
7;s on the screen, then I don't
think you have any option other than a screen capture utility, like "xwd".
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
/Templating>
>
>Thank a lote.
Allow me to second this idea. I used to be a huge HTMLgen fan, and I built
several CGI web sites using it, but I am now convinced that a templating
solution is better in virtually every case.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Lave wrote:
Hi, all !
I'm a totally newbie huh:)
I want to convert MS WORD docs to HTML, I found python windows
extension win32com can make this. But I can't find the method, and I
can't find any document helpful.
You have broadly two approaches here, both
involving automating Word (ie using
device's FIFO, and a
webcam video stream. It was easy to add a bit of randomness to simulate
poor conditions, and I got my answer in short order.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
R. Bernstein wrote:
I don't know how well Microsoft Windows allows for sending a process a
signal in Python, but if the Python signal module works reasonably
well on Microsoft Windows, then reread
http://bashdb.sourceforge.net/pydb/pydb/lib/node38.html
The answer is: not terribly well. (Or, rat
ext.
Windows requires special handling to create a DC within a WM_PAINT handler
(which is what calls OnPaint). That's why wx.PaintDC is separate. Outside
of OnPaint, you'd usually use wx.ClientDC.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ases information content.
Most Python functions do not have a large set of locals().
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Wayne Watson wrote:
Python doesn't like this:
junkfile = open('c:\tmp\junkpythonfile','w')
I get
junkfile = open('c:\tmp\junkpythonfile','w')
IOError: [Errno 2] No such file or directory: 'c:\tmp\\junkpythonfile'
The clue, if you needed one, is there in that traceback.
Notice the *single
ame, mode)
WindowsError: [Error 127] The specified procedure could not be found
Best regards,
Tim
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
Start the application in a separate console (using `start "" bat_file`
might be the easiest way) and then, within your Python script, wait
until the new process is ready. The wmi module by Tim Golden can help
<http://tgolden.sc.sabren.com/python/wmi.htm
Haeyoung Kim wrote:
Hi.
I'm migrating a VBScript into python.
How should I convert Date type parameter in VBScript's COM interface
with win32com?
I couldn't find any answer yet...
Could you give an example of code you're trying
to translate? Normally it's quite simple, but
different subsyste
Marc 'BlackJack' Rintsch wrote:
On Wed, 27 Aug 2008 08:32:52 -0700, [EMAIL PROTECTED] wrote:
Thanks for your reply Simon.
I will read the article you told me to but first, please, have a look at
this snippet:
[... snipped snippet plus Mark's comment ...]
I think, in short, the best thing fo
ving anything.
>Even in sequential access speed benefits, by avoiding the construction
>of n-1 objects.
This is a fairly major change, because it requires a "struct.Struct" object
to maintain state, something that the "struct" module currently does not
do.
In my personal opinion, this is a rather large and confusing change, for
very little benefit.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
taghi wrote:
I want to call NetShareEnum, a function from netapi32.dll
Not a straightforward answer but... are you aware that
this particular call is already wrapped by the pywin32
packages:
https://sourceforge.net/projects/pywin32/
http://timgolden.me.uk/pywin32-docs/win32net__NetShareEnum_m
aditya shukla wrote:
Hello folks,
I am creating a python script[windows vista and python2.5] which
accesses another program(prog2).I my python script i am creating a
temporary file and i write the output of prog2
in this temporary file.
temp =
tempfile.NamedTemporaryFile(suffix='_suffix',pr
taghi wrote:
I wrote this code in python 2.5:
from ctypes import *
... snip ...
netapi32=cdll.LoadLibrary('netapi32.dll')
This is your problem: netapi32 is a windows
DLL and needs to be attached as such:
netapi32 = windll.LoadLibrary ("netapi32.dll")
or, more simply:
netapi32 = win
taghi wrote:
I wrote this code in python 2.5:
from ctypes import *
... snip ...
netapi32=cdll.LoadLibrary('netapi32.dll')
This is your problem: netapi32 is a windows
DLL and needs to be attached as such:
netapi32 = windll.LoadLibrary ("netapi32.dll")
or, more simply:
netapi32 = win
Michel Lespinasse wrote:
Hi,
I hit an issue with the following python code:
try:
get_orient = subprocess.Popen (['jpegexiforient', '-n', pathfull],
stdin = subprocess.PIPE,
stdout = subprocess.PIPE)
ot;999 over there","zip":"5"},
> ]
I think I'd make a class with members name, address, zip, etc. Then
make a list of instances of that class or (better for access) identify
a primary key -- what *is* unique about each entry -- and use that as
a dictionary key with class instances as values. Or use a DBMS.
Certainly the original poster should read up on database design, or
chances are he'll have a nightmare maintaining referential integrity.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
Mohamed Yousef wrote:
let's say , I'm moving large files through network between devices
what is the fastest way to do this ?
what i came up with :-
Use your OS's network copy command. On unix, that was once uucp. On
Windows, I drag-and-drop to/from a Network Neighborho
[EMAIL PROTECTED] wrote:
HI,
i would like to know if there is a way to create a python script for
automate mstsc.exe username and pwd credential, i mean i would create
a script that first open mstsc.exe and in the same time is able to
fill [computer+username+pwd].
Haven't tried it, but in princ
GHUM wrote:
hSem = win32event.CreateSemaphore (None, 1,
1,"stringincludinginterfaceandport")
rt=win32event.WaitForSingleObject (hSem, 0)
if rt != win32event.WAIT_TIMEOUT:
really_do_start_my_app()
else:
print "application allready running"
to make sure that only ONE instance of the applicat
GHUM wrote:
Tim,
... why use a Semaphore rather than a Mutex?
as much as I understood the documentation at MSDN
http://msdn.microsoft.com/en-us/library/ms686927(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms686946(VS.85).aspx
a mutex seems to be nothing else than a special case of
ou were proposing them
as new additions.
Because of that, the rest of my post doesn't make much sense.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ue, or am I doing something wrong?
Both. U+012B is the Latin lower-case i with macron (i with a bar instead
of a dot). That character does not exist in the 8-bit character set CP437,
which you are trying to use.
If you choose an 8-bit character set that includes i-with-macron, then it
will work. UTF-8 would be a good choice. It's in ISO-8859-10.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
x in the general case, because your page might
already contain "&". If it is possible that some of them might be
wrong while some are right, you can do something like:
s = s.replace( '&', '&' ).replace( '&', '&' )
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Mike P wrote:
I'm trying to use the CSV module to read in some data and then use a
hashable method (as there are millions of records) to find unique ids
and push these out to another file,
You could either zip with a counter or use the uuid module,
depending on just how unique you want your ids
aths "seem" to be okay, but there must still be something that I'm
missing.
Tim
Martin (gzlist) wrote:
On 26/08/2008, Tim Grove <[EMAIL PROTECTED]> wrote:
Any ideas why a particular dll won't load on Windows XP Pro using
ctypes?
I'm going to take
5801 - 5900 of 7704 matches
Mail list logo