System error while installing

2017-05-09 Thread Faran Khalid
After installing python 3.6.1 through setup , when I run it a system error appears saying : "The program can't start because api-ms-win-crt-runtime-[1-1-0.dll is missing from your computer .Try reinstalling to fix it. I have tried reinstalling and repairing many times but it still won't work. W

Calling Out All Python Programmer in Pakistan

2015-08-10 Thread Yasoob Khalid
in a meetup as well then kindly share this post with him as well. Kind regards, Muhammad Yasoob Ullah Khalid yasoob.k...@gmail.com Python Tips -- https://mail.python.org/mailman/listinfo/python-list

Azure event hub network access

2015-02-05 Thread syed khalid
() sensor = sys.argv[2] body = parser.getMessage(sys.argv[1],sensor) hubStatus = hubClient.sendMessage(body,hostname) # return the HTTP status to the caller print hubStatus print hostname print sensor ~/IOT/AZURE$ python send.py temperature:22,humidity:20 deviceid 404 ubuntu deviceid { "DeviceId" : "ubuntu","SensorData": [ { "SensorId" : "deviceid", "SensorType" : "temperature", "SensorValue" : 22 },{ "SensorId" : "deviceid", "SensorType" : "humidity", "SensorValue" : 20 }]} -- *Syed Khalid* -- https://mail.python.org/mailman/listinfo/python-list

Indentation issues with python

