EzDevInfo.com

skype4py

Platform indepeneant Python wrapper for the Skype API.

problem in python script for phone call from skype account

I'm trying to do a phone call by python script from skype account. It runs properly sometime while sometime give segmentation error while sometime it runs without error but no output. I had used following script for this as,

import Skype4Py
import sys
skype = Skype4Py.Skype()
skype.Attach()
m_PhoneNumber = "919763667993"
m_Call = skype.PlaceCall(m_PhoneNumber)

Please give me solution for this, i think it maybe Skype4Py.api.posix_dbus.SkypeAPI Thread Problem , but not getting solution for this.


Source: (StackOverflow)

Bad CPU type in executable when doing arch -i386 pip2 install skype4py

I have a problem with Skype4Py lib in Mac OS. As I know from documentation in github, in macos skype4py must install with specific arch. But when I try to use arch -i386 pip2 install skype4py I get error message Bad CPU type in executable. I am not experienced user in macos (this is been a remote control in team viewer) but what I doing wrong? Also I tried use virtualenv and at the start all be ok, but when in shell I make client.Attach() I have a segfault. Please help. Thanks in advance.


Source: (StackOverflow)

Advertisements

Skype4Py: messageStatusChanged not always called

I have a Skype bot attached to a working Skype instance in X (Linux). The problem is that the messageStatusChanged event is not always triggered when an incoming message comes. It does in most cases, but sometimes the messages are just "lost". I can see them appearing in the Skype client, but the Skype4Py's event is not triggered for some reason. There's no any difference for these messages in what they contain.

Why can that be happening?


Source: (StackOverflow)

Using python and skype4py to receive and send chat [closed]

I would like to be able to read messages from a specific user in skype using skype4py then send an automated response based upon the message back to the skype chat window. That way a user could message me and get an automated response saying that I'm currently busy or whatever. I really just need to know how to read and send skype chat using skype4py in python. Thanks for your time.


Source: (StackOverflow)

Skype4py set video chat dialog to fullscreen

I'm trying to get the video chat window automatically in fullscreen when it appears. Using Skype 2.2 und Skype4py under Linux.

Can not find a way to maximize the video dialog with Skype4py.

Ideas? Thanks a lot.


Source: (StackOverflow)

Programmatically control Skype or Google+ client to initiate a video call [closed]

Is there a way to write a program in Python, C/C++, or Java, or even web programming to initiate a Skype/Google+ Hangout Video Call to someone in your contacts list? (i.e. I want to programatically launch a Skype video call)

Has anyone done this before or know any examples where I can get started on this?

Thanks,


Source: (StackOverflow)

Installing Skype4Py on Windows

I'm trying to install Skype4Py on windows, but it just keeps throwing this error at me and I have no idea how to solve it.

Traceback (most recent call last):
  File "Z:\Temp\Programming\Skype4Py-1.0.34\setup.py", line 152, in <module>
    cmdclass=commands)
  File "C:\Python27\lib\distutils\core.py", line 140, in setup
    raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands``
   or: setup.py cmd --help

error: no commands supplied

Any help would be appreciated


Source: (StackOverflow)

How can I send a message to a group conversation with Skype4Py in Python

I've been trying to get my script to send a message to a group conversation in Skype using the Skype4Py library, the only way I am currently able to send messages is to specific users.

import Skype4Py
Skype = Skype4Py.Skype()
Skype.Attach()
Skype.SendMessage('namehere','testmessage')

Does anyone know how I can change my code to send a message to a group conversation?

Thanks - Hyflex


Source: (StackOverflow)

Cannot import Skype4Py in Python

I'm using Skype4Py with Python 3.2.3 on windows. There was an error while trying to import Skype4Py package and I did the following to figure out what it was:

import sys

try:
   import Skype4Py
except:
   print (sys.exc_info()[0])
   print (sys.exc_info()[1])

The output is as follows:

<class 'Import error'>

No module named skype

I installed Skype4Py with the windows installer. I can see the Skype4Py in Python32\Lib\site-packages. How do I get this to work?


Source: (StackOverflow)

Skype4py attach does not work

I am having trouble with getting Skype4Py to attach to my Skype client. I downloaded easy _install and used it to install Skype4Py. I have 64bit Python and windows 7. When I try the example script (seen below) line by line using the IDLE, I can't get past the skype.attach(), nothing seems to happen. I end up having to close the IDLE and kill the application. If you have any ideas please let me know. I apologize in advance. Just figuring out how to download Skype4Py was challenging for me. Skype is running and I am logged in.

import Skype4Py

# Create an instance of the Skype class.
skype = Skype4Py.Skype()

# Connect the Skype object to the Skype client.
skype.Attach()

