Re: why not?

2013-01-21 Thread Josh Benner
On Mon, Jan 21, 2013 at 7:56 AM, Lie Ryan wrote: > On 22/01/13 04:02, kwakukwat...@gmail.com wrote: > >> f = open(r'c:\text\somefile.txt') >> for i in range(3): >> print str(i) + ': ' + f.readline(), >> please with the print str(i) + ‘: ‘ + f.readline(), why not print str(i) >> + f.readli

Re: Uniquely identifying each & every html template

2013-01-21 Thread Ferrous Cranus
Τη Τρίτη, 22 Ιανουαρίου 2013 6:04:09 π.μ. UTC+2, ο χρήστης Tim Roberts έγραψε: > Ferrous Cranus wrote: > > > > > >Renames and moves are performed, either by shell access or either by cPanel > >access by website owners. > > > > > >That being said i have no control on HOW and WHEN users alter

Re: Uniquely identifying each & every html template

2013-01-21 Thread Ferrous Cranus
Τη Δευτέρα, 21 Ιανουαρίου 2013 10:48:11 μ.μ. UTC+2, ο χρήστης Piet van Oostrum έγραψε: > Ferrous Cranus writes: > > > > > This python script acts upon websites other people use and every html > > > templates has been written by different methods(notepad++, > > > dreamweaver, joomla). > > >

Re: pycache directories

2013-01-21 Thread Terry Reedy
On 1/21/2013 11:55 PM, monosij.for...@gmail.com wrote: I am doing some OO python3 where I am using multiple dirs/sub-dirs. So everything works fine, however when I run code __pycache__ directories are being created in every directory touched by the execution. This is much better than having mu

pycache directories

2013-01-21 Thread monosij . forums
I am doing some OO python3 where I am using multiple dirs/sub-dirs. So everything works fine, however when I run code __pycache__ directories are being created in every directory touched by the execution. Is it possible to set a configuration to be able to create these pycache directories in a

Re: Uniquely identifying each & every html template

2013-01-21 Thread Chris Angelico
On Tue, Jan 22, 2013 at 2:24 PM, rusi wrote: > Ive a computer whose OS I wanted to upgrade without disturbing the > existing setup. Decided to fit a new hard disk with a new OS. > Installed the OS on a new hard disk, fitted the new hard disk into the > old computer and rebooted. > > The messages t

Re: Uniquely identifying each & every html template

