python

How to pull a BitBucket repository without access to hg.

I was wondering if it was possible to pull a private mercurial repo to a server without access to hg. I have SSH access, but do not have the ability to install HG. I was thinking some kind of Python script that used http access or something, but I wasn't sure. I was also thinking this might only be possible with public repos. I am curren...

is it possible to study python and java same time ?

I am new to java but i know python a little. I do not know whether python and java are inter related or not. If yes then how can I start learning both languages by comparing their features. And where are the good place in web(tutorial) from where I can start learning both. ...

Flexible Django

There is a remarkable book "Flexible Rails" http://www.manning.com/armstrong/. Is there something similar about integration Django and Flex? ...

Find substring matches

Write the function subStringMatchExact. This function takes two arguments: a target string, and a key string. It should return a tuple of the starting points of matches of the key string in the target string, when indexing starts at 0. Complete the definition for def subStringMatchExact(target,key): For example, subStringMatchExact("...

What's a good document standard to use programmatically?

Hi, I'm writing a program that requires input in the form of a document, it needs to replace a few values, insert a table, and convert it to PDF. It's written in Python + Qt (PyQt). Is there any well known document standard which can be easily used programmatically? It must be cross platform, and preferably open. I have looked into Mi...

Accessing the Microphone in Python

My laptop has a microphone in it. Is there any method of obtaining numbers in Python from it? For example pitch, volume, or the duration of a noise. I'm trying to use ambient noise to create random numbers. ...

Using Google App Engine how to upload document in google docs (python)

Hello, I want to upload document, file to google docs using Google Apps Engine (python) any code or link will be appreciated ...

Distinguishable characters?

I have a bunch of items in my database. Each is assigned a unique ID. I want to shorten this ID and display it on the page, so that if I user needs to contact us (over the phone) regarding a particular item, he can give us the shortened ID, rather than a really big number. Similar to the SKU, on sites like NCIX. Thus, I was thinking abou...

Where can I read about import _{module name} in Python?

I've notice this. Example: create an empty text file called for example ast.py $ touch ast.py run Python $ python >>> from ast import * >>> dir() ['__builtins__', '__doc__', '__name__', '__package__'] >>> from _ast import * >>> dir() ['AST', 'Add', 'And', 'Assert', 'Assign', ...] ast is a python module. So... what's happening here...

Is there a tool to do ast 2 python source code for Python 2.x?

I've seen codegen http://dev.pocoo.org/hg/sandbox/file/868ea20c2c1d/ast/ but doent works with all the files and ast2src which only works with Python 3.1. ...

How C# use python program?

If it doesn't use ironpython, how C# use cpython program(py file)? Because there are some bugs that ironpython load cpython code. ...

Generating Python soaplib stubs from WSDL

Hi, I'd like to generate a stub SOAP web service class using the Python soaplib module, based on an existing WSDL. The idea is to generate a mock for a third party web service. Does any such code generator exist, or must we write our own? Martin ...

Problem with unzipping file

I have two zip files, both of them open well with Windows Explorer and 7-zip. However when i open them with Python's zipfile module [ zipfile.ZipFile("filex.zip") ], one of them gets opened but the other one gives error "BadZipfile: File is not a zip file". I've made sure that the latter one is a valid Zip File by opening it with 7-Zi...

chat app. for django

Is there any facebook like chat application to integrate to django.If so please give an example and the source link Thanks.. ...

Using Crypto by placing folder in python path? - Python

Hi folks, I'm using Django in order to serve a web service. I have only access to FTP and code refresh at the moment. No access to command-line or executing any kind of executable. I am using a Windows Server 2005 machine. Would I be able to use Crypto just by placing the folder within my Django project? Are there any good alternativ...

Use python to get friendslists on facebook

Hi there. How can i use python to login to facebook, grab a friendlist from my friends and use the data to see if my friends are facebook buddies ? Thanks for your help :-) ...

How do I securely wipe a file / directory in Python?

Is there any module which provides somehow basic "secure" deletion, sth. like the Linux utility "wipe", e.g. import securitystuff securitystuff.wipe( filename ) I need to protect company source codes which should not be easily retrievable anymore. Thank you, Marcus P.S. Yes I know "wipe" is not perfect, e.g. on journalling filesyste...

python help django navigation

Dear Everybody I would like to understand how I can access and navigate Python and Django help. in Django I cd to my directory and entered the following command to access help of the manage.py: python manage.py help And I would like to get info on the commands. Here I have to type: Type 'manage.py help ' for help on a specific su...

Using class/static methods as default parameter values within methods of the same class

I'd like to do something like this: class SillyWalk(object): @staticmethod def is_silly_enough(walk): return (False, "It's never silly enough") def walk(self, appraisal_method=is_silly_enough): self.do_stuff() (was_good_enough, reason) = appraisal_method(self) if not was_good_enough: ...

what suits the most for creating interface?

i have an application of text to speech convertor and now want to prepare an graphical interface for it.I did whole of the coding involved in python..i want to know which languages can be used for creating the GUI so that i can connect my python code to it easily..can python be used for creating the gui.. as i have no previous experience...