473,796 Members | 2,875 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

where is ctypes.py?

Hello,

I'm a complete newbie in learning python.

I was testing some sample codes I found in this newsgroup and seems it
could not locate the module ctypes.py. I installed python 2.4, wxPython
and pywin32. Just could not find this file. I thought it should be in
Lib/site-packages/ directory but it is not there.
Where can I find this file?

Thanks a lot for your help.

- wcc

Jul 18 '05 #1
6 4477
wc****@yahoo.co m <wc****@yahoo.c om> wrote:
Hello,

I'm a complete newbie in learning python.

I was testing some sample codes I found in this newsgroup and seems it
could not locate the module ctypes.py. I installed python 2.4, wxPython
and pywin32. Just could not find this file. I thought it should be in
Lib/site-packages/ directory but it is not there.
Where can I find this file?


Download and install ctypes from
<http://starship.python .net/crew/theller/ctypes/>
Alex
Jul 18 '05 #2
Thanks a lot Alex. I got the file.

- wcc

Jul 18 '05 #3
wc****@yahoo.co m wrote:
I'm a complete newbie in learning python.

I was testing some sample codes I found in this newsgroup and seems it
could not locate the module ctypes.py. I installed python 2.4, wxPython
and pywin32. Just could not find this file. I thought it should be in
Lib/site-packages/ directory but it is not there.
Where can I find this file?


I see others have pointed you to the module, but nobody has
yet told you how you could have found it yourself.

"ctypes" and many other such modules are third-party packages
which do not come with Python itself. In almost all cases,
you should be able to use Google quite easily to find such
a module by typing "python ctypes" (or substitute the appropriate
name in place of ctypes) in a Google search. Quite often
the home page of the package (where you'll find instructions
on downloading) will be the first result Google provides.

-Peter
Jul 18 '05 #5
Peter,

Thank you very much. I'll keep that in mind.

- wcc

Jul 18 '05 #6

"Peter Hansen" > I see others have pointed you to the module, but nobody
has
yet told you how you could have found it yourself.

"ctypes" and many other such modules are third-party packages
which do not come with Python itself. In almost all cases,
you should be able to use Google quite easily to find such
a module by typing "python ctypes" (or substitute the appropriate
name in place of ctypes) in a Google search. Quite often
the home page of the package (where you'll find instructions
on downloading) will be the first result Google provides.


If one does not already know the name of what one is searching for, there
is also the PythonPackageIn dex PyPI at python.org.

Terry J. Reedy

Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4032
by: achrist | last post by:
I'm aving some trouble getting callbacks from a Delphi DLL back to python working through ctypes. The call from python to the DLL works fine. In the Delphi(5) code: type TCallbackFunc = function(x: Integer): Integer; stdcall;
2
3279
by: zapazap | last post by:
Dear Snake Charming Gurus, (Was: http://mail.python.org/pipermail/python-list/2004-January/204454.html) First, a thank you to Tim Golden, Thomas Heller, and Mark Hammond for your earlier help with this problem. I am uncertain about what etiquette calls for, but more on that later. My Objective: I am trying to control the _VMWare Desktop_ application
1
4728
by: sjdevnull | last post by:
Hey, I'm trying to wrap GNU readline with ctypes (the Python readline library doesn't support the callback interface), but I can't figure out how to set values to a variable inside the library. This is Python 2.5 on Linux. Here's what I have so far--if you comment out the memmove call (3 lines) it works as expected: # START #!/usr/local/bin/python2.5
7
7049
by: p.lavarre | last post by:
How do I vary the byte offset of a field of a ctypes.Structure? How do I "use the dynamic nature of Python, and (re-)define the data type after the required size is already known, on a case by case basis"? \\\ For example, suppose sometimes I receive the value '\x03hi' + \x04bye' for the struct:
0
3221
by: malen | last post by:
Hi all! I'm building mouse movement filter program for Windows and Mac OS X. In Windows I use ctypes.windll.user32.getCursorPos(pointer) and ctypes.windll.user32.setCursorPos(x,y) to get and set the cursor position but I do not know what the library and functions are called in Mac OS X (I'm a complete noob when it comes to Mac :) ) To explain better (I hope) here is the windows code for a test program that forces the mouse to use a...
6
12952
by: Jack | last post by:
I'm not able to build IP2Location's Python interface so I'm trying to use ctypes to call its C interface. The functions return a pointer to the struct below. I haven't been able to figure out how I should declare the return type of the functions and read the fields. Any hint is appreciated. typedef struct { char *country_short; char *country_long;
1
2453
by: moreati | last post by:
Recently I discovered the re module doesn't support POSIX character classes: Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) on linux2 Type "help", "copyright", "credits" or "license" for more information. None So I thought I'd try out pcre through ctypes, to recreate pcredemo.c in python. The c code is at:
0
2560
by: Egor Zindy | last post by:
Egor Zindy wrote: #!/usr/bin/env python """ A generic chipid library based on ctypes This module handles most of the functions in FTChipID.dll
3
11668
by: Andrew Lentvorski | last post by:
Basically, I'd like to use the ctypes module as a much more descriptive "struct" module. Is there a way to take a ctypes.Structure-based class and convert it to/from a binary string? Thanks, -a
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.