2013-01-21 Thread rusi
On Jan 21, 8:07 pm, Ferrous Cranus wrote: > Τη Δευτέρα, 21 Ιανουαρίου 2013 9:20:15 π.μ. UTC+2, ο χρήστης Chris Angelico > έγραψε: > > > > > > > > > > > On Mon, Jan 21, 2013 at 6:08 PM, Ferrous Cranus > > wrote: > > > > An .html page must retain its database counter value even if its: > > > > (r

Re: Uniquely identifying each & every html template

2013-01-21 Thread Tim Roberts
Ferrous Cranus wrote: > >Renames and moves are performed, either by shell access or either by cPanel >access by website owners. > >That being said i have no control on HOW and WHEN users alter their html pages. Right, and that makes it impossible to solve this problem. Think about some scenari

Re: Uniquely identifying each & every html template

2013-01-21 Thread Tim Roberts
Ferrous Cranus wrote: > >No, it is difficult but not impossible. >It just cannot be done by tagging the file by: > >1. filename >2. filepath >3. hash (math algorithm producing a string based on the file's contents) > >We need another way to identify the file WITHOUT using the above attributes. Th

Re: Storing class objects dynamically in an array

2013-01-21 Thread Brian D
On Monday, January 21, 2013 8:29:50 PM UTC-6, MRAB wrote: > On 2013-01-22 01:56, Brian D wrote: > > > Hi, > > > > > > I'm trying to instantiate a class object repeated times, dynamically for as > > many times as are required, storing each class object in a container to > > later write out to a

Re: Uniquely identifying each & every html template

2013-01-21 Thread rusi
On Jan 21, 5:55 pm, alex23 wrote: > On Jan 21, 10:39 pm, Oscar Benjamin > wrote: > > > This is a very old problem (still unsolved I > > believe):http://en.wikipedia.org/wiki/Ship_of_Theseus > > +1 internets for referencing my most favourite thought experiment > ever :) +2 Oscar for giving me th

Re: Storing class objects dynamically in an array

2013-01-21 Thread MRAB
On 2013-01-22 01:56, Brian D wrote: Hi, I'm trying to instantiate a class object repeated times, dynamically for as many times as are required, storing each class object in a container to later write out to a database. It kind of looks like what's needed is a two-dimensional class object, but

Re: Storing class objects dynamically in an array

2013-01-21 Thread Dave Angel
On 01/21/2013 08:56 PM, Brian D wrote: Hi, I'm trying to instantiate a class object repeated times, dynamically for as many times as are required, storing each class object in a container to later write out to a database. It kind of looks like what's needed is a two-dimensional class object,

Re: Storing class objects dynamically in an array

2013-01-21 Thread Dave Angel
On 01/21/2013 08:56 PM, Brian D wrote: Hi, I'm trying to instantiate a class object repeated times, dynamically for as many times as are required, storing each class object in a container to later write out to a database. It kind of looks like what's needed is a two-dimensional class object,

Storing class objects dynamically in an array

2013-01-21 Thread Brian D
Hi, I'm trying to instantiate a class object repeated times, dynamically for as many times as are required, storing each class object in a container to later write out to a database. It kind of looks like what's needed is a two-dimensional class object, but I can't quite conceptualize how to do

Re: Sending a broadcast message using raw sockets

2013-01-21 Thread Peter Steele
On Monday, January 21, 2013 1:10:06 AM UTC-8, Rob Williscroft wrote: > Peter Steele wrote in > > news:f37ccb35-8439-42cd-a063-962249b44...@googlegroups.com in > > comp.lang.python: > > > I want to write a program in Python that sends a broadcast message > > using raw sockets. The system where t

Re: Uniquely identifying each & every html template

2013-01-21 Thread Chris Angelico
On Tue, Jan 22, 2013 at 10:43 AM, Oscar Benjamin wrote: > On 21 January 2013 23:01, Tom P wrote: >> On 01/21/2013 01:39 PM, Oscar Benjamin wrote: >>> This is a very old problem (still unsolved I believe): >>> http://en.wikipedia.org/wiki/Ship_of_Theseus >>> >> That wiki article gives a hint to a

Re: Uniquely identifying each & every html template

2013-01-21 Thread Oscar Benjamin
On 21 January 2013 23:01, Tom P wrote: > On 01/21/2013 01:39 PM, Oscar Benjamin wrote: >> >> On 21 January 2013 12:06, Ferrous Cranus wrote: >>> >>> Τη Δευτέρα, 21 Ιανουαρίου 2013 11:31:24 π.μ. UTC+2, ο χρήστης Chris >>> Angelico έγραψε: Seriously, you're asking for something that'

Re: Uniquely identifying each & every html template

2013-01-21 Thread alex23
On Jan 22, 1:07 am, Ferrous Cranus wrote: > Perhaps we should look into on how's the OS handles the file to get an idea > on how its done? Who is this "we" you speak of? You mean "you", right? You do that and get back to us when you believe you've found something that helps. -- http://mail.py

Re: Windows subprocess.call problem

2013-01-21 Thread Chris Angelico
On Tue, Jan 22, 2013 at 12:04 AM, Dave Angel wrote: > Why not just pass all the filenames as parameters in one invocation of > notepad? Assuming Notepad is written reasonably, that'll give it all to you > in one window, instead of opening many separate ones. The OP is talking about Windows Notep

Re: Uniquely identifying each & every html template

2013-01-21 Thread alex23
On Jan 22, 1:03 am, Ferrous Cranus wrote: > ALL, iam asking for is a way to make this work. No, ALL you are asking is for us to take an _impossible_ situation and make it magically work for you, without your having to improve your understanding of the problem or modifying your requirements in any

Re: Windows subprocess.call problem

2013-01-21 Thread Terry Reedy
On 1/21/2013 6:22 PM, Tom Borkin wrote: nob...@nowhere.com had an excellent suggestion that worked right off the bat and achieved exactly what I was after. Thanks all! And what was it? On Mon, Jan 21, 2013 at 9:04 AM, Dave Angel mailto:d...@davea.name>> wrote:

Re: Windows subprocess.call problem

2013-01-21 Thread Tom Borkin
nob...@nowhere.com had an excellent suggestion that worked right off the bat and achieved exactly what I was after. Thanks all! Tom On Mon, Jan 21, 2013 at 9:04 AM, Dave Angel wrote: > On 01/21/2013 06:25 AM, Tom Borkin wrote: > >> Hi; >> I have this code: >> >> >> for song in my_songs: >>

Re: Uniquely identifying each & every html template

2013-01-21 Thread Tom P
On 01/21/2013 01:39 PM, Oscar Benjamin wrote: On 21 January 2013 12:06, Ferrous Cranus wrote: Τη Δευτέρα, 21 Ιανουαρίου 2013 11:31:24 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: Seriously, you're asking for something that's beyond the power of humans or computers. You want to identify that

Re: ANN: Python training "text movies"

2013-01-21 Thread Mitya Sirenef
On 01/21/2013 06:30 AM, Franck Ditter wrote: In article , > Mitya Sirenef wrote: > >> > - To use the software outside Python, we need to have proper indentation >> > as real spaces. We should be able to distinguish Arial type for usual >> > text and fixed font for code. >> >> >> Not sure I u

Re: Uniquely identifying each & every html template

2013-01-21 Thread Dave Angel
On 01/21/2013 07:06 AM, Ferrous Cranus wrote: Seriously, you're asking for something that's beyond the power of humans or computers. You want to identify that something's the same file, without tracking the change or having any identifiable tag. That's a fundamentally impossible task.

Re: Thorough Python 2.7.3 Windows Build Documentation?

2013-01-21 Thread Stephane Wirtel
* Irmen de Jong [2013-01-21 19:22:55 +0100]: > On 21-1-2013 18:16, Stephane Wirtel wrote: > > Hi Leonard, > > > > Please, could you limit your text to 80 columns, because it's > > unreadable. Your text is too long :( > > Stephane, shouldn't your news reader simply wrap the lines...? At least mi

Re: need explanation

2013-01-21 Thread Chris Angelico
On Tue, Jan 22, 2013 at 3:06 AM, wrote: > please I need some explanation on sys.stdin and sys.stdout, and piping out Try the documentation or a web search. If that doesn't help, ask a specific question. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Uniquely identifying each & every html template

2013-01-21 Thread Piet van Oostrum
Ferrous Cranus writes: > This python script acts upon websites other people use and every html > templates has been written by different methods(notepad++, > dreamweaver, joomla). > > Renames and moves are performed, either by shell access or either by > cPanel access by website owners. > > That

Re: handling return codes from CTYPES

2013-01-21 Thread Mike C. Fletcher
On 13-01-21 11:52 AM, Steve Simmons wrote: Mike, Thanks for your response - I was puzzled by one part of it though... On 21/01/2013 15:14, Mike C. Fletcher wrote: That's because you've just discarded the object you created I (mis?)understood from the ctypes documentation that '>>> ini

Re: handling return codes from CTYPES

2013-01-21 Thread MRAB
On 2013-01-21 16:52, Steve Simmons wrote: Mike, Thanks for your response - I was puzzled by one part of it though... On 21/01/2013 15:14, Mike C. Fletcher wrote: That's because you've just discarded the object you created I (mis?)understood from the ctypes documentation that '>>> in

Re: handling return codes from CTYPES

2013-01-21 Thread Steve Simmons
Mike, Thanks for your response - I was puzzled by one part of it though... On 21/01/2013 15:14, Mike C. Fletcher wrote: That's because you've just discarded the object you created I (mis?)understood from the ctypes documentation that '>>> initResult = c_short(0)' would result in the c

serpent, a serializer based around ast.literal_eval

2013-01-21 Thread Irmen de Jong
Hi, I've been toying a bit with ast.literal_eval. I've come up with "serpent", a serializer based around that. Which means that it takes a Python object tree and turns it into a serialized form that can be safely read back by ast.literal_eval(). Why I wrote serpent and didn't simply use repr()+

Re: Forcing Python to detect DocumentRoot

2013-01-21 Thread Piet van Oostrum
Ferrous Cranus writes: > Ok i see its just a convention. > Can you help on this: > > so we need to remove since the apache cant > see to open it and let Python open it which we know it can because it has > access to any system file the user has access too. > > httpd cannot open this file bec

Re: Forcing Python to detect DocumentRoot

2013-01-21 Thread Michael Torrie
On 01/19/2013 01:01 AM, Ferrous Cranus wrote: > # render html template and print it data = f.read() counter = > ''' mailto:supp...@superhost.gr";> src="/data/images/mail.png"> > > > Αριθμός Επισκεπτών %d ''' % hits[0] > > > While from within the sam

Re: Else statement executing when it shouldnt

2013-01-21 Thread Chris Angelico
On Tue, Jan 22, 2013 at 2:37 AM, eli m wrote: > Thank you, that solved my problem. Sorry for my posts, i am a noob and this > is my first time posting on here. There's nothing wrong with being a noob, we all start out that way. Want to be one of the people we love to help? Here are some tips: h

Re: Forcing Python to detect DocumentRoot

2013-01-21 Thread Michael Torrie
On 01/21/2013 07:55 AM, Ferrous Cranus wrote: > Yes Dave so we need to remove > since the apache cant see to open it and let Python open it which we > know it can because it has access to any system file the user has > access too. What are you trying to accomplish? I don't see how opening the fi

Re: Forcing Python to detect DocumentRoot

2013-01-21 Thread Michael Torrie
On 01/21/2013 09:02 AM, Ferrous Cranus wrote: > Ok i see its just a convention. Can you help on this: > > so we need to remove since the > apache cant see to open it and let Python open it which we know it > can because it has access to any system file the user has access too. Is this link gene

Re: Thorough Python 2.7.3 Windows Build Documentation?

2013-01-21 Thread Irmen de Jong
On 21-1-2013 18:16, Stephane Wirtel wrote: > Hi Leonard, > > Please, could you limit your text to 80 columns, because it's > unreadable. Your text is too long :( Stephane, shouldn't your news reader simply wrap the lines...? At least mine does. (Thunderbird) Irmen -- http://mail.python.org/ma

Re: Thorough Python 2.7.3 Windows Build Documentation?

2013-01-21 Thread Stephane Wirtel
Hi Leonard, Please, could you limit your text to 80 columns, because it's unreadable. Your text is too long :( Thank you in advance. Stéphane * Leonard, Arah [2013-01-17 15:29:28 +]: > Hello fellow Python programmers, > > I'm building a 32-bit CPython 2.7.3 distro for Windows using the M

RE: Slightly OT: What metro areas are best for a software development career?

2013-01-21 Thread Leonard, Arah
> I am looking for a position as a software development engineer. I'm > currently learning to develop Android apps > (http://www.jasonhsu.com/android-apps), and I use > Python for implementing Doppler Value Investing > (http://www.dopplervalueinvesting.com) and for developing Swift Linux > (ht

Re: Slightly OT: What metro areas are best for a software development career?

2013-01-21 Thread Matt Jones
Check out this article. It lists some information about IT/Sofware jobs and places where you can get them. I recommend Austin personally, as I've lived for a number of years. http://msn.careerbuilder.com/Article/MSN-3218-Job-Info-and-Trends-A-closer-look-at-the-fast-growing-technology-field/?Sit

RE: Thorough Python 2.7.3 Windows Build Documentation?

2013-01-21 Thread Leonard, Arah
Hello again Python programmers, Final update on my Python 2.7.3 build issues. After much insanity I finally used a process sniffer when running Python and tracked down that because of a path environment variable and the stupidity of Microsoft, Windows was loading another python27.dll r

Slightly OT: What metro areas are best for a software development career?

2013-01-21 Thread Jason Hsu
I am looking for a position as a software development engineer. I'm currently learning to develop Android apps (http://www.jasonhsu.com/android-apps), and I use Python for implementing Doppler Value Investing (http://www.dopplervalueinvesting.com) and for developing Swift Linux (http://www.swi

Re: Forcing Python to detect DocumentRoot

2013-01-21 Thread Ferrous Cranus
Ok i see its just a convention. Can you help on this: so we need to remove since the apache cant see to open it and let Python open it which we know it can because it has access to any system file the user has access too. httpd cannot open this file because the location of the image is past

Re: why not?

2013-01-21 Thread Lie Ryan
On 22/01/13 04:02, kwakukwat...@gmail.com wrote: f = open(r'c:\text\somefile.txt') for i in range(3): print str(i) + ': ' + f.readline(), please with the print str(i) + ‘: ‘ + f.readline(), why not print str(i) + f.readline(), Try running both code. What do you see? What's the differenc

Re: Forcing Python to detect DocumentRoot

2013-01-21 Thread Michael Torrie
On 01/18/2013 06:02 AM, Ferrous Cranus wrote: > Yes my Python scripts exist in a linux web host. > > os.environ['HOME'] will indeed give the home directory of the user. > > to me /home/nikos/ > > but i want a variable to point to > > /home/nikos/public_html whice is called DocumentRoot. Not it

Re: Else statement executing when it shouldnt

2013-01-21 Thread eli m
On Sunday, January 20, 2013 9:56:59 PM UTC-8, alex23 wrote: > On Jan 21, 2:40 pm, eli m wrote: > > > an else statement is running when it shouldnt be. It is > > > on the last line. Whenever i am in the math or game > > > function, when i type in main, it goes back to the start > > > of the pro

Re: handling return codes from CTYPES

2013-01-21 Thread Mike C. Fletcher
On 13-01-21 05:46 AM, Steve Simmons wrote: ... >>> from ctypes import * >>> sLib = cdll.slib >>> lic_key = c_char_p("asdfghjkl".encode(encoding='utf_8', errors='strict')) >>> initResult = sLib.InitScanLib(lic_key.value) >>> print("InitScanLib Result: ", initResult) InitScanLib Result: 65535

Re: Uniquely identifying each & every html template

2013-01-21 Thread Ferrous Cranus
Τη Δευτέρα, 21 Ιανουαρίου 2013 9:20:15 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > On Mon, Jan 21, 2013 at 6:08 PM, Ferrous Cranus wrote: > > > An .html page must retain its database counter value even if its: > > > > > > (renamed && moved && contents altered) > > > > Then you either nee

Re: Uniquely identifying each & every html template

2013-01-21 Thread Ferrous Cranus
Τη Δευτέρα, 21 Ιανουαρίου 2013 2:56:24 μ.μ. UTC+2, ο χρήστης alex23 έγραψε: > On Jan 21, 7:19 pm, Ferrous Cranus wrote: > > > Renames and  moves are performed, either by shell access or either by > > cPanel access by website owners. > > > > These websites owners, are you charging them for thi

Re: Uniquely identifying each & every html template

2013-01-21 Thread Ferrous Cranus
Τη Δευτέρα, 21 Ιανουαρίου 2013 2:47:54 μ.μ. UTC+2, ο χρήστης Joel Goldstick έγραψε: > This is trolling Ferrous.  you are a troll.  Go away Just because you cannot answer my question that doesn't make me a troll you know. -- http://mail.python.org/mailman/listinfo/python-list

Re: Forcing Python to detect DocumentRoot

2013-01-21 Thread Ferrous Cranus
Τη Δευτέρα, 21 Ιανουαρίου 2013 2:33:22 μ.μ. UTC+2, ο χρήστης Dave Angel έγραψε: > On 01/21/2013 01:25 AM, Ferrous Cranus wrote: > > > Τη Σάββατο, 19 Ιανουαρίου 2013 10:01:15 μ.μ. UTC+2, ο χρήστης Piet van > > Oostrum έγραψε: > > >> Ferrous Cranus writes: > > > > > While > > > > > > /home/n

The most important website in the world for any entrepreneur

2013-01-21 Thread Web Developers
Hello, We just launched our new site - www.webmeeters.com a couple of days back. It allows the formation of virtual "companies" made up of workers from around the world, and then allows them to be crowd-funded for any business idea they may have. The site can be used by anyone - someone in the corp

Re: RE Help splitting CVS data

2013-01-21 Thread Neil Cerutti
On 2013-01-21, Garry wrote: > Thanks everyone for your comments. I'm new to Python, but can > get around in Perl and regular expressions. I sure was taking > the long way trying to get the cvs data parsed. > > Sure hope to teach myself python. Maybe I need to look into > courses offered at th

Re: Windows subprocess.call problem

2013-01-21 Thread Dave Angel
On 01/21/2013 06:25 AM, Tom Borkin wrote: Hi; I have this code: for song in my_songs: subprocess.call(['notepad.exe', '%s.txt' % song]) print song It opens the first song and hangs on subsequent songs. It doesn't open the next song or execute the print until I have closed the first one. I

Re: Uniquely identifying each & every html template

2013-01-21 Thread alex23
On Jan 21, 7:19 pm, Ferrous Cranus wrote: > Renames and  moves are performed, either by shell access or either by cPanel > access by website owners. These websites owners, are you charging them for this "service" you provide? You seriously need to read up on some fundamentals of how the web + a

Re: Uniquely identifying each & every html template

2013-01-21 Thread alex23
On Jan 21, 10:39 pm, Oscar Benjamin wrote: > This is a very old problem (still unsolved I > believe):http://en.wikipedia.org/wiki/Ship_of_Theseus +1 internets for referencing my most favourite thought experiment ever :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Uniquely identifying each & every html template

2013-01-21 Thread Joel Goldstick
This is trolling Ferrous. you are a troll. Go away On Mon, Jan 21, 2013 at 7:39 AM, Oscar Benjamin wrote: > On 21 January 2013 12:06, Ferrous Cranus wrote: > > Τη Δευτέρα, 21 Ιανουαρίου 2013 11:31:24 π.μ. UTC+2, ο χρήστης Chris > Angelico έγραψε: > >> > >> Seriously, you're asking for somethi

Re: Uniquely identifying each & every html template

2013-01-21 Thread Oscar Benjamin
On 21 January 2013 12:06, Ferrous Cranus wrote: > Τη Δευτέρα, 21 Ιανουαρίου 2013 11:31:24 π.μ. UTC+2, ο χρήστης Chris Angelico > έγραψε: >> >> Seriously, you're asking for something that's beyond the power of >> humans or computers. You want to identify that something's the same >> file, without

Re: Forcing Python to detect DocumentRoot

2013-01-21 Thread Dave Angel
On 01/21/2013 01:25 AM, Ferrous Cranus wrote: Τη Σάββατο, 19 Ιανουαρίου 2013 10:01:15 μ.μ. UTC+2, ο χρήστης Piet van Oostrum έγραψε: Ferrous Cranus writes: While /home/nikos/public_html/cafebar-idea.gr/cgi-bin/counter.py that has also embedded this line: mailto:supp...@superhost.gr";>

Re: Uniquely identifying each & every html template

2013-01-21 Thread Ferrous Cranus
Τη Δευτέρα, 21 Ιανουαρίου 2013 11:31:24 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > On Mon, Jan 21, 2013 at 8:19 PM, Ferrous Cranus wrote: > > > This python script acts upon websites other people use and > > > every html templates has been written by different methods(notepad++, > > dreamwe

Re: need explanation

2013-01-21 Thread Steven D'Aprano
On Mon, 21 Jan 2013 10:06:41 -0600, kwakukwatiah wrote: > please I need some explanation on sys.stdin and sys.stdout, and piping > out "stdin" and "stdout" (and also stderr) are three special, standard, system files used by console programs that read and write text. That's nearly all of them.

Re: why not?

2013-01-21 Thread Steven D'Aprano
On Mon, 21 Jan 2013 11:02:10 -0600, kwakukwatiah wrote: > f = open(r'c:\text\somefile.txt') > for i in range(3): >print str(i) + ': ' + f.readline(), > > please with the print str(i) + ‘: ‘ + f.readline(), > why not print str(i) + f.readline(), Because the output will be different. The

Re: Windows subprocess.call problem

2013-01-21 Thread Nobody
On Mon, 21 Jan 2013 07:25:06 -0400, Tom Borkin wrote: > It opens the first song and hangs on subsequent songs. It doesn't open the > next song or execute the print until I have closed the first one. I want it > to open all in the list, one after another, so I have all those songs > available. Plea

Re: ANN: Python training "text movies"

2013-01-21 Thread Franck Ditter
In article , Mitya Sirenef wrote: > > - To use the software outside Python, we need to have proper indentation > > as real spaces. We should be able to distinguish Arial type for usual > > text and fixed font for code. > > > Not sure I understand about indentation.. You mean like wrapping >

Re: Windows subprocess.call problem

2013-01-21 Thread Tim Golden
On 21/01/2013 11:25, Tom Borkin wrote: > Hi; > I have this code: > > #!/Python27/python > import os, subprocess, sys > lyrics_path = "/Users/Tom/Documents/lyrics" > os.chdir(lyrics_path) > > songs = ['livin-la-vida-loca', 'whos-that-lady'] > for song in songs: > subprocess.call(['notepad.exe'

Windows subprocess.call problem

2013-01-21 Thread Tom Borkin
Hi; I have this code: #!/Python27/python import os, subprocess, sys lyrics_path = "/Users/Tom/Documents/lyrics" os.chdir(lyrics_path) songs = ['livin-la-vida-loca', 'whos-that-lady'] for song in songs: subprocess.call(['notepad.exe', '%s.txt' % song]) my_songs_path = "aa english lyrics" os.chdi

Re: need explanation

2013-01-21 Thread Ulrich Eckhardt
Am 21.01.2013 17:06, schrieb kwakukwat...@gmail.com: please I need some explanation on sys.stdin and sys.stdout, and piping out http://www.catb.org/esr/faqs/smart-questions.html Uli -- http://mail.python.org/mailman/listinfo/python-list

Re: handling return codes from CTYPES

2013-01-21 Thread Duncan Booth
Steve Simmons wrote: > >>> from ctypes import * > >>> sLib = cdll.slib > >>> lic_key = c_char_p("asdfghjkl".encode(encoding='utf_8', > errors='strict')) > >>> initResult = sLib.InitScanLib(lic_key.value) > >>> print("InitScanLib Result: ", initResult) > InitScanLib Result: 65535 > >>> > > I'

why not?

2013-01-21 Thread kwakukwatiah
f = open(r'c:\text\somefile.txt') for i in range(3): print str(i) + ': ' + f.readline(), please with the print str(i) + ‘: ‘ + f.readline(), why not print str(i) + f.readline(),-- http://mail.python.org/mailman/listinfo/python-list

FREE DOWNLOAD Video Games Wii

2013-01-21 Thread feefreelance
You can find may information about video games nintendo wii Including review of PS2 Video Games, Xbox, PSP, Nintendo. It's all here completely. http://www.videogames-101.com I'm confident you'll find my website very helpful! Cheers, Oky Ade Irmawan lantabur - Trainee -- http://mail.python.org/ma

handling return codes from CTYPES

2013-01-21 Thread Steve Simmons
PY33, Win7, Python Newbie, Not homework:-) I'm trying to use some 'C' DLLs from Python using ctypes and I have a minor issue with the return valuesbut I am new to Python; ctypes and using DLLs so I am at the bottom of so many learning curves, I'm not sure where or how to find my mistake. When

need explanation

2013-01-21 Thread kwakukwatiah
please I need some explanation on sys.stdin and sys.stdout, and piping out-- http://mail.python.org/mailman/listinfo/python-list

Re: Uniquely identifying each & every html template

2013-01-21 Thread Chris Angelico
On Mon, Jan 21, 2013 at 8:19 PM, Ferrous Cranus wrote: > This python script acts upon websites other people use and > every html templates has been written by different methods(notepad++, > dreamweaver, joomla). > > Renames and moves are performed, either by shell access or either by cPanel > a

Re: Uniquely identifying each & every html template

2013-01-21 Thread Ferrous Cranus
Τη Δευτέρα, 21 Ιανουαρίου 2013 9:20:15 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > On Mon, Jan 21, 2013 at 6:08 PM, Ferrous Cranus wrote: > > > An .html page must retain its database counter value even if its: > > > > > > (renamed && moved && contents altered) > > > > Then you either nee

Re: Sending a broadcast message using raw sockets

2013-01-21 Thread Rob Williscroft
Peter Steele wrote in news:f37ccb35-8439-42cd-a063-962249b44...@googlegroups.com in comp.lang.python: > I want to write a program in Python that sends a broadcast message > using raw sockets. The system where this program will run has no IP or > default route defined, hence the reason I need to u

Re: ANN: Python training "text movies"

2013-01-21 Thread Mitya Sirenef
On 01/21/2013 03:07 AM, Franck Ditter wrote: Ok I can make my way with jstmovie. Some remarks and questions : > > - Use encoding='utf-8' inside open of method __init__ of class Tutorial > in jstmovie.py. Otherwise foreign languages are stuck. > Thanks, will fix this.. -m -- Lark's Tongue Gu

Re: ANN: Python training "text movies"

2013-01-21 Thread Mitya Sirenef
On 01/21/2013 03:07 AM, Franck Ditter wrote: Ok I can make my way with jstmovie. Some remarks and questions : > > - Use encoding='utf-8' inside open of method __init__ of class Tutorial > in jstmovie.py. Otherwise foreign languages are stuck. > > - To use the software outside Python, we need to

Re: RE Help splitting CVS data

2013-01-21 Thread Alister
On Sun, 20 Jan 2013 16:41:12 -0800, Garry wrote: > On Sunday, January 20, 2013 3:04:39 PM UTC-7, Garry wrote: >> I'm trying to manipulate family tree data using Python. >> >> I'm using linux and Python 2.7.3 and have data files saved as Linux >> formatted cvs files >> >> The data appears in this

Re: ANN: Python training "text movies"

2013-01-21 Thread Mitya Sirenef
On 01/21/2013 02:30 AM, rusi wrote: On Jan 13, 12:08 pm, Mitya Sirenef wrote: >> Sure: they play back a list of instructions on use of string methods and >> list comprehensions along with demonstration in a mock-up of the >> interpreter with a different display effect for commands typed into (

Re: ANN: Python training "text movies"

2013-01-21 Thread Franck Ditter
Ok I can make my way with jstmovie. Some remarks and questions : - Use encoding='utf-8' inside open of method __init__ of class Tutorial in jstmovie.py. Otherwise foreign languages are stuck. - To use the software outside Python, we need to have proper indentation as real spaces. We should b

Re: Else statement executing when it shouldnt

2013-01-21 Thread Steven D'Aprano
On Sun, 20 Jan 2013 22:00:10 -0800, alex23 wrote: > On Jan 21, 2:54 pm, eli m wrote: >> hint: Use the comments in the code to find out where my error is. > > Pro-tip: when people you're asking for help tell you how you can make it > easier for them to help you, a snide response isn't the correct