2015-02-04 Thread syed khalid
body request.headers.append(('Content-Type', 'application/atom+xml;type=entry;charset =utf-8')) authentication.sign_request(request, httpclient) request.headers.append(('Content-Length', str(len(request.body))) -- *Syed Khalid* -- https://mail.python.org/mailman/listinfo/python-list

Re: Python script that does batch find and replace in txt files

2014-11-09 Thread Syed Khalid
Albert, Code is not removing empty lines containing blank characters and not removing leading and trailing spaces present in each line. import glob, codecs, re, os regex = re.compile(r"Age: |Sex: |House No: ") # etc etc for txt in glob.glob("D:/Python/source/*.txt"): with codecs.o

Re: Python script that does batch find and replace in txt files

2014-11-09 Thread Syed Khalid
out.txt", "wb", encoding="utf-8") as w: w.write(os.linesep.join(newlines)) This program is not deleting the empty lines containing blank characters. Kindly do the needful. On Mon, Nov 10, 2014 at 2:50 AM, Syed Khalid wrote: > > Code after adding path of .

Re: Python script that does batch find and replace in txt files

2014-11-09 Thread Syed Khalid
ot;utf-8") as w: w.write(os.linesep.join(newlines)) I executed code in edit rocket. Error message : File "EamClean.log", line 12 with codecs.open(txt + "_out.txt", "wb", encoding="utf-8") as w: ^ SyntaxError: invalid syntax On Mon,

Re: Python script that does batch find and replace in txt files

2014-11-09 Thread Syed Khalid
My Script, I have added import glob, codecs, re, os regex = re.compile(r"Age: |Sex: |House No: ") # etc etc Script I executed in EditRocket : for txt in glob.glob("/D:/Python/source/*.txt"): with codecs.open(txt, encoding="utf-8") as f: oldlines = f.readlines() for i, line

Re: Python script that does batch find and replace in txt files

2014-11-09 Thread Syed Khalid
014 at 1:53 AM, Albert-Jan Roskam wrote: > > > > > - Original Message - > > From: Syed Khalid > > To: python-list@python.org > > Cc: > > Sent: Sunday, November 9, 2014 8:58 PM > > Subject: Python script that does batch find and replace in txt files >

Python script that does batch find and replace in txt files

2014-11-09 Thread Syed Khalid
Python script that does batch find and replace in txt files Need a python script that opens all .txt files in a folder find replace/delete text and save files. I have text files and I need to perform below steps for each file. Step 1: Put cursor at start of file and Search for "Contact's Name:

importing modules

2013-07-31 Thread syed khalid
I am attempting to import modules from Shogun to python from a non-standard python directory ie from my /home/xxx directory. is there a way on ubuntu to selectively some modules, scripts, data from one directory and others modules, scripts from another directory. In other words, is there a file(s)

python import module question

2013-07-27 Thread syed khalid
I am trying to do a "import shogun" in my python script. I can invoke shogun with a command line with no problem. But I cannot with a python import statement. >invoking python from a command line... Syedk@syedk-ThinkPad-T410:~/shogun-2.0.0/src/interfaces/cmdline_static$ shogun | mo

Is there a way to creat a func that returns a cursor that can be used?

2012-11-12 Thread Khalid Al-Ghamdi
Is there a way to create a func that returns a cursor that can be used to execute sql statements? I tried this (after importing sqlite3), but it gave me the error below: >>> def connect(): conn = sqlite3.connect(':memory:')#use sch3.db or sch4.db etc. cur = conn.cursor() cur.e

Re: Very Strange Problem

2009-07-29 Thread Omer Khalid
t is stored, and is there a lock on it or else? Thanks, Omer ** On Wed, Jul 29, 2009 at 8:56 PM, Dave Angel wrote: > Omer Khalid wrote: > >> Hi, >> >> I am having a very strange problem with modifying a variable in a list in >&g

Very Strange Problem

2009-07-29 Thread Omer Khalid
Hi, I am having a very strange problem with modifying a variable in a list in my program. Here is the code: # a list that contains dictionary objects jobs = [] index=5 for each in range(index): jobs.append({'v':0}) some_function(index): if jobs[index]['v'] == 0:

Re: Python 3.1 Release Candidate 2

2009-06-13 Thread Khalid
On Jun 13, 5:46 pm, Benjamin Peterson wrote: > On behalf of the Python development team, I'm happy to announce the second > release candidate of Python 3.1. > > Python 3.1 focuses on the stabilization and optimization of the features and > changes that Python 3.0 introduced.  For example, the new

How to do CPU/Memory benchmarking in Python?

2008-08-05 Thread Omer Khalid
Hi, I have few long running python based scripts which does lots of number crunching; I would like to bench mark the CPU/Memory/IO for that script. I am wondering if there is a python benchmarking suite available? There is pybench but it more or less test the executing script it self from Python's

Re: What was that web interaction library called again?

2007-06-26 Thread Omer Khalid
On the RESTFul web service, I would like to piggy pack my own question two is there a way to make the connection secure between two Restful service running on GNU/linux? Thanks, Omer On 6/26/07, Kathryn Van Stone <[EMAIL PROTECTED]> wrote: So does anyone know of any equivalent library for te

Re: THREADS use 100 % CPU all the time

2007-04-11 Thread A.B., Khalid
On Apr 11, 2:38 am, [EMAIL PROTECTED] wrote: > Hi all, > > I have a application where I use different threads. actually all is > working - BUT I just discovered that the [b]CPU is always 100 % [/ > b]used. > > on the 32-bit machine athlon XP, as well as on the amd 64-bit AMD > Athlon(TM) 64 X2 Dual

Re: Modules - Jython Vs Python?

2006-11-24 Thread Khalid Zuberi
Patrick Finnegan writes: > > How many of the Python modules written in C have been rewritten and and > ported to Java to run under Jython? I am talking about SMTP, LDAP, > WIN2K,XML etc. Is there a list anywhere ? > There's a list on the jython wiki of absent modules: http://wiki.python.org

Re: Jythonc Problem

2006-07-04 Thread Khalid Zuberi
Ian Vincent wrote: > I cannot find a Jython newsgroup, so apologies in advance if this > question has been posted to the wrong group. > Try the jython-users mailing list: http://lists.sourceforge.net/mailman/listinfo/jython-users - kz -- http://mail.python.org/mailman/listinfo/python-lis

Re: With pyMinGW

2006-02-22 Thread A.B., Khalid
[EMAIL PROTECTED] wrote: > Thank you for your answers, Khalid. > > > It seems you may be using an old version of pyMinGW, > > I have downloaded it yesterday from your site. > > > > the relevant part dealing with include directories in zlib.mak > > should rea

Re: With pyMinGW

2006-02-22 Thread A.B., Khalid
in the pyMinGW sources. The binary distribution was meant to make things a bit easier for people, but since the site stopped the hosting of zip files and since many people do not download that particular file anyway when it was hosted elsewhere, letting the file expire (inactive files are remov

Re: jython problem importing a py file

2006-02-07 Thread Khalid Zuberi
writes: > > I tried everything I could think of (playing with the __init__.py, the > PYTHONCLASS, the CLASSPATH), but nothing seems to work... > > I am doing something wrong here ? > > -Didier > Take a look at the jython registry setting python.path: http://www.jython.org/docs/registry.

Re: Jython on the Palm OS?

2006-01-30 Thread Khalid Zuberi
gregarican gmail.com> writes: > > I have completed recoding my CRM app into Python so that it will run on > Win32, ARM Linux, and ARM Windows Mobile platforms. Now I am looking to > try to roll it into the Palm OS platform. Since Pippy is based on an > older version of Python than I am using for

Re: pyMinGW support for Python 2.4.2 (final) is available

2005-09-28 Thread A.B., Khalid
browser because the download is actually a HTML page. This I had to do probably three or four times until I was presented with IE's Save dialog. I am sorry for the trouble, but this is something we need to live with for now and which I cannot fix without relocating pyMinGW. Regards K

ANN: pyMinGW support for Python 2.4.2 (final) is available

2005-09-28 Thread A.B., Khalid
This is to inform those interested in compiling Python in MinGW that an updated version of pyMinGW is now available. Get it from here: http://jove.prohosting.com/iwave/ipython/pyMinGW.html Regards Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: How to decompile an exe file compiled by py2exe?

2005-09-24 Thread A.B., Khalid
Leo Jay wrote: > Dear All, > > I lost my source code because of my incaution. > so anyone can tell me how to decompile the exe file compiled by py2exe? > > Thanks. > > -- > Best Regards, > Leo Jay In older versions of py2exe (haven't tried it for new ones) I only had to drag the py2exe created fi

Re: Shed Skin under Windows and OSX

2005-09-18 Thread A.B., Khalid
rash in test '__class__ and __name__ attributes' after all? I'll also try to test it on Win98. Regards, Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: First release of Shed Skin, a Python-to-C++ compiler.

2005-09-13 Thread A.B., Khalid
attributes') needs patience. :) In Python it outputs the following: __main__.evert evert instance equal str! In the compiled C++ generated by SS it outputs the following: class evert evert class evert evert equal! [Big nasty crash] So there. :) Regards, Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: python callbacks and windows

2005-09-11 Thread A.B., Khalid
4b?lnk=st&q=%22Python+function+to+a+C+library+as+a+callback%22&rnum=1&hl=en#6c8eeeffba9fa14b 2. Venster, a highly native Windows GUI toolkit for Python based on the ctypes ffi library: http://venster.sourceforge.net/htdocs/index.html Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: First release of Shed Skin, a Python-to-C++ compiler.

2005-09-11 Thread A.B., Khalid
rk in all versions. I tested it on Win98 and both GC tests and SS's unit.py tests crash; although SS can still seem to compile the tests to C++. At any rate, if anyone is interested in the patches they can be downloaded from [2]. Regards, Khalid [1] The entire output of unit.py can also

ANN: Binary Distribution of pyMinGW-241

2005-08-19 Thread A.B., Khalid
tk84 Get it from here: http://jove.prohosting.com/iwave/ipython/pyMinGW.html Regards Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL and GeoTIFF

2005-06-09 Thread Khalid Zuberi
Matt Feinstein wrote: > Hi all-- > > I've succeeded in using the PIL (Python Imaging Library) to read a > simple GeoTIFF file and to extract data from the file's GeoTIFF key-- > but I'd also like to write GeoTIFFs, and there doesn't appear to be a > one-step way of doing that. > If you are will

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-19 Thread A.B., Khalid
[2] Regards, Khalid [1] Check to see if your archiever tool is working, or get the source from CVS. [2] pyMinGW: http://jove.prohosting.com/iwave/ipython/pyMinGW.html -- http://mail.python.org/mailman/listinfo/python-list

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-18 Thread A.B., Khalid
In case that does not work and help on this is not forthcoming, you can always try pyMinGW[1]. Regards, Khalid [1] pyMinGW: http://jove.prohosting.com/iwave/ipython/pyMinGW.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Get OS name

2005-04-15 Thread A.B., Khalid
.5a0 (#65, Apr 12 2005, 20:22:54) [GCC 3.4.2 (mingw-special)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> print platform.system(), platform.release() Windows >>> Regards, Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-11 Thread A.B., Khalid
xtensions themselves, of course. But this would make things simple and hopefully address the needs of everyone. Regards, Khalid [1] pyMinGW: http://jove.prohosting.com/iwave/ipython/pyMinGW.html -- http://mail.python.org/mailman/listinfo/python-list

ANN: pyMinGW support for Python 2.4.1 (final) is available

2005-03-30 Thread A.B., Khalid
This is to inform those interested in compiling Python in MinGW that an updated version of pyMinGW is now available. Get it from here: http://jove.prohosting.com/iwave/ipython/pyMinGW.html Regards Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-19 Thread A.B., Khalid
Ilias Lazaridis wrote: > A.B., Khalid wrote: > > Ilias Lazaridis wrote: > > > >>The first step is to make a pyMinGW project. > > > > You are mistaken. The first steps are the following: > [...] - (nonrelevant comments) > > > 3) Realizing that ther

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-18 Thread A.B., Khalid
choice to do so. It is apparent that not only have you not done that, but that you also seem not interested in doing so. That too is your choice. I suspect that no one is going to lose sleep over either choice. I hope I don't come across as condescending, which I hope I never am, but I know I wo

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread A.B., Khalid
trusted and working official Python, if any); it is only when enough people do such testing that there will be a case for it to be included in Python's core. 3. Finally. there is nothing wrong with third-party patches if they get the job done, which I believe is the case with pyMinGW. Regards, Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pyMinGW support for Python 2.3.5 (final) is available

2005-02-14 Thread A.B., Khalid
Nick Craig-Wood wrote: > A.B., Khalid <[EMAIL PROTECTED]> wrote: > > This is to inform those interested in compiling Python in MinGW that > > an updated version of pyMinGW is now available. > > Ha anyone tried cross compiling python with mingw? At work we compile

ANN: pyMinGW support for Python 2.3.5 (final) is available

2005-02-12 Thread A.B., Khalid
This is to inform those interested in compiling Python in MinGW that an updated version of pyMinGW is now available. Get it from here: http://jove.prohosting.com/iwave/ipython/pyMinGW.html Regards Khalid -- http://mail.python.org/mailman/listinfo/python-list

pickle, cPickle, & HIGHEST_PROTOCOL

2005-01-30 Thread A.B., Khalid
format (I suppose) as I can read the pickled data. This behavior was observed in Python 2.3.4 (final), and 2.4 (final) on Win98. Any comments? Regards, Khalid # Sample program tester.py begin ! ! import pickle as pkl ! import os ! #- ! def test_pickle(): !fn

Re: protecting the python code.

2005-01-17 Thread A.B., Khalid
that it ever claimed it is so-- as draging the resulting exe file to your zip archiever will reveal the python code inside your exe file. And so in short: try the Pyrex way. Regards, Khalid -- http://mail.python.org/mailman/listinfo/python-list

ANN: pyMinGW support for Python 2.4 (final) is available

2004-12-01 Thread A. B., Khalid
This is to inform those interested in compiling Python in MinGW that an updated version of pyMinGW is now available. Get it from here: http://jove.prohosting.com/iwave/ipython/pyMinGW.html Regards Khalid -- http://mail.python.org/mailman/listinfo/python-list