# Obtain some information from the client and print it out.
print 'Your full name:', skype.CurrentUser.FullName
print 'Your contacts:'
for user in skype.Friends:
    print '    ', user.FullName

Source: (StackOverflow)

Does Skype4py still work after Microsoft removed Skype Desktop API?

Does Skype4py use the Skype Desktop API? That API appears to have been (or is being) removed by Microsoft.
https://support.skype.com/en/faq/FA214/what-is-the-desktop-api

Does anybody know how this affects the skype4py project?


Source: (StackOverflow)

Initiating Skype call from HTML and recording the call duration [closed]

I am trying to integrate the possibility to initiate skype calls chats from my django app all i've found on the official developer.skype is how to add the skypeBoutton that enables me to call other skype user without being able to get informations like the call duration and other functionalities.(https://developer.skype.com/skype-uris/skype-uri-tutorial-webpages#_skypeButtons) IS there any way to get these functionalities or any skype api wrapper available for django?


Source: (StackOverflow)

Skype4Py MessageStatus not firing consistently

I'm trying to make a basic Skype bot using Skype4Py and have encountered a rather serious error. I am working on a 64 bit windows 7 with the 32bit Python 2.7.8. installed, along with the latest version of Skype4Py.

My main demand is that the bot has an overview of 5 different Skype chats: four individual chats with four users and one common chat in which all four users participate. To that end, I have written two different functions handling individual responses and the group chat:

class SkypeBot(object):
    def __init__(self):
        self.skype = Skype4Py.Skype(Events=self)
        self.skype.Attach()
        self.active_chat = find_conference_chat()

    def MessageStatus(self, msg, status):
        if status == Skype4Py.cmsReceived:
            if msg.Chat.Name == self.active_chat.Name:
                msg.Chat.SendMessage(respond_to_group(msg))
            else:
                msg.Chat.SendMessage(respond_to_individual(msg))
bot = SkypeBot()

The above code (there's much more to it, but the core of it is written down) is supposed to answer each message that any user sends either privately or in the group chat.

However, there's a problem. Usually, this code works just fine. The bot responds to each individual user as well as the group chat. Then, every once in a while (once every 10 chats), the bot stops responding to individual messages. The function MessageStatus simply does not fire, which made me think that there may be some other event I need to catch. So I added one general event catcher to the bot:

    def Notify(self, notification):
        print "NOTIFICATION:"
        print notification
        print "=========================="

The only purpose of this code was to see if I am missing any event. So I waited for a bit, and when the bot did not respond, I checked the printout of the function.

  • Usually, the bot recieves several notifications when a message arrives: there's the chatmessage recieved notification, the chat activity timestamp notification and some others. The chatmessage recieved notification is the one that eventually triggers the MessageStatus event.
  • In the case when the bot did not respond, only one notification came through. It was the notification CHAT **** ACTIVITY_TIMESTAMP ******. There was no notification that a chatmessage was recieved, so no message to respond do.

When I manually clicked on my Skype client and focused my window on the message recieved, the MessageStatus evend finally fired and the bot responded, but that was way too late.


My question has several parts:

  • Is my general code correct? Should, if Skype4Py worked flawlessly, my code work OK?
  • Did anyone else encounter this error where a certain event did not fire?
  • If you encountered a similar error, have you solved it? If not, did you at least discover how to consistently reproduce this problem? I can't even debug it because it appears suddenly and out of nowhere...

Source: (StackOverflow)

python, skype4py

$ sudo python2.6
>>> import Skype4Py
>>> skype = Skype4Py.Skype()
>>> skype.Attach()

And nothing happens.. just it turn me out to the console. And I'm trying next to get result without sudo

$ python2.6
Python 2.6.6 (r266:84292, Mar 25 2011, 19:24:58) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Skype4Py
>>> skype = Skype4Py.Skype()
>>> skype.Attach()
$ Segmentation fault

I don't understand - it's wrong result.

I want to get invite from skype to approve access for my application, which is I take in win32 application. But there is no result. How i can get it?

You can find Skype4Py lib here - http://sourceforge.net/projects/skype4py/

Thanks for any help.


Source: (StackOverflow)

Splitting a string in Python 2.7

I want to know how to allow multiple inputs in Python.
Ex: If a message is "!comment postid customcomment"
I want to be able to take that post ID, put that somewhere, and then the customcomment, and put that somewhere else.
Here's my code:

import fb
token="access_token_here"
facebook=fb.graph.api(token)

#__________ Later on in the code: __________

                elif msg.startswith('!comment '):
                    postid = msg.replace('!comment ','',1)
                    send('Commenting...')
                    facebook.publish(cat="comments", id=postid, message="customcomment")
                    send('Commented!')

I can't seem to figure it out.
Thank you in advanced.


Source: (StackOverflow)