Python ctypes on win64
Hi, Does anybody know if python includes a win64 version of ctypes? According to the documentation it should be included - at least there's no special remarks for win64, and I haven't found any recent notes saying that it shouldn't work on win64. Yet it looks like both the installer from Python.org and from ActiveState.com have disabled it. regards /ulfw -- http://mail.python.org/mailman/listinfo/python-list
Re: Python ctypes on win64
On Jul 25, 3:09 am, a...@pythoncraft.com (Aahz) wrote: > In article , Thanks, I'll try there. > > ulf wrote: > > >Does anybody know if python includes a win64 version ofctypes? > > >According to the documentation it should be included - at least > >there's no special remarks for win64, and I haven't found any recent > >notes saying that it shouldn't work on win64. Yet it looks like both > >the installer from Python.org and from ActiveState.com have disabled > >it. > > Nobody seems to have followed up to this, you may have better luck on > the capi-sig mailing list. > -- > Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ > > "At Resolver we've found it useful to short-circuit any doubt and just > refer to comments in code as 'lies'. :-)" > --Michael Foord paraphrases Christian Muirhead on python-dev, 2009-03-22 -- http://mail.python.org/mailman/listinfo/python-list
loading multiple module with same name using importlib.machinery.SourceFileLoader
I have observed this behaviour, for some reason only on OS X (and Python 3.5.1): I use importlib.machinery.SourceFileLoader to load a long list of modules. The modules are not located in the loader path, and many of them have the same name, i.e. I would have: m1 = importlib.machinery.SourceFileLoader("Module","path/to/m1/Module.py") m2 = importlib.machinery.SourceFileLoader("Module","path/to/m2/Module.py") Sometimes the modules will contain members from other modules with the same name, e.g. m1/module.py would define a function "m1func" that does not exist in m2/module.py, but the function would appear in m2, and examining m2.m1func.__code__.co_filename shows that it comes from m1. Members that are defined in both m1 and m2 are not overwritten, though. Is this a bug in importlib.machinery.SourceFileLoader or are we in the Land of Undefined Behaviour here? -- https://mail.python.org/mailman/listinfo/python-list
Re: Open Folder in Desktop
Kamilche wrote: Is there a command you can execute in Python that will open a window on the desktop, such as 'My Documents'? Kind of like 'system', but for folder names, not just programs. I'm running on Windows 2000. Maybe this is good enough? os.system("explorer " + folder_path) /ug -- http://mail.python.org/mailman/listinfo/python-list
Re: Python mail filter
Mailer wrote: The basic premise, as I understand is this: Read mail from stdin Parse headers etc using rfc822 or email module Process # Now I need to do one of the following: # Discard mail # Pass through # Forward to another account, possibly modifying the mail Now that I have coded up some stuff, the first looks easy - mails are getting lost. So the question is (may not be entirely specific to Python), how do I achieve the other two? Currently, I have set up a .forward that pipes the mail to my script. I can verify that this works by dumping the contents to a file. If I write to stdout, however, the mail is not delivered. That doesn't quite look right either - it's probably too late for the MTA to pick up. What I want to do is to pass the processed mail back to Postfix so it can deliver it to the correct local mail box. I think something like this might work (snipped from a small script I use to email log files to myself): smtp = smtplib.SMTP('localhost') smtp.sendmail(sender, rcpt, msg.as_string()) smtp.close() Regardless of MTA software, this should resend whatever is in msg (in my case a MIMEMultipart). If it should be forwarded, just change rcpt and the To: header. Unless of course, the server is configured to block messages sent by localhost claiming to be from somewhere else... /ug -- http://mail.python.org/mailman/listinfo/python-list
Re: goto, cls, wait commands
Bruno Desthuilliers wrote: Duncan Booth a écrit : BOOGIEMAN wrote: Secondly, how do I clear screen (cls) from text and other content ? That depends on your computer, and how you are running your program. One way which *might* work is: import os os.system("cls") *might* work... !-) [EMAIL PROTECTED] modulix $ cls -bash: cls: command not found Bad luck ! didn't work !-) Works for me! But then again... kairos:ug> cat cls #! /usr/local/bin/python print "\xc", /ug 8-) -- http://mail.python.org/mailman/listinfo/python-list
Re: Fonts and PIL
Greg Lindstrom wrote: I'm running Python 2.3 on a windows box and would like to use PIL to superimpose text over an existing pgn image. I have no problem getting the text on the image but can not figure out how to manage fonts. How to set the font style and size. From reading the archives I surmise that I want to work with *.pil files. I've searched my box for the font files but did not find them. I've googled for information on pil font files and it appears to be involved with Zope. So, can any of you honcho-level types help me out? How can I set font size and style in my PIL application? Pick a nice .ttf file and load it with ImageFont.truetype(). /ug -- http://mail.python.org/mailman/listinfo/python-list
Re: bsddb for k, v in db.items(): do order the numbers ?
[EMAIL PROTECTED] wrote: uhm i'm trying to make a very simple but large database: Let's say I want these fields : |name|age|country| Then I can't do this because I use the same key db["name"] = 'piet' db["age"] = '20' db["country"] = 'nl' #same keys so it wil overwrite db["name"] = 'jan' db["age"] = '40' db["country"] = 'eng' But how does other people use bsddb then ? - with a hidden |int like below ? db["name|0"] = 'jan' db["age|1"] = '40' db["country|2"] = 'eng' - do a little math to first is name sec is age third is country db["0"] = 'jan' db["1"] = '40' db["2"] = 'eng' pointer=0 for k, v in db.items(): if pointer =3: poiner = 0 #next 3 fields -- I like bsddb because of the speed and it can handle big files, but what is the normal way of using it ? I don't know about normal but I'd probably do something like db['piet'] = repr(['piet', 20, 'nl']) or maybe db['jan'] = repr({"name":'jan', "age":40, "country":'eng'}) That should hold until Piet #2 comes along, then I might add another level of lists... With more complicated data I'd do as the docs say and take a look at marshal or pickle instead of using repr(). And use a class instead of lists or dicts... /ug -- http://mail.python.org/mailman/listinfo/python-list
Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations
>>>>> "Jon" == Jon Harrop <[EMAIL PROTECTED]> writes: Jon> Anyway, are there any libraries to do hardware accelerated Jon> vector graphics in Perl, Python, Lisp, Java or any functional Jon> language (except OCaml and F# and excluding WPF and Jon> Silverlight)? I guess the OpenGL binding for Erlang qualifies. The best exhibit of this would be Wings3D, an Open Source 3D graphics modeller, written in Erlang, and with quite a large user base. http://www.wings3d.com BR, Ulf W -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / /Team Leader, Software Characteristics / / / Ericsson AB, IMS Gateways -- http://mail.python.org/mailman/listinfo/python-list