Welcome, Guest
Python Scripts for ComicRack

TOPIC: Importing Python modules

Importing Python modules 10 years 2 weeks ago #157

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
I've installed Python 2.5 and am trying to access a module in the win32 namespace; specifically win32clipboard. I tried adding the directory for win32clipboard.pyd to the script folder list and using a simple import statement like:
[code:1]import win32clipboard[/code:1]

But I get the message \"module cannot be found\" when I try to access the module object like this:
[code:1]win32clipboard.OpenClipboard()[/code:1]

I've also tried modifying the import statement as such:
[code:1]import \"win32clipboard.pyd\"[/code:1]

That time I got the message \"unexpected token win32clipboard.pyd\". Can I do this using the scripting built into ComicRack?
The administrator has disabled public write access.

Re:Importing Python modules 10 years 2 weeks ago #166

  • cYo
  • cYo's Avatar
  • Offline
  • Moderator
  • Posts: 3476
  • Thank you received: 676
  • Karma: 181
Actually i do not know if this works or does not.

ComicRack uses Iron Python so you could alternatively import the net library \"System.Windows.Forms\" that has the clipboard object (look it up in the msn).

When i have time i will try to find out where the problem is.
The administrator has disabled public write access.

Re:Importing Python modules 10 years 2 weeks ago #174

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
Worked like a charm. Thanks for the tip. And I posted the results in another thread.
Last Edit: 10 years 2 weeks ago by wadegiles.
The administrator has disabled public write access.
Time to create page: 0.153 seconds

Who's Online

We have 228 guests and 5 members online