-
Replied To a Post in 'geteuid' windows
It's probably GetUserName() or GetUserNameEx() in the [win32api](http://timgolden.me.uk/pywin32-docs/win32api.html) module. The code in your post is very nice, but it is purely linux, and there is some work if you want … -
Replied To a Post in problem in copying domain name from one notepad to another using regex
Hm, a few visible issues: 1. Indentation of lines 8 and 9 is incorrect. 2. match is not a string, but a *match object*. Line 9 should probably be `f2.write(match.group(0))` … -
Replied To a Post in split text message wuth multiple dilimeter
It is not python code. It looks like javascript. See in the [JavaScript / DHTML / AJAX](http://www.daniweb.com/web-development/javascript-dhtml-ajax/117) forum. -
Replied To a Post in using loops in python for a dice simulator
Use [the python tutorial](http://docs.python.org/3/tutorial/controlflow.html#if-statements) for correct syntax. -
Replied To a Post in Starting Python
Notice that in previous post, you could write sf = "There are {} days between {:%d%b%Y} and {:%d%b%Y}" print(sf.format(days, date1, date2)) -
Created Is current user member of group www-data ?
The title says it all. -
Replied To a Post in how to find difference between two dates interms of days by python
Use a datetime.timedelta instance to represent the difference between two dates yA, mA, dA = 1969,7, 21 yB, mB, dB = 2013, 12, 22 import datetime as dt dateA = … -
Replied To a Post in Whats wrong with my Regex code? Need simple text replacement
I think it is a parity error. Basically, you are looking for 2 consecutive words. Take the sequence `foo inhibited bar baz gated qux`. There are 3 pairs of consecutive … -
Edited Print a list in multicolumn format
This snippet prints a python list of strings in multicolumn format (similarly to linux `ls` command). It uses module prettytable, available in [pypi](https://pypi.python.org/pypi/PrettyTable). -
Edited Print a list in multicolumn format
This snippet prints a python list of strings in multicolumn format (similarly to linux `ls` command). It uses module prettytable, available in [pypi](https://pypi.python.org/pypi/PrettyTable). -
Edited Latin squer
#include <stdio.h> #include <conio.h> main() { int i,j,k,l,m,n; printf("Put in n nober of sqeur: "); scanf("%d",&n); printf("Whit wich nomber do you wanna start your squer?: "); scanf("%d",&m); for(j=m;j<=n+1;j++) { for(k=j;k<=n;k++) … -
Edited Latin squer
#include <stdio.h> #include <conio.h> main() { int i,j,k,l,m,n; printf("Put in n nober of sqeur: "); scanf("%d",&n); printf("Whit wich nomber do you wanna start your squer?: "); scanf("%d",&m); for(j=m;j<=n+1;j++) { for(k=j;k<=n;k++) … -
Replied To a Post in Python script FTP_TSL times out, but Filezilla client works
Does `ftps.dir()` work ? Apart from that, did you consider connecting to the server through the paramiko module ? Once connected, it is much more user-friendly because the [paramiko api](http://www.lag.net/paramiko/docs/paramiko.SFTPClient-class.html) … -
Replied To a Post in Python script FTP_TSL times out, but Filezilla client works
Did you try `ftps = FTP_TLS('xxx.xx.xxx.xx', 'myuname', 'mypwd')` ? -
Replied To a Post in Graphics in Python
It could be John Zelle's module [graphics.py](http://mcsp.wartburg.edu/zelle/python/). -
Edited convert python to c#
Help me please! Need c# code... import numpy from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import matplotlib.pyplot as plt def zadachaOPrepyatstvii(h, f, fi, xi, … -
Replied To a Post in Hidding Python subprocess
Perhaps by using the [start](http://www.computerhope.com/starthlp.htm) command with options such as /MIN or /B. (Note that I'm only an occasional windows user). -
Replied To a Post in Hidding Python subprocess
I don't understand what you want to hide. Is it something visible on the screen, like a cmd console, or is `some.exe` a GUI program ? -
Replied To a Post in Classes
I think so. -
Replied To a Post in Classes
> BTW in my Python at least he scandinavian letters are not allowed for names of Python objects. In my python 3.3.1, french accented letters are allowed, as in >>> … -
Replied To a Post in Tkinter Image Slide Show (Python)
Linux mint 15 Olivia 64 bits KDE. -
Replied To a Post in Tkinter Image Slide Show (Python)
Very nice, it works very well. -
Gave Reputation to vegaseat in Tkinter Image Slide Show (Python)
Shows how to create a basic slide show with the Python Tkinter GUI toolkit. -
Replied To a Post in Tkinter Image Slide Show (Python)
In the editor, click on the paper clip, then browse your files. You may need to zip a folder with the gifs :) -
Replied To a Post in Take screenshot with python
Obviously you don't understand what the code does. Try import os import sys import time import ImageGrab import Image from os import environ import random n = -1 while True: n … -
Replied To a Post in Take screenshot with python
Use a variable name for n in range(10): LOGFILE_NAME = "test{n:0>5}.png".format(n = n) print(LOGFILE_NAME) """my output --> test00000.png test00001.png test00002.png test00003.png test00004.png test00005.png test00006.png test00007.png test00008.png test00009.png """ -
Replied To a Post in Sad, sad news - Nelson Mandela passed away today
I think Mandela is sanctified today because everybody, and particularly world leaders, want to promote peaceful coexistence of the different human races. As he spent 28 years in prison, I see … -
Replied To a Post in Take screenshot with python
I think it should be `img.save(LOGFILE_PATH)` -
Gave Reputation to TrustyTony in Assembler for Little Computer 3 (LC-3) in Python
There is free tools to do the same, but I was curious to see what it takes to make one myself. For info see: [url]http://en.wikipedia.org/wiki/LC-3[/url] -
Gave Reputation to Doug_1 in Assembler for Little Computer 3 (LC-3) in Python
Very useful... I used your assembler as a starting point, added an interpreter, and created a complete language, with stepping debugger, tracing, break points, memory view, and more. See http://calicoproject.org/Calico_LC3 … -
Replied To a Post in Take screenshot with python
The home directory is best obtained with home_dir = os.path.expanduser("~") It is cross-platform ! -
Gave Reputation to woooee in Take screenshot with python
Traceback (most recent call last): File "C:UserslinuxDesktopscreenshot1.py", line 11, in <module> img.save(SAVE_PATH) Print SAVE_PATH to see what name the program is trying to use (not the one you think it … -
Replied To a Post in Take screenshot with python
Save as `test.jpg` . -
Replied To a Post in Using scipy - spline / interp1d
> how does the plot software make the nice rounded curve if it's following the "flat" constant values ? Think of 3 points in a plane. If they dont line … -
Replied To a Post in plotting graph problem
There is a developpers discussion [here](https://github.com/matplotlib/matplotlib/pull/2266). You may have an old install of matplotlib still on your disk. You may need to remove the folder `C:\Python27\lib\site-packages\matplotlib` if it exists, as … -
Replied To a Post in plotting graph problem
I didn't say `import matplotlib` but `import pyparsing` -
Replied To a Post in plotting graph problem
Where is pyparsing.py on your computer ? What does python say when you type `import pyparsing` ? -
Replied To a Post in plotting graph problem
Did you install pyparsing ? -
Replied To a Post in plotting graph problem
If it's still the same error message, it means that your python cannot find the *pyparsing* module and you must find out why. Try >>> import pyparsing in your interpreter. … -
Replied To a Post in plotting graph problem
I tried to reproduce the bug in windows XP with python 32 bits installed. I had to install python-dateutil module from [Christoph Gohlke](http://www.lfd.uci.edu/~gohlke/pythonlibs/)'s site, then pyparsing as I said in … -
Replied To a Post in Seprating cSV format and writing into csv file same
Use the [csv](http://docs.python.org/2/library/csv.html#module-csv) module (standard lib) [discussion here](http://pymotw.com/2/csv/index.html#module-csv). -
Replied To a Post in plotting graph problem
You could try and install pyparsing with the [windows installers](https://pypi.python.org/pypi/pyparsing/2.0.1) in pypi. -
Replied To a Post in NameError: name Tk is not defined
I agree with vegaseat, try import tkinter print(tkinter) -
Gave Reputation to slate in Relearning python confusion with if()
Because for every number n the following is true: n!=1 or n!=2 Clear thinking? -
Replied To a Post in Relearning python confusion with if()
> There is a moment is every woman's life, when she wants to do something forbidden. Easy, the opposite is: *Some women never want to do anything forbidden*. Another solution … -
Replied To a Post in Tkinter Issue with Radio Buttons
Perhaps replace `host` with `host.get()` in `lambda` . -
Replied To a Post in Using scipy - spline / interp1d
I think you may misunderstand what cubic spline interpolation does. Here is a simple example def attempt(): # create sample points yval = np.array("""0.5917094 0.79290593 0.6781099 0.97628959 1.11981829 1.01055748 0.95120918 … -
Replied To a Post in Tkinter Image Slide Show (Python)
Please upload the gifs ! -
Replied To a Post in problem uninstalling wxPython
I suggest change your password for `foobarbazqux`, then uninstall wxpython, then change your password again. -
Replied To a Post in Using scipy - spline / interp1d
I think it works well. I changed the code to clip with [`np.clip()`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.clip.html) and plot the wave with [matplotlib](http://matplotlib.org/) in [ipython notebook](http://ipython.org/notebook.html) (This was done with python 2). See the …
